Skip to content

renero/bilstm_crf

Repository files navigation

BI-LSTM with CRF (Conditional Random Field)

Implementation of a generic and well-known architecture based on bi-directional LSTM with CRF for sequence tagging.

To correctly count on CRF layer, please refer to this page to know how to use it from Keras, and this other one to install Keras-Contrib package. The package may not work with your version of Keras due to a broken compatibility from Keras 2.2.1 that can be solved by using the recommendations on this page.

All this work is based on the original ideas exposed in original paper by Buillaume Lample.

From using the external CRF layer, there're some issues when saving and loading the model, all of them addressed in this page.

The final intention is to build a system that resembles very much the achieved by the anago system which uses bidirectional LSTMs with CRF.

Note: It would be interesting to know more about the NLU capabilities shown in this repo as it introduces a nice combination of slot_filling and intent detection, together with sequence tagging as in this example:

query: i want a first class flight to los angeles
slots:
{'class_type': 'first class', 'toloc.city_name': 'los angeles'}
intent: atis_flight

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published