Skip to content

A semantic analyzer of sentences and questions based on NLP.

License

Notifications You must be signed in to change notification settings

medric49/semantic_analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Semantic analyzer

A semantic analyzer of sentences and questions based on Language processing algorithms (with Pytorch :) ).

1. 'Are the questions similar?' problem

In this problem, we compare similarity between two questions. The dataset used here comes from the Quora Question Pairs challenge.

Our solution with a pretrained BERT model built with Pytorch.

How does it work?

python3 same_analyze.py "Am I wrong?" "Do you love ice scream?"
Same at 0.15%
python3 same_analyze.py "How do I save videos from twitter?" "How do you upload videos from your camera roll onto Twitter?"
Same at 10.42%
python3 same_analyze.py "How do I save videos from twitter?" "How do you upload videos from your camera roll onto Twitter?"
Same at 97.04%

Details are in the notebook qqp_BERT.ipynb

2. 'Is this comment positive?' problem

Here, we evaluate how positive is a comment sent. The dataset used here to train the model come from The Stanford Sentiment Treebank dataset

Our solution is a BiLSTM model trained on a negative-positive classification task. We embed words with the Word2Vec Gensim model trained with the glove-wiki-gigaword-50 corpus.

How does it work?

python3 sent_analyze.py "I love this movie"
Positive at 100.0%
python3 sent_analyze.py "A great idea becomes a not-great movie."
Positive at 0.07%

Details are in the notebook sentiment_analysis_BiLSTM_v2.ipynb

About

A semantic analyzer of sentences and questions based on NLP.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published