Giter Site home page Giter Site logo

solertis / sentiment-analysis Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cathywu/sentiment-analysis

0.0 2.0 0.0 21.51 MB

License: GNU General Public License v2.0

Python 6.30% C++ 24.00% Makefile 0.02% C 0.85% HTML 68.47% CSS 0.05% JavaScript 0.03% Perl 6 0.03% TeX 0.24% Perl 0.01% Shell 0.01%

sentiment-analysis's Introduction

==============================================================================
Linking to Yelp dataset (via a symlink)
==============================================================================
ln -s $HOME/Dropbox/sentiment-data/yelp/ yelp

==============================================================================
Toolkits
==============================================================================
Oliver Mason's Qtag program [http://phrasys.net/uob/om/software]

==============================================================================
For setting up Maximum Entropy Modeling Toolkit for Python and C++
==============================================================================
Main page [http://homepages.inf.ed.ac.uk/lzhang10/maxent_toolkit.html]
Source [https://github.com/lzhang10/maxent]
Wonderful documentation, except for the missing Python API reference [http://homepages.inf.ed.ac.uk/lzhang10/software/maxent/manual.pdf]

DEPENDENCIES
zlib [http://www.techsww.com/tutorials/libraries/zlib/installation/installing_zlib_on_ubuntu_linux.php]
libboost [apt-get]
jam [apt-get]

Important points
* L-BFGS is the default parameter estimating method in this toolkit.

==============================================================================
Preprocess movie data
==============================================================================

Use Qtag with the "underscore" and "process all files in directory" options
$ java -jar qtag.jar

Move the POS tagged data out to its own directory, for further processing
$ mv pos/tagged/ pos_tagged
$ mv neg/tagged/ neg_tagged

Tag data with position
$ python position_tagger.py -d pos 
$ python position_tagger.py -d neg 

Filter out for only adjectives
$ python adjectives_filter.py -d neg
$ python adjectives_filter.py -d pos

Filter out for only verbs
$ python verb_filter.py -d pos
$ python verb_filter.py -d neg

==============================================================================
Preprocess Yelp data
==============================================================================

Make yelp data look like movie data in terms of formatting, and limit to 1000 
per star rating
$ python preprocess_yelp.py -d yelp/default/1star_limited
$ python preprocess_yelp.py -d yelp/default/2star_limited
$ python preprocess_yelp.py -d yelp/default/3star_limited
$ python preprocess_yelp.py -d yelp/default/4star_limited
$ python preprocess_yelp.py -d yelp/default/5star_limited

Use Qtag with the "underscore" and "process all files in directory" options
$ java -jar qtag.jar

Move the POS tagged data out to its own directory, for further processing
$ mv 1star_limited/tagged/ 1star_limited_tagged
$ mv 2star_limited/tagged/ 2star_limited_tagged
$ mv 3star_limited/tagged/ 3star_limited_tagged
$ mv 4star_limited/tagged/ 4star_limited_tagged
$ mv 5star_limited/tagged/ 5star_limited_tagged

Tag data with position
$ python position_tagger.py -d yelp/default/1star_limited
$ python position_tagger.py -d yelp/default/2star_limited
$ python position_tagger.py -d yelp/default/3star_limited
$ python position_tagger.py -d yelp/default/4star_limited
$ python position_tagger.py -d yelp/default/5star_limited

Filter out for only adjectives
$ python adjectives_filter.py -d yelp/default/1star_limited
$ python adjectives_filter.py -d yelp/default/2star_limited
$ python adjectives_filter.py -d yelp/default/3star_limited
$ python adjectives_filter.py -d yelp/default/4star_limited
$ python adjectives_filter.py -d yelp/default/5star_limited

Filter out for only verbs
$ python verb_filter.py -d yelp/default/1star_limited
$ python verb_filter.py -d yelp/default/2star_limited
$ python verb_filter.py -d yelp/default/3star_limited
$ python verb_filter.py -d yelp/default/4star_limited
$ python verb_filter.py -d yelp/default/5star_limited

sentiment-analysis's People

Contributors

cathywu avatar pranjalv123 avatar

Watchers

 avatar  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.