Skip to content
Snippets Groups Projects
Commit bc005fbb authored by Steffen Knapp's avatar Steffen Knapp
Browse files

added very simple pos tagger (postagger.py)

parent 2b6c4d1d
No related branches found
No related tags found
No related merge requests found
File added
import nltk
from nltk.tokenize import word_tokenize
from corpus import read_corpus
corpus = read_corpus("corpus.csv")
tagged_corpus = []
# for debugging purposes. if you're sure it's worth it, use
# for i in range(len(corpus)):
for i in range (9):
tagged_corpus.append(nltk.pos_tag(word_tokenize(str(corpus[i]['REVIEW']))))
print (tagged_corpus)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment