Giter Site home page Giter Site logo

mohanenm / movie-classifier Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 58.36 MB

sentiment classifier in python(and r :) ) @loyolachicagocode

Python 97.63% Shell 0.01% C++ 0.44% C 0.39% Fortran 0.04% R 0.01% Smarty 0.01% HTML 1.38% MATLAB 0.01% TeX 0.09% Makefile 0.01%
machine-learning python nlp nltk

movie-classifier's Introduction

movie-review-classifier

used NLTK to classify movie reviews as positive or negative(sentiment analysis hw for nlp course).

How to use

1. install Natural langauge Toolkit Mac/Linux, run 'sudo pip install -U nltk'
2. In Terminal clone from GH, 'git clone https://github.com/mohanenm/movie-classifier'
3. run, on the command line, 'python ./classifier.py'
4. wait a bit and get your results
5. Fork and Modify it!

How to mess with it

1. Fork it, make it your own

2. Look at the comments on where to test different reviews

3. email me with any questions

Code source

2. NLTK DOCUMENTATION

You will be working with movie review data, which you can download here:https://github.com/dennybritz/cnn-text-classification-tf/tree/master/data/rt-polaritydata

  • find two files there (one with positive and one with negative reviews).
  • build a binary classifier that will perform movie review classifica-tion automatically.
  • 1.split data randomly into training (70%), development (15%)and test (15%) sets. (10 points)
  • 2.Download and install LibSVM from https://www.csie.ntu.edu.tw/~cjlin/libsvm/. Convert the sentiment data into LibSVM sparse format. (30points) find some guidelines by following these links:https://www.csie.ntu.edu.tw/~cjlin/libsvm/faq.html#/Q03:_Data_preparationhttps://stats.stackexchange.com/questions/61328/libsvm-data-format
  • 3.Use LibSVM command-line tools such as svm-train and svm-predict totrain and evaluate a linear SVM model on your development set. Tune alinear SVM by trying a few different C values such as 0.0001, 0.001, . . . ,1000, 10000 on thedevelopmentset. Report the accuracy you obtainedfor each model. (30 points)
  • 4.Evaluate your best model on the test set. Report the final accuracy ofyour model on thetestset. (30 points)

movie-classifier's People

Contributors

mohanenm avatar

Stargazers

Faisal Shaheen avatar

Watchers

James Cloos avatar

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.