Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
yangheng95 committed Aug 22, 2022
1 parent ffd1ff0 commit f29e511
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ def __init__(self, tokenizer, opt):
self.all_data = []

def parse_sample(self, text):
if '[ASP]' not in text:
text = '[ASP] Global Sentiment [ASP]' + text
_text = text
samples = []

Expand Down
2 changes: 0 additions & 2 deletions pyabsa/core/apc/prediction/sentiment_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,6 @@ def infer(self, text: str = None,
print_result=True,
ignore_error=True,
clear_input_samples=True):
if text.count('[ASP]') < 2:
text = '[ASP] Global Sentiment [ASP]' + text
if clear_input_samples:
self.clear_input_samples()
if text:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
license='MIT',
install_requires=['findfile>=1.7.9.8',
'autocuda>=0.11',
'metric-visualizer>=0.5.4',
'metric-visualizer>=0.5.5',
'boostaug>=2.2.3',
'spacy',
'networkx',
Expand Down

0 comments on commit f29e511

Please sign in to comment.