17

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.

Samik
  • 390
  • 1
  • 3
  • 9

3 Answers3

9

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

Franck Dernoncourt
  • 77,520
  • 72
  • 342
  • 501
8

There's this implementation by Guillaume Lample from the paper "Neural Architectures for Named Entity Recognition" that you can use for starter.

Jim Geovedi
  • 321
  • 3
  • 8
2

It's been a while since you asked, but now I would suggest to use anago. Anago is built in Keras and you can see the source code if you need to cutomize the architecture. https://github.com/Hironsan/anago

Ismael
  • 733
  • 6
  • 15