Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
czp da53ad0154 | 2 years ago | |
---|---|---|
src | 2 years ago | |
README.md | 2 years ago | |
create_dataset.py | 3 years ago |
给定一个句子和句子中出现的某个aspect,aspect-level 情感分析的目标是分析出这个句子在给定aspect上的情感倾向。
例如:great food but the service was dreadful! 在aspect “food”上,情感倾向为正,在aspect “service”上情感倾向为负。Aspect level的情感分析相对于document level来说粒度更细。
论文: Attention-based LSTM for Aspect-level Sentiment Classification [https://www.aclweb.org/anthology/D16-1058.pdf]
AttentionLSTM模型的输入由词向量和Aspect向量组成,LSTM是单向单层的结构,输出的状态向量再和Aspect向量concatenate,并输入到Attention结构中计算Attention权值。最后拿Attention权值和LSTM输出的状态向量一起计算情感极性。
在Ascend处理器上运行
cd src
python train_atae_lstm.py
.
├── AttentionLSTM
├── README.md # AttnetionLSTM相关说明
├── script
│ ├── run_eval.sh #
│ └── run_train.sh #
├── src
│ ├── config.py # 参数配置
│ ├── eval_atae_lstm.py # 推理脚本
│ ├── load_dataset.py # 加载数据集
│ ├── model.py # 模型结构
│ ├── model_for_test.py # 模型推理
│ ├── model_for_train.py # 模型训练
│ ├── my_utils.py # LSTM配置
│ ├── rnn_cells.py # LSTMCell
│ ├── train_atae_lstm.py # 训练脚本
│ └── rnns.py # LSTM
├── eval.py # GPU、CPU和Ascend的评估脚本
└── train.py # GPU、CPU和Ascend的训练脚本
No Description
Python
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》