HI , I want to use Duckling for date entity extraction. I cant install docker as my windows VM does not support the hardware requirements. I’m struggling with the installation. Can someone please help ?
hi @jmendez48 - do you have an error message you can share? What exactly is going wrong with the installation? (also might be worth checking the duckling repo in case someone else has had the same issue
Hi @amn41 , Sorry for the late reply. When i run rasa train, I get the following: ComponentNotFoundException: Failed to load the component ‘ner_duckling_http’. Cannot find class ‘ner_duckling_http’ in global namespace. Please check that there is no typo in the class name and that you have imported the class into the global namespace. Either your pipeline configuration contains an error or the module you are trying to import is broken (e.g. the module is trying to import a package that is not installed). Traceback (most recent call last): File “e:\thesis\omp_chatbot\rasa_venv\lib\site-packages\rasa\nlu\registry.py”, line 121, in get_component_class return rasa.shared.utils.common.class_from_module_path(component_name) File “e:\thesis\omp_chatbot\rasa_venv\lib\site-packages\rasa\shared\utils\common.py”, line 33, in class_from_module_path raise ImportError(f"Cannot retrieve class from path {module_path}.") ImportError: Cannot retrieve class from path ner_duckling_http.
I managed to install duckling, when i start the the example i get: PS E:\Thesis\Software\Installation\duckling-0.2.0.0> stack exec duckling-example-exe no port specified, defaulting to port 8000 Listening on http://0.0.0.0:8000
My Rasa pipeline is as follows: pipeline:
-
name: SpacyNLP model: “en_core_web_md”
-
name: SpacyTokenizer
-
name: SpacyEntityExtractor
-
name: “ner_duckling_http” url: “http://localhost:8000” dimensions: [“time”, “number”] locale: “en_GB” timezone: “Europe/Brussels”
-
name: SpacyFeaturizer pooling: mean
-
name: RegexFeaturizer
-
name: LexicalSyntacticFeaturizer
-
name: CountVectorsFeaturizer
-
name: CountVectorsFeaturizer analyzer: char_wb min_ngram: 1 max_ngram: 4
-
name: DIETClassifier epochs: 100
-
name: EntitySynonymMapper
-
name: ResponseSelector epochs: 100
hi @jmendez48 - so you’re running duckling as a separate server process on your machine, which is great, and looks like you’re pointing to it (localhost:8000
) in your config.yml. Are you still getting an error? what is the error?
HI @amn41 , Sorry for the late reply. The error I get when I do rasa train: ComponentNotFoundException: Failed to load the component ‘ner_duckling_http’. Cannot find class ‘ner_duckling_http’ in global namespace. Please check that there is no typo in the class name and that you have imported the class into the global namespace. Either your pipeline configuration contains an error or the module you are trying to import is broken (e.g. the module is trying to import a package that is not installed). Traceback (most recent call last): File “e:\thesis\omp_chatbot\rasa_venv\lib\site-packages\rasa\nlu\registry.py”, line 121, in get_component_class return rasa.shared.utils.common.class_from_module_path(component_name) File “e:\thesis\omp_chatbot\rasa_venv\lib\site-packages\rasa\shared\utils\common.py”, line 33, in class_from_module_path raise ImportError(f"Cannot retrieve class from path {module_path}.") ImportError: Cannot retrieve class from path ner_duckling_http.
Huge shoutout to @souvikg10 I had named the duckling component wrongly on my pipeline. The final corrected pipeline is as follows.
language: en
pipeline:
-
name: SpacyNLP
model: “en_core_web_md”
-
name: SpacyTokenizer
-
name: SpacyEntityExtractor
-
name: DucklingEntityExtractor
url: “http://localhost:8000”
dimensions: [“time”, “number”, “amount-of-money”, “distance”]
locale: “en_GB”
timezone: “Europe/Brussels”
-
name: SpacyFeaturizer
pooling: mean
-
name: RegexFeaturizer
-
name: LexicalSyntacticFeaturizer
-
name: CountVectorsFeaturizer
-
name: CountVectorsFeaturizer
analyzer: char_wb
min_ngram: 1
max_ngram: 4
-
name: DIETClassifier
epochs: 100
-
name: EntitySynonymMapper
-
name: ResponseSelector
epochs: 100
hi i got this problem when i execute stack exec duckling-example-exe duckling-example-exe.EXE: /etc/zoneinfo/: getDirectoryContents:findFirstFile: does not exist (Le chemin daccSs sp,cifi, est introuvable.) @koaning Please can someone help i installed stack and duckling
Ah I don’t know if it’s easy to get Duckling working without docker. It’s based on Haskell and I don’t know how well it performs on Windows.
Another alternative is to host the Docker container on the internet. Just pass the url of the hosted container in your config.yml and it should work.