Implementing Bi-directional LSTM-CRF Network
Asked Answered
B

3

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.

Burge answered 12/10, 2015 at 10:5 Comment(2)
Have you finish your work and submit it to the github?Chemosynthesis
github.com/chilynn/sequence-labelingChemosynthesis
F
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

Fuselage answered 18/3, 2017 at 2:11 Comment(2)
where is the CRF in this implementation??Sixty
@Matian2049 topmost layer in the ANN.Fuselage
P
8

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

Pepita answered 21/4, 2016 at 6:5 Comment(0)
D
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

Discriminate answered 14/12, 2017 at 23:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.