Skip to content
Part-of-speech tagger implemented using a feedforward network in TensorFlow
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cache
checkpoints
data
logs
.gitignore
LICENSE
README.md
data_utils.py
demo.py
model.py
train.py

README.md

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
You can’t perform that action at this time.