From 5ada6d2c2c5b9d0e31942ae690f1a89245e64812 Mon Sep 17 00:00:00 2001 From: yangheng95 Date: Sat, 29 Oct 2022 18:21:34 +0100 Subject: [PATCH] update --- demos/aspect_term_extraction/extract_aspects.py | 2 +- .../classic/__bert__/dataset_utils/data_utils_for_training.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/demos/aspect_term_extraction/extract_aspects.py b/demos/aspect_term_extraction/extract_aspects.py index 61a0f1368..06f62c301 100644 --- a/demos/aspect_term_extraction/extract_aspects.py +++ b/demos/aspect_term_extraction/extract_aspects.py @@ -22,4 +22,4 @@ pred_sentiment=True, # Predict the sentiment of extracted aspect terms ) -# print(atepc_result) +print(atepc_result) diff --git a/pyabsa/core/apc/classic/__bert__/dataset_utils/data_utils_for_training.py b/pyabsa/core/apc/classic/__bert__/dataset_utils/data_utils_for_training.py index 3fa0d8d5a..1a2a08a3b 100644 --- a/pyabsa/core/apc/classic/__bert__/dataset_utils/data_utils_for_training.py +++ b/pyabsa/core/apc/classic/__bert__/dataset_utils/data_utils_for_training.py @@ -103,7 +103,7 @@ def __init__(self, dataset_list, tokenizer, opt): if lines[i].count("$T$") > 1: continue text_left, _, text_right = [s.lower().strip() for s in lines[i].partition("$T$")] - aspect = lines[i + 1].strip() + aspect = lines[i + 1].lower().strip() text_raw = text_left + ' ' + aspect + ' ' + text_right polarity = lines[i + 2].strip() # polarity = int(polarity)