Skip to content

Commit af90b95

Browse files
committed
Added url to docs
1 parent d4ebaee commit af90b95

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

subject_extraction/subject_extraction.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
stop = stopwords.words('english')
99

1010
# Noun Part of Speech Tags used by NLTK
11+
# More can be found here
12+
# http://www.winwaed.com/blog/2011/11/08/part-of-speech-tags/
1113
NOUNS = ['NN', 'NNS', 'NNP', 'NNPS']
1214
VERBS = ['VB', 'VBG', 'VBD', 'VBN', 'VBP', 'VBZ']
1315

@@ -150,9 +152,10 @@ def get_svo(sentence, subject):
150152
return {}
151153

152154
if __name__ == '__main__':
153-
url = ''
155+
url = 'http://www.nytimes.com/2016/06/13/us/politics/bernie-sanders-campaign.html?hp&action=click&pgtype=Homepage&clickSource=story-heading&module=first-column-region&region=top-news&WT.nav=top-news'
154156
document = download_document(url)
155157
# document = pickle.load(open('document.pkl', 'rb'))
158+
print document
156159
document = clean_document(document)
157160
subject = extract_subject(document)
158161
print subject

0 commit comments

Comments
 (0)