hello rasa community !
I 'm adding a sentiment analytics to my chatbot , I did the same thing as this tutoriel
but i’m getting this error !!
Exception: Failed to find component class for ‘sentiment.MySentimentAnalyzer’. Unknown component name. Check your configured pipeline and make sure the mentioned component is not misspelled. If you are creating your own component, make sure it is either listed as part of the component_classes in rasa.nlu.registry.py or is a proper name of a class in a module.
You will need to go to your python site-packages/rasa/nlu and edit the rasa.nlu.registry.py file.
For custom Component, you will need to go to the package file in your python environment.
put sentiment.py (custom) file under nlu folder
Import the class to registry,py
sample:
from rasa.nlu.sentiment import SentimentAnalyzer
if typing.TYPE_CHECKING:
from rasa.nlu.components import Component
from rasa.nlu.config import RasaNLUModelConfig, RasaNLUModelConfig
logger = logging.getLogger(__name__)
# Classes of all known components. If a new component should be added,
# its class name should be listed here.
component_classes = [
# utils
SpacyNLP,
MitieNLP,
# tokenizers
MitieTokenizer,
SpacyTokenizer,
WhitespaceTokenizer,
JiebaTokenizer,
# sentiment
SentimentAnalyzer,
# extractors
SpacyEntityExtractor,
MitieEntityExtractor,
CRFEntityExtractor,
DucklingHTTPExtractor,
EntitySynonymMapper,
# featurizers
SpacyFeaturizer,
MitieFeaturizer,
NGramFeaturizer,
RegexFeaturizer,
CountVectorsFeaturizer,
# classifiers
SklearnIntentClassifier,
MitieIntentClassifier,
KeywordIntentClassifier,
EmbeddingIntentClassifier,
]