Skip to content

Commit

Permalink
update_doc
Browse files Browse the repository at this point in the history
  • Loading branch information
yangheng95 committed May 3, 2022
1 parent 3aff072 commit 36527d4
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 4 deletions.
27 changes: 27 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,33 @@
- [Aspect term extraction & sentiment classification](https://huggingface.co/spaces/yangheng/PyABSA-ATEPC) (English, Chinese, Arabic, Dutch, French, Russian, Spanish, Turkish, etc.)
- [方面术语提取和情感分类](https://huggingface.co/spaces/yangheng/PyABSA-ATEPC-Chinese) (中文, etc.)

### About Performance
<details>
<summary>
Aspect-term extraction
</summary>

| Models | Laptop14 (APC-Acc) | Laptop14 (ATE-F1) | Restaurant14 (APC-Acc) | Restaurant14 (ATE-F1) |
|:------------------------------:|:------------------:|:-----------------:|:----------------------:|:---------------------:|
| FAST-LCF-ATEPC (BERT) | 80.72 | 85.75 | 86.40 | 89.29 |
| FAST-LCF-ATEPC (DeBERTa) | 83.65 | 89.03 | 90.52 | 91.77 |
| FAST-LCF-ATEPC (DeBERTa-Large) | 85.06 | 87.76 | 89.8 | 92.5 |

</details>

<details>
<summary>
Aspect-based sentiment analysis
</summary>

| Models | Laptop14 (Acc) | Restaurant14 (acc) | Models | Laptop14 (Acc) | Restaurant14 (acc) |
|:-------------------------:|:--------------:|:------------------:|:-------------------------:|:--------------:|:------------------:|
| FAST-LSA-T(DeBERTa) | 84.80 | 89.91 | FAST-LSA-T(DeBERTa-Large) | 86.31 | 90.86 |
| FAST-LSA-S(DeBERTa) | 84.17 | 89.64 | FAST-LSA-S(DeBERTa-Large) | 86.21 | 89.38 |
| FAST-LSA-P(DeBERTa) | 84.33 | 89.91 | FAST-LSA-P(DeBERTa-Large) | 86.00 | 90.33 |
</details>


## Package Overview

<table>
Expand Down
5 changes: 3 additions & 2 deletions pyabsa/core/apc/prediction/sentiment_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,9 @@ def _infer(self, save_path=None, print_result=True):

else:
aspect_info = '{} -> {}(confidence:{})'.format(result['aspect'][i],
round(result['confidence'][i], 3),
result['sentiment'][i])
result['sentiment'][i],
round(result['confidence'][i], 3)
)

text_printing = text_printing.replace(result['aspect'][i], aspect_info)
print(text_printing)
Expand Down
4 changes: 2 additions & 2 deletions pyabsa/core/atepc/dataset_utils/atepc_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ def process_iob_tags(iob_tags: list) -> list:
if iob_tags[i] == 'O' and 'ASP' in iob_tags[i + 1]:
iob_tags[i + 1] = 'B-ASP'

# if 'ASP' in iob_tags[i] and 'B-ASP' in iob_tags[i + 1]:
# iob_tags[i + 1] = 'I-ASP'
if 'ASP' in iob_tags[i] and 'B-ASP' in iob_tags[i + 1]:
iob_tags[i + 1] = 'I-ASP'

return iob_tags

Expand Down

0 comments on commit 36527d4

Please sign in to comment.