Welcome to Etherpad!

This pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!

Get involved with Etherpad at http://etherpad.org
# Generator http://pad.constantvzw.org/p/writing_with_film_generator

from pattern.en import parse, pprint, tag, tokenize, tag, parsetree
from argparse import ArgumentParser

p = ArgumentParser("This parser translates a sentences into a list of word-tags.")
p.add_argument("--text", default=None, help="the input text, a sentence, written in between quotes.")
args = p.parse_args()

# Loading a document from a text file:
if args.text == None:
        args.text = "I eat pizza with a fork."

sentencePosTags = []

for word, pos in tag(args.text):
        sentencePosTags.append(pos)

print args.text
print sentencePosTags



--------------------------------------------
run sentence-parser.py: 

>>> python sentence-pos-tag-parser.py --text "hello this is me from Brussels."

prints: