Skip to content

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

License

Notifications You must be signed in to change notification settings

mrahtz/tensorflow-pos-tagger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages