thealper2 commited on
Commit
7b697a4
·
verified ·
1 Parent(s): f70e1b4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
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
- aspects.append(" ".join(current_aspect))
 
 
 
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)