Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
L

LCF-ATEPC

> 编程语言
Open source

codes for paper A Multi-task Learning Model for Chinese-oriented Aspect Polarity Classification and Aspect Term Extraction

199 stars0 likes0 views
WebsiteGitHub

About

codes for paper A Multi-task Learning Model for Chinese-oriented Aspect Polarity Classification and Aspect Term Extraction

LCF-ATEPC

codes for our paper A Multi-task Learning Model for Chinese-oriented Aspect Polarity Classification and Aspect Term Extraction

LCF-ATEPC,面向中文及多语言的ATE和APC联合学习模型,基于PyTorch和pytorch-transformers.

LCF-ATEPC, a multi-task learning model for Chinese and multilingual-oriented ATE and APC task, based on PyTorch

Important Note

This implementation of LCF-ATEPC is outdated, please transfer to the latest implementation and usages at PyABSA

LCF-ATEPC模型进行方面抽取与情感预测的用法请见这里。

Check the detailed usages in ATE examples directory.

Try our demo Inference API on Huggingface Space (powered by PyABSA)

Requirement

  • Python >= 3.7
  • PyTorch >= 1.0
  • transformers >= 4.5.1
  • Set use_bert_spc = True to improve the APC performance while only APC is considered.

Training

We use the configuration file to manage experiments setting.

Training in batches by experiments configuration file, refer to the experiments.json to manage experiments.

Then,

bash
python train.py --config_path experiments.json

About dataset

If you want to build your dataset, please find the description of the dataset here

Out of Memory

Since BERT models require a lot of memory. If the out-of-memory problem while training the model, here are the ways to mitigate the problem:

  1. Reduce the training batch size ( train_batch_size = 4 or 8 )
  2. Reduce the longest input sequence ( max_seq_length = 40 or 60 )
  3. Set use_unique_bert = true to use a unique BERT layer to model for both local and global contexts

Model Performance

We made our efforts to make our benchmarks reproducible. However, the performance of the LCF-ATEPC models fluctuates and any slight changes in the model structure could also influence performance. Try different random seed to achieve optimal results.

Performance on Chinese Datasets

Performance on Multilingual Datasets

Optimal Performance on Laptop and Restaurant Datasets

Model Architecture

Notice

We cleaned up and refactored the original codes for easy understanding and reproduction. However, we didn't test all the training situations for the refactored codes. If you find any issue in this repo, You can raise an issue or submit a pull request, whichever is more convenient for you.

Due to the busy schedule, some module may not update for long term, such as saving and loading module for trained models, inferring module, etc. If possible, we sincerely request for someone to accomplish these work.

Citation

If this repository is helpful to you, please cite our paper:

@misc{yang2019multitask,
    title={A Multi-task Learning Model for Chinese-oriented Aspect Polarity Classification and Aspect Term Extraction},
    author={Heng Yang and Biqing Zeng and JianHao Yang and Youwei Song and Ruyang Xu},
    year={2019},
    eprint={1912.07976},
    archivePrefix={arXiv},
    primaryClass={cs.CL}
}

Licence

MIT License

Issues· 12 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Pythonaspect-based-sentiment-analysisaspect-polarity-classificationaspect-term-extractionchinese-sentiment-analysis

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言