This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import string | |
from twython import Twython | |
twitter = Twython('Insert Consumer Key Here', | |
'Insert Consumer Secret Key',oauth_version=2) | |
Access_token = twitter.obtain_access_token() | |
t = Twython('Insert Consumer Key', access_token=Access_token) | |
user_timeline = t.search(q='@puremichigan', count=20, include_rts=1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import division | |
import nltk | |
import re | |
import pprint | |
from nltk import word_tokenize | |
from nltk.tokenize import RegexpTokenizer | |
import numpy as np | |
tokenizer = RegexpTokenizer(r'\w+') #this is important because it takes out the punctuation that Python can't read |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import string | |
from twython import Twython | |
twitter = Twython('Insert Consumer Key Here', | |
'Insert Consumer Secret Key',oauth_version=2) | |
Access_token = twitter.obtain_access_token() | |
t = Twython('Insert Consumer Key', access_token=Access_token) | |
#MAKE THE QUERY TO TWITTER TO PULL THE DATA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import division | |
import nltk, re | |
from nltk import FreqDist | |
from nltk import word_tokenize | |
from nltk.tokenize import RegexpTokenizer | |
from nltk.corpus import brown | |
tokenizer = RegexpTokenizer(r'\w+') # Takes out the punctuation that Python can't read | |
f= open('Conservative.txt').read().decode('utf-8') # open the file | |
text = word_tokenize(f) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java -mx1000m -jar stanford-ner.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java -mx1000m -jar stanford-postagger.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python standalone.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- This loads of all of files that you call below from your 'static' folder --> | |
{% load staticfiles %} | |
<!--The static folder consists of your bootstrap files (.css, .js, fonts, etc)--> | |
<!--When you load the static folders is calls all those folders in the static files without having to code each one in individually--> | |
<html> | |
<head> | |
<!--This is the meta information which is good for SEO--> | |
{% block head-meta %} | |
<meta charset="utf-8"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "NAME OF YOUR PROJECT/repeatable_content.html" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--Extend your file up here--> | |
{% block head-title %} | |
Your title | |
{% endblock %} | |
<!--insert your body content code down here--> |
OlderNewer