I am trying to create a custom component class for sentimental analysis using the steps mentioned in this link.
I have done every steps mentioned there correctly, but when I try to train my bot this error is occurring.
ComponentNotFoundException: Failed to load the component 'sentiment.SentimentAnalyzer'. Failed to find module 'sentiment'. 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 "/home/dumin/.local/lib/python3.6/site-packages/rasa/nlu/registry.py", line 121, in get_component_class return rasa.shared.utils.common.class_from_module_path(component_name) File "/home/dumin/.local/lib/python3.6/site-packages/rasa/shared/utils/common.py", line 37, in class_from_module_path m = importlib.import_module(module_name) File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 994, in _gcd_import File "<frozen importlib._bootstrap>", line 971, in _find_and_load File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 665, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 678, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/home/dumin/.local/lib/python3.6/site-packages/sentiment/__init__.py", line 9, in <module> from util.summarize import Summarize ModuleNotFoundError: No module named 'util'
I also intalled python utils package [pip install python-utils] but the same error is still occurring. can someone tell me how to solve this please??
nlu file nlu.txt (235 Bytes)
and I have included my labels for intents into the labels.txt like this
- intent: feedback
pos pos neu neu neg neg