# GED
CS 4624 Spring 2017 Global Event Detector

In order for this to work you must have: <br />
	- Python > 3.3 <br />
	- NLTK <br />
	- SNER <br />
	- Gensim <br />
	- BeautifulSoup <br />
	- urllib <br />
	- networkx <br />
	- PRAW <br />
	- PyMySQL <br />
You must also have the Associated Press news skip gram (https://github.com/jhlau/doc2vec)
Specifically, you must have a file-structure that looks like: <br />
	${PWD}/w2v/word2vec.bin

Additionally, you must have an installation of SNER on your machine.
On the server, these files are currently in the "harrison" directory.
The following additions must be made to classpath after adding the files.<br />
export CLASSPATH=/home/ged/harrison/stanford-ner-2016-10-31/<br />
export STANFORD_MODELS=/home/ged/harrison/stanford-ner-2016-10-31/classifiers<br />

Run on server: <br />
  1. python3.5 poller.py <br />
  2. python3.5 processNews.py <br />

Driver.sh: script runs both Python files every 12 hours

# Website

To view on localhost:
  1. Download and install XAMPP version 7.1.1
  2. Open the XAMPP Control Panel
  3. Edit the Apache Config file "httpd.conf"
  4. (Optional) Change the "DocumentRoot" and "\<Directory\>" properties to both point to the website directory.
  5. Save your changes and click "Start" on Apache.
  6. Open your browser to "localhost".

# References

1. Schmidt, T. (2016, December 7). Named Entity Recognition with Regular Expression: NLTK. Retrieved March 16, 2017, from http://stackoverflow.com/questions/24398536/named-entity-recognition-with-regular-expression-nltk
2. Boe, B. (2016). PRAW: The Python Reddit API Wrapper. Retrieved March 16, 2017, from http://praw.readthedocs.io/en/latest/
3. Richardson, L. (2015). Beautiful Soup Documentation. Retrieved March 16, 2017, from https://www.crummy.com/software/BeautifulSoup/bs4/doc/
4. Rehurek, R. (2017, January 11). Gensim: topic modelling for humans. Retrieved February 17, 2017, from https://radimrehurek.com/gensim/
5. Bostock, M. Data-Driven Documents. Retrieved March 17, 2017, from https://d3js.org/
6. Mikolov, T. GoogleNews-vectors-negative300.bin.gz. Retrieved March 16, 2017, from https://drive.google.com/file/d/0B7XkCwpI5KDYNlNUTTlSS21pQmM/edit
7. P. (2017, April 05). PyMySQL/PyMySQL. Retrieved April 10, 2017, from https://github.com/PyMySQL/PyMySQL
8. Estes, B. (2015, March 15). Benjaminestes/pyscape-client. Retrieved April 17, 2017, from https://github.com/benjaminestes/pyscape-client/blob/master/pyscape-cli.py