Skip to content

Commit f29e511

Browse files
committed
update
1 parent ffd1ff0 commit f29e511

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

pyabsa/core/apc/classic/__glove__/dataset_utils/data_utils_for_inference.py

+2
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ def __init__(self, tokenizer, opt):
6767
self.all_data = []
6868

6969
def parse_sample(self, text):
70+
if '[ASP]' not in text:
71+
text = '[ASP] Global Sentiment [ASP]' + text
7072
_text = text
7173
samples = []
7274

pyabsa/core/apc/prediction/sentiment_classifier.py

-2
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,6 @@ def infer(self, text: str = None,
206206
print_result=True,
207207
ignore_error=True,
208208
clear_input_samples=True):
209-
if text.count('[ASP]') < 2:
210-
text = '[ASP] Global Sentiment [ASP]' + text
211209
if clear_input_samples:
212210
self.clear_input_samples()
213211
if text:

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
license='MIT',
3333
install_requires=['findfile>=1.7.9.8',
3434
'autocuda>=0.11',
35-
'metric-visualizer>=0.5.4',
35+
'metric-visualizer>=0.5.5',
3636
'boostaug>=2.2.3',
3737
'spacy',
3838
'networkx',

0 commit comments

Comments
 (0)