RasaHQ / rasa

💬 Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants
https://rasa.com/docs/rasa/
Apache License 2.0
18.94k stars 4.64k forks source link

Create pipeline for training spacy2 NER #836

Closed r-wheeler closed 5 years ago

r-wheeler commented 6 years ago

Currently evaluating different algorithms for NER based tasks including crf, rnn+ctf, and spaCy 2.0 cnn NER. It was pretty straight forward to convert rasa training data into BILOU tags for spacy CLI training.

Any thoughts on implementing (along with PhraseMatcher) and a few other spacy2 goodness into rasa? Has the performance of crfsuite been benchmarked against spacy2 for NER related tasks?

As spaCy 2 also has multi objective classification abilities that share cnn tensors this may also bridge the current lack of shared features and objectives across intent classification and ner pipelines

tmbo commented 6 years ago

Very good ideas and a lot of valuable input. There is an open PR for the spacy NER feature as well as a phrase matcher PR (not using spacy matching though).

The combined features do sound interesting, /cc @amn41

r-wheeler commented 6 years ago

Hi Alan, long time no talk.

Other thoughts are more transfer learning oriented feature share (share bi-lstm) states as features from one optimization to another, but isn't exactly a one sized fits all solution and results are mostly dramatically under or overfitting without domain expertise and rich datasets. A former colleagues trick was to use every lstm state output and after training (for say an ner task) , stack GBDT as the activation function for multiclass objective (intent) on the states. Fun stuff

amn41 commented 5 years ago

closing this for now- may revisit this topic again in the future

dpny518 commented 5 years ago

@r-wheeler do you have your code training a custom spacy ner based on rasa data?