Implementing Bi-directional LSTM-CRF Network

Samik picture Samik · Oct 12, 2015 · Viewed 11.3k times · Source

I need to implement a bidirectional LSTM network with a CRF layer at the end. Specifically the model presented in this paper, and train it.

http://www.aclweb.org/anthology/P15-1109

I want to implement it in Python preferably. Can anyone present some libraries or sample code as to how this can be done. I looked at PyBrain but couldn't really understand it.

I'm also open to tool-kits in other programming languages.

Answer

Franck Dernoncourt picture Franck Dernoncourt · Mar 18, 2017

Here is an implementation of a bi-directional LSTM + CRF Network in TensorFlow: https://github.com/Franck-Dernoncourt/NeuroNER (works on Linux/Mac/Windows).

It gives state-of-the-art results on named-entity recognition datasets.

ANN architecture (it also uses character embeddings):

enter image description here

As viewed in TensorBoard:

enter image description here

You can also visualize the word embeddings:

enter image description here