Rasa NLU Config File

Hi Folks,

I am new to RASA NLU, Can I use spacy_sklearn for intent classification and for extracting the dates as entity using duckling.

If ‘yes’ then kindly help me, how to mention these in the config file ( pipeline section )

Thanks,

Neel

Yes you can, please have a look at the docs here: http://rasa.com/docs/nlu/master/pipeline/

Thanks for the response @akelad. I have read the document, but my doubt is whether the duckling can be only used for extracting the dates and time in the conversation rather than spacy. While other entities could be extracted using the spacy only!

Kindly show an example of config file like:

pipeline:

  • name: “nlp_spacy”
  • name: “ner_crf”
  • name: “ner_synonyms”

Will it be possible to add duckling along with the “ner_crf” and specifying that it should only extract date and time entity.

Kindly help.

Thanks in advance, Neel

@neel17 Yes you can specify that

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"
  intent_tokenization_flag: true
  intent_split_symbol: "+"
- name: "ner_duckling_http"
  url: "http://duckling:8000"
  dimensions: ["time"] 

So instead of using ner_duckling, I would strongly suggest using ner_duckling_http. check the installation steps for duckling here

I am not sure if duckling has a separate date dimension but it sure has a time dimension that you can specify but make sure the name of your CRF entity is not time, otherwise you will have two results that could be confusing for your slot filling. and for duckling you don’t need to label the entities. It does not have any impact on the model.

1 Like

We’ve actually changed the docs to be ner_duckling_http now too! http://rasa.com/docs/nlu/pipeline/#ner-duckling-http

1 Like

Hi Souvik,

Thaks for the reply. I have trying to install the duckling on my windows 10 machine but facing terible issue with the pcre. I have asked the question on stackoverflow as well but there is now help as such. I have been trying for a long time for the installation itself. Kindly help if possible.

oh, sorry I don’t work on windows myself :frowning:

I am totally stuck with duckling! I need to process the time from my entities like " last day" ," last year" , " yesterday" etc. I thought duckling could be the best to transform them into proper date and then I would use the dates to extract the data using SQL query. Kindly help in some way!!!

You can’t host duckling in docker?

I am on Windows Home edition and docker support only Windows Pro :frowning:

I am on the last stage of duckling installation, it has reached to the stage where it needs only pcre as C package!

Did you try what they are saying about installing the dev version?

If windows is your problem then use a remote server somewhere. AWS has free-tier or Heroku though I am not sure if Heroku free edition will give you the memory you need to run duckling. You could host it remote or install a virtual machine on your windows.

PCRE issues are really frequent, I faced on my Mac as well but luckily found the solution that worked. Not the same error though

I am unable to resolve that part " dev version" !! Could not find proper solution anywhere.

Even I am thinking of using a remote server!!!

While installing duckling through this command pip install rasa_nlu[duckling] I am getting this error.

ipaserver 4.5.0 requires pyldap>=2.4.15, which is not installed. ipapython 4.5.0 requires pyldap>=2.4.15, which is not installed. ipaserver 4.5.0 has requirement dnspython>=1.15, but you’ll have dnspython 1.12.0 which is incompatible. klein 17.10.0 has requirement Twisted>=15.5, but you’ll have twisted 18.4.0rc1 which is incompatible. rtslib-fb 2.1.63 has requirement pyudev>=0.16.1, but you’ll have pyudev 0.15 which is incompatible. ipapython 4.5.0 has requirement dnspython>=1.15, but you’ll have dnspython 1.12.0 which is incompatible. Installing collected packages: pyparsing, numpy, kiwisolver, matplotlib, urllib3, chardet, certifi, requests, packaging, monotonic, humanfriendly, coloredlogs, functools32, jsonschema, jmespath, futures, docutils, botocore, s3transfer, boto3, klein, cloudpickle, greenlet, gevent, scipy, scikit-learn, typing, simplejson, tqdm, rasa-nlu Found existing installation: pyparsing 1.5.6 Cannot uninstall ‘pyparsing’. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

I already installed pyldap to its recent version by yum install python-ldap in Cent-OS 7.

I want build chatbot with rasa but is not cofertable with current version How can run preverius versiojn and build chatbot

Can give a try with virtual environment. Install the rasa version which is suitable for you in a virtual environment and spin it from there.

Hope it helps!