Skip to content

iczcpkqo/CS7IS4_Text-Analytics_Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Communities

Setup CoreNLP

Setup Stanza

  • Download stanza: pip3 install stanza -U
  • Download english language: python3 -c 'import stanza; stanza.download("en")'

Setup & Run textcomplexity

  • pip3 install textcomplexity
  • get conllu ver. of file: python3 utils/get_conllu.py data/example.json
  • get analysis: txtcomplexity --input-format conllu --all-measures output/example.json.conllu > "output/example_analysis.json"

Run analysis code

  • set up your environmental variable
    • on mac for example: export CORENLP_HOME='./corenlp'
  • Install any python dependencies
    • pip3 install nltk
    • pip3 install textstat
    • pip3 install vaderSentiment
    • pip3 install empath
    • pip3 install redditcleaner
  • create separate terminal and run CoreNLP server
    • cd corenlp
    • java -mx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port 9001 -timeout 15000
    • If you already have a process running on post 9001, you will need to stop it
      • on mac: lsof -t -i tcp:9001 | xargs kill
  • run code, e.g. python3 analysis/analyze_data.py

##setup Empath -Install empath

  • pip install empath

-To run sample code to perform analysis use command given below. It takes file name as program argument. AnalysisUsingEmpathy.py ../data/all_text.json

##setup spacy -Install spacy

  • pip install -U spacy
  • python -m spacy download en_core_web_sm --To run sample code to perform analysis use command given below. It takes file name as program argument. AnalysisUsingSpacy.py ../data/all_text.json

Useful Links

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published