SentimentAnalyzer.py (7.2 KB)
Hello! I’m developing the SentimentAnalyzer component with a lexicon-based approach but I’m having problems.
- It is not clear to me how the components of the pipeline exchange messages. I would like my component to receive a tokenized text (if a POS component existed, even if already tagged) and I can not manage this. In the pipeline chain, should my component be preceded by a component that outputs a tokenized text? if this is true which component?
- the output of my component is a pair (string, float) representing the polarity of the text, placing my component last in the pipeline chain how do I view the final result of the computation?
(The future library is missing from the code due to an upload error.)
This is my pipeline chain:
pipeline: name:“nlp_spacy” name:“tokenizer_spacy” name:“SentimentAnalyzer.SentimentAnalyzer”