/tensorflow-pos-tagger

Part-of-speech tagger implemented using a feedforward network in TensorFlow

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

TensorFlow Part-of-Speech Tagger

Simple part-of-speech tagger implemented using a feedforward network in Tensorflow.

Done as a homework project for the Natural Language Understanding course at ETH Zurich, taught by Prof. Thomas Hofmann and Dr. Massimiliano Ciaramita. Code is based on a skeleton provided with the homework by Florian Schmidt.

Usage

First, train the model using train.py:

$ python3 train.py

Once you're happy with how well trained the model is, run demo.py, input a sentence, and see the model annotate it with Penn Treebank part-of-speech tags:

$ python3 demo.py
Enter a sentence to be annotated:
The Carterfone is a device invented by Thomas Carter

Loading saved vocabulary...
Generating tensors...
Your sentence, annotated:
The/DT Carterfone/NNP is/VBZ a/DT device/NN invented/VBN by/IN Thomas/NNP Carter/NNP