Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -99,7 +99,10 @@ class AspectSentimentPipeline(Pipeline):
|
|
| 99 |
if prediction == "B-A":
|
| 100 |
if current_aspect:
|
| 101 |
current_aspect.append(token)
|
| 102 |
-
|
|
|
|
|
|
|
|
|
|
| 103 |
current_aspect = []
|
| 104 |
else:
|
| 105 |
current_aspect.append(token)
|
|
|
|
| 99 |
if prediction == "B-A":
|
| 100 |
if current_aspect:
|
| 101 |
current_aspect.append(token)
|
| 102 |
+
if len(token) == 1:
|
| 103 |
+
aspects.append("".join(current_aspect))
|
| 104 |
+
else:
|
| 105 |
+
aspects.append(" ".join(current_aspect))
|
| 106 |
current_aspect = []
|
| 107 |
else:
|
| 108 |
current_aspect.append(token)
|