Search code examples
tensorflowspacyrasa-nlu

Rasa NLU: Tensorflow embedding with entity extraction


Tensorflow embedding has a very good intent recogition.

In my experience it improved test results from about 45% confidence to 95% for simple inputs such as "Hello" compared to spacy.

But out of the box it does not have any entity extraction.

Is there any Pipeline configuration to solve this?


Solution

  • Config

    The configuration below contains ner_crf for entity extraction.

    language: "en"
    
    pipeline:
    - name: "tokenizer_whitespace"
    - name: "intent_entity_featurizer_regex"
    - name: "ner_crf"
    - name: "ner_synonyms"
    - name: "intent_featurizer_count_vectors"
    - name: "intent_classifier_tensorflow_embedding"
    

    Usage

    WebApi:

    curl --noproxy '*' -X POST --header 'content-type: application/x-yml' --data-binary @${RASA_FILE} --url "${RASA_YML}:5000/train?project=${PROJECT}&model=${MODELNAME}"
    

    The configuration is already contained within RASA_YML. docs

    Bash:

    python -m rasa_nlu.train -v --config ${CONFIG} --data ${RASA_MD} --path projects --project ${PROJECT} --fixed_model_name ${MODELNAME}
    

    Version

    Rasa NLU: >=0.13.0


    credit: github issue