Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ibrahimsharaf/doc2vec
:notebook: Long(er) text representation and classification using Doc2Vec embeddings
https://github.com/ibrahimsharaf/doc2vec
doc2vec gensim nlp-machine-learning scikit-learn sentiment-analysis text-classification
Last synced: about 1 month ago
JSON representation
:notebook: Long(er) text representation and classification using Doc2Vec embeddings
- Host: GitHub
- URL: https://github.com/ibrahimsharaf/doc2vec
- Owner: ibrahimsharaf
- License: mit
- Created: 2017-03-07T19:41:34.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-06-17T22:49:39.000Z (7 months ago)
- Last Synced: 2024-12-08T16:52:59.773Z (about 2 months ago)
- Topics: doc2vec, gensim, nlp-machine-learning, scikit-learn, sentiment-analysis, text-classification
- Language: Python
- Homepage:
- Size: 12.7 MB
- Stars: 106
- Watchers: 9
- Forks: 43
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Doc2Vec Text Classification [![Build Status](https://travis-ci.org/ibrahimsharaf/doc2vec.svg?branch=master)](https://travis-ci.org/ibrahimsharaf/doc2vec)
Text classification model which uses gensim Doc2Vec for generating paragraph embeddings and scikit-learn Logistic Regression for classification.
### Dataset
25,000 IMDB movie reviews, specially selected for sentiment analysis. The sentiment of reviews is binary (1 for postive, 0 for negative).
This source dataset was collected in association with the following publication:
```Andrew L. Maas, Raymond E. Daly, Peter T. Pham, Dan Huang, Andrew Y. Ng, and Christopher Potts. (2011). "Learning Word Vectors for Sentiment Analysis." The 49th Annual Meeting of the Association for Computational Linguistics (ACL 2011).```
### Usage
- Install the required tools```pip install -r requirements.txt```
- Run the script
```python text_classifier.py```### References
- Kaggle – Bag of Words Meets Bags of Popcorn (https://www.kaggle.com/c/word2vec-nlp-tutorial)
- Gensim – Deep learning with paragraph2vec (https://radimrehurek.com/gensim/models/doc2vec.html)
- Quoc Le and Tomas Mikolov. Distributed Representations of Sentences and Documents (https://arxiv.org/pdf/1405.4053v2.pdf)