All Projects → soujanyaporia → Aspect Extraction

soujanyaporia / Aspect Extraction

Licence: apache-2.0
Aspect extraction from product reviews - window-CNN+maxpool+CRF, BiLSTM+CRF, MLP+CRF

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Aspect Extraction

Pytorch Sentiment Analysis
Tutorials on getting started with PyTorch and TorchText for sentiment analysis.
Stars: ✭ 3,209 (+2642.74%)
Mutual labels:  cnn, sentiment-analysis
Ncrfpp
NCRF++, a Neural Sequence Labeling Toolkit. Easy use to any sequence labeling tasks (e.g. NER, POS, Segmentation). It includes character LSTM/CNN, word LSTM/CNN and softmax/CRF components.
Stars: ✭ 1,767 (+1410.26%)
Mutual labels:  cnn, sequence-labeling
Cnn Text Classification Keras
Text Classification by Convolutional Neural Network in Keras
Stars: ✭ 213 (+82.05%)
Mutual labels:  cnn, sentiment-analysis
Cs291k
🎭 Sentiment Analysis of Twitter data using combined CNN and LSTM Neural Network models
Stars: ✭ 287 (+145.3%)
Mutual labels:  cnn, sentiment-analysis
Personality Detection
Implementation of a hierarchical CNN based model to detect Big Five personality traits
Stars: ✭ 338 (+188.89%)
Mutual labels:  cnn, sentiment-analysis
Twitter Sentiment Analysis
Sentiment analysis on tweets using Naive Bayes, SVM, CNN, LSTM, etc.
Stars: ✭ 978 (+735.9%)
Mutual labels:  cnn, sentiment-analysis
Neural Networks
All about Neural Networks!
Stars: ✭ 34 (-70.94%)
Mutual labels:  cnn, sentiment-analysis
Sentiment analysis albert
sentiment analysis、文本分类、ALBERT、TextCNN、classification、tensorflow、BERT、CNN、text classification
Stars: ✭ 61 (-47.86%)
Mutual labels:  cnn, sentiment-analysis
Deeplearning tutorials
The deeplearning algorithms implemented by tensorflow
Stars: ✭ 1,580 (+1250.43%)
Mutual labels:  cnn
Tf2
An Open Source Deep Learning Inference Engine Based on FPGA
Stars: ✭ 113 (-3.42%)
Mutual labels:  cnn
Mnist Classification
Pytorch、Scikit-learn实现多种分类方法,包括逻辑回归(Logistic Regression)、多层感知机(MLP)、支持向量机(SVM)、K近邻(KNN)、CNN、RNN,极简代码适合新手小白入门,附英文实验报告(ACM模板)
Stars: ✭ 109 (-6.84%)
Mutual labels:  cnn
Robust Lane Detection
Stars: ✭ 110 (-5.98%)
Mutual labels:  cnn
Deepgaze
Computer Vision library for human-computer interaction. It implements Head Pose and Gaze Direction Estimation Using Convolutional Neural Networks, Skin Detection through Backprojection, Motion Detection and Tracking, Saliency Map.
Stars: ✭ 1,552 (+1226.5%)
Mutual labels:  cnn
Bulbea
🐗 🐻 Deep Learning based Python Library for Stock Market Prediction and Modelling
Stars: ✭ 1,585 (+1254.7%)
Mutual labels:  sentiment-analysis
Aspect Based Sentiment Analysis
Aspect-Based Sentiment Analysis Experiments
Stars: ✭ 115 (-1.71%)
Mutual labels:  sentiment-analysis
Places365
The Places365-CNNs for Scene Classification
Stars: ✭ 1,549 (+1223.93%)
Mutual labels:  cnn
Min nlp practice
Chinese & English Cws Pos Ner Entity Recognition implement using CNN bi-directional lstm and crf model with char embedding.基于字向量的CNN池化双向BiLSTM与CRF模型的网络,可能一体化的完成中文和英文分词,词性标注,实体识别。主要包括原始文本数据,数据转换,训练脚本,预训练模型,可用于序列标注研究.注意:唯一需要实现的逻辑是将用户数据转化为序列模型。分词准确率约为93%,词性标注准确率约为90%,实体标注(在本样本上)约为85%。
Stars: ✭ 107 (-8.55%)
Mutual labels:  cnn
Yolo V3 Iou
YOLO3 动漫人脸检测 (Based on keras and tensorflow) 2019-1-19
Stars: ✭ 116 (-0.85%)
Mutual labels:  cnn
Rnn Text Classification Tf
Tensorflow Implementation of Recurrent Neural Network (Vanilla, LSTM, GRU) for Text Classification
Stars: ✭ 114 (-2.56%)
Mutual labels:  sentiment-analysis
Mobilenet Yolo
MobileNetV2-YoloV3-Nano: 0.5BFlops 3MB HUAWEI P40: 6ms/img, YoloFace-500k:0.1Bflops 420KB🔥🔥🔥
Stars: ✭ 1,566 (+1238.46%)
Mutual labels:  cnn

Aspect extraction from product reviews with Tensorflow

This repo has multiple sequential models for aspect extraction from product reviews.

Citation

Poria, S., Cambria, E. and Gelbukh, A., 2016. Aspect extraction for opinion mining with a deep convolutional neural network. Knowledge-Based Systems, 108, pp.42-49.

Task

Given a sentence, the task is to extract aspects. Here is an example

I like the battery life of this phone"

Converting this sentence to IOB would look like this -

I O
like O
the O
battery B-A
life I-A
of O
this O
phone O

Model

Similar to Ma and Hovy.

  • concatenate final states of a bi-lstm on character embeddings to get a character-based representation of each word
  • concatenate this representation to a standard word vector representation (GloVe here)
  • run a bi-lstm on each sentence to extract contextual representation of each word
  • decode with a linear chain CRF

Similar to [Collobert et al.] (http://ronan.collobert.com/pub/matos/2011_nlp_jmlr.pdf)

  • form a window around the word to tag
  • apply MLP on that window
  • obtain logits
  • apply viterbi (CRF) for sequence tagging

Similar to Poria et al.

  • form a window around the word to tag
  • apply CNN on that window
  • apply maxpool on that window (Caution: different from global maxpool)
  • obtain logits
  • apply CRF for sequence tagging

XML to IOB

python xmlToIOB.py

Details

Download Glove embeddings (GloVe: http://nlp.stanford.edu/data/glove.840B.300d.zip )

  1. [DO NOT MISS THIS STEP] Build vocab from the data and extract trimmed glove vectors according to the config in model/config.py.
python build_data.py
  1. Train the model with
python train.py
  1. Evaluate and interact with the model with
python evaluate.py

Data iterators and utils are in model/data_utils.py and the model with training/test procedures is in model/aspect_model.py

Training Data

The training data must be in the following format (identical to the CoNLL2003 dataset).

A default test file is provided to help you getting started.

The	O
duck	B-A
confit	I-A
is	O
always	O
amazing	O
and	O
the	O
foie	B-A
gras	I-A
terrine	I-A
with	I-A
figs	I-A
was	O
out	O
of	O
this	O
world	O

The	O
wine	B-A
list	I-A
is	O
interesting	O
and	O
has	O
many	O
good	O
values	O

Once you have produced your data files, change the parameters in config.py like

# dataset
filename_train = "data/ABSA16_Restaurants_Train_SB1_v2_mod.iob"
filename_dev = "data/EN_REST_SB1_TEST_2016_mod.iob"
filename_test = "data/EN_REST_SB1_TEST_2016_mod.iob"

Result

Chunk based evaluation

Laptop 2014 -> F1 - 79.93

Restaurant 2014 -> F1 - 84.22

Partial matching based evaluation

Laptop 2014 -> F1 - 86.84
Restaurant 2014 -> F1 - 88.42

License

This project is licensed under the terms of the apache 2.0 license (as Tensorflow and derivatives). If used for research, citation would be appreciated.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].