Skip to content

project-spinoza-dev/tsakpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 

Repository files navigation

tsakpy

Text Processing Tool

Installation

Prerequisites

Install Python 2.7.11 with pip

You can download and install Python 2.7.11 from [here] (https://www.python.org/downloads/)

NLTK Installation

  • For Windows
    Open commandline and run following command.
    pip install nltk
    run the following command to download necessary Corpora.
    python -m nltk.downloader all

  • For Mac or Unix
    To install NLTK you can consult Installing NLTK.
    and for downloading necessary Corpora you can consult Installing NLTK Data

Install spacy

run the following command to install spacy
pip install spacy

Note: in windows environment if you face an issue like missing vcvarsall.bat during spacy installation then first download vc_for_python from http://aka.ms/vcpython27 install it and set environment variable for AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0 and AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\bin and then retry to install spacy as above.

####Setup

  • create twitter app prerequisites
  • edit ConfigFile.properties file and enter your keys e.g.

    accessToken=[enter your access token here]
    consumerSecret=[enter your consumer secret key here]
    consumerKey=[enter your consumer key here]
    accessSecret=[enter your accessSecret key here]

  • Run Installation.bat. It will download some necessary dependencies

Running the Application

Running at the command line

Open cmd and run the following command

`python Main.py`

Available Commands

For running Twitter Sentiment Analysis run one of the following commands.

  • dumpTweets -keyword <any keyword> -sentiment <positive|negative|neutral> -limit <integer>

  • dumpStreaming -keyword <any keyword> -sentiment <positive|negative|neutral> -limit <integer>

e.g. dumpTweets -keyword iphone -sentiment positive -limit 5

For Entity Extraction from a Given Sentence run one of the following command.

  • dumpTweets -keyword <any keyword> -entity -limit <integer>

  • dumpStreaming -keyword <any keyword> -entity -limit <integer>

e.g. dumpStreaming -keyword ipad -entity -limit 4

Releases

No releases published

Packages

No packages published