Coder Social home page Coder Social logo

sxu-fyj / subjective-and-objective-sentence-classification-using-word-vectors-and-nlp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tancalv2/subjective-and-objective-sentence-classification-using-word-vectors-and-nlp

0.0 0.0 0.0 7.72 MB

Two parts : 1. Build three Natural Language Processing (NLP) models: baseline, Recurrent Neural Network (RNN), and Convolutional Neural Network (CNN) to predict a 2-class dataset using Pytorch torchtext library and pre-trained word vectors 2. Create a command-line interface to test "subjectivity" of a sentence

Python 100.00%

subjective-and-objective-sentence-classification-using-word-vectors-and-nlp's Introduction

Subjective/Objective Sentence Classification Using Word Vectors and NLP
Dataset: 10,000 sentences (5,000 subjective, 5,000 objective) from https://www.cs.cornell.edu/people/pabo/movie-review-data/ based on Rotten Tomatoes Movie Reviews and IMDb plot summaries
Goal: Two parts
 1. Build three Natural Language Processing (NLP) models: baseline, Recurrent Neural Network (RNN), and Convolutional Neural Network (CNN) to predict a 2-class dataset using Pytorch torchtext library and pre-trained word vectors
 2. Create a command-line interface to test "subjectivity" of a sentence

Hyperparameters
- Learning Rate = 0.001
- Batch Size = 64
- Epochs = 25
- Adam Optimizer (Default settings, as described in PyTorch Documentation)
- Loss Function = Binary Cross Entropy

Note:
GloVe model will be downloaded if not already present. Required space of 822 MB
only 'glove.6B.100d.txt' file required of GloVe model

install the following packages:
torchtext, spacy
download 'en' from spacy

Train:
- ensure all files are downloaded
- run main.py

Subjective Sentence Command-Line Tester:
- ensure models and data folder and subjective_bot.py are downloaded
- run subjective_bot.py

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.