I’m a student currently working on my master’s degree at KULeuven, developing a chatbot application for an internship partner.
I’ve tried to get my NLU+Core running in Docker and finally have it up and running and answering to requests, however…
I am running into quite some error due to me using Dutch language in SpaCy and I am unable to solve it.
I am using this docker compose file:
version: ‘3.0’
in the command section of the NLU service, the CLI returns next notification after docker-compose up:
Question is: Is there any way to actually get it to correctly parse my Dutch requests?
How can I solve the problem that it cannot parse text through the ‘nl’ pipeline?
unzip and save it in the folder(./language_models/nl) - make sure that the root folder contains vectors/parser and taggers and they are placed right after the nl folder.
in your rasa_nlu config file - instead of the language code(nl/fr/de) use the path - language_models/nl
yeah you will need to map your config file for nlu instead of relying on defaults
your config could look like this:
language: "language_models/nl"
pipeline:
# all components will use their default values
- name: "ner_duckling_http"
locale: "nl_Nothing"
url: "http://duckling:8000"
- name: "intent_featurizer_count_vectors"
- name: "intent_classifier_tensorflow_embedding"
Thank you for the fast reply, I’ve implemented your solution and have tried running everything again.
I quickly noticed I had to rerun the NLU training command, which I do like this:
Elmer@Elmer-HP MINGW64 ~/Documents/KULeuven/Masterproef_Project/project
$ docker run -v $(pwd):/app/project -v $(pwd)/models/:/app/models -v $(pwd)/lan
guage_models:/app/language_models rasa/rasa_nlu:latest-spacy run /app/project/i
nitprobeersel.sh
The contents of the initprobeersel.sh file are as follows:
in my solution, you have to download the model manually and then place it in the folder mentioned instead. if you download the model as above, like you have mentioned, you are downloading it as a module which would save the model in site-packages in pypi. you don’t need to do that
for the error, it seems there is an error with loading the model with correct shape which could be linked to the compatibility of the model with the correct version of spaCy. can you check which version of spaCy you are running?
My apologies, I forgot to mention the above lines you quoted are commented, hence they are not being run.
I’ve followed the lines you recommended and left out the spacy download lines in the init file.
It only contains the line:
python -m rasa_nlu.train -c /app/project/nlu_config.yml -d /app/project/nlu.md -o models --project current
The spacy archive has been downloaded and manually located as I mentioned in my previous answer.