All - Activity - Hajer - Rasa Community Forum

AttributeError: 'coroutine' object has no attribute 'handle_text'

Hi everyone, my problem is similar to yours but I have the error message : AgentNotReady:

Thank you very much

Hi, i implemented a pretrained model for sentiment analysis with vadersentiment.


def convert_to_rasa():
    entity = {"value": value,
              "confidence": confidence,
              "entity": "sentiment",
              "extractor": "sentiment_extractor"}

return entity…

@nik202 thank you, I will replace the code of sentiment.py by the code of new custom action. I think it will be more logical. because now it’s not working about displaying sentiment of text

Thank you Nik202. I tried to do what you had tell to Fares. I run shell --debug and I have this in my screen :

021-12-21 16:21:36 DEBUG h5py._conv - Creating converter from 7 to 5
2021-12-21 16:21:36 DEBUG h5py._conv - Creating converter from 5 to 7

it wasn’t but when I put sentiment.py in action folder, it gives me the same error.

ImportError: Cannot retrieve class from path sentiment.SentimentIntensityAnalyzer. I have this error now :’( I have a file named sentiment.py when I put a SentimentIntensityAnalyzer class inside. Normally it’s okay no?

when I run my code, I got this message :

GraphSchemaValidationException: Your model uses a graph component ‘SentimentAnalyzer’ which does not have the required method ‘provide’. Please make sure you’re either using the right component or that your component is registered with the correct component type.

I did:

import nltk
from nltk.sentiment.vader import SentimentIntensityAnalyzer

I put the two code in one code. I hope it’s okay now.

Yes okay

from __future__ import annotations
from typing import Dict, Text, Any
from rasa.engine.graph import GraphComponent, ExecutionContext
from rasa.engine.storage.resource import Resource
from rasa.engine.storage.storage import ModelStorage

Graph component is here to connect a new node with other components. In graphcomponent class, I put :

from nltk.sentiment.vader import SentimentIntensityAnalyzer

In sentiment.py I don’t know how to call SentimentIntensityAnalyzer… do I have to put from rasa.models import SentimentIntensityAnalyzer ?…

Thank you Nik202 but the version of rasa is 2 not 3. I already read it.

Hi, i am using Rasa 3 but i didn’t manage to implement a sentiment analysis vader sentiment. I didn’t understand how it works … Is it possible to have a tutorial detailed about it? How to use graph component. How to find the way to put from something import SentimentAnalyzer ? Thank you for all you…

Hello everyone, I wish you all a happy new year. I have a problem In my training set, I have two sections of intent and name’s entity. The name entity when it is in one of the sections led to the recognition of intent of a new message …

Hello Rasa community, I am working with entity groups and I am face to a scenario when an entity can be part on two groups. But how can I do to train the NLU correctly? Can I do like that :

I want to buy a [mobile]{"entity" : "type", "group":"informatics", "group":"Little_Furnitures" }

Thank you I…

Hello @Tanja, it’s finally work for me For now, it’s ok. If I have any problem I will open a new thread about it. Thank you very much.

Thank you, I modified my .md files but the NLU doesn’t seem to recognize the group. I modified my files like that :

intent: infos
I bought 145 [apples]{"entity": "type_food", "group": "Fruits"}
I want to buy [minced meat]{"entity": "type_food", "group": "Meat"}

Hello Tanja, I need to use group entities … but it works only for the version 1.10.0 or even for a new version? Thank you.

Yes I know that. I will try something else … But in my case, RegexFeaturizer don’t seem to help DietClassifier … It is not working at all… I will try something else … Thank you.

My pipeline is like that :

language: "fr"
pipeline:
  - name: WhitespaceTokenizer
  - name: RegexFeaturizer
    use_regexes: True
  - name: RegexEntityExtractor
  - name: LexicalSyntacticFeaturizer
  - name: CountVectorsFeaturizer
  - name: CountVectorsFeaturizer
    analyzer: "char_wb"
    min_ngram: 1
    max_ngram: 4
  - name: DIETClassifier

Yes, I notice that if a regex number is only 6 digits named (prod)… and despite I add 20 examples of number with 6 digits, the DietClassifier recognizes two digits like the entity (prod) … I will try to add more examples. I hope it will work.

Hello, I have a question : Can we force an entity to be recognized only by regexentityextractor and not by DietClassifier? Thank you for your help.

Thank you, I am working on it. It 's already better. I am using this one now :

language: "fr"
pipeline:
  - name: WhitespaceTokenizer
  - name: RegexFeaturizer
    use_regexes: True
  - name: CRFEntityExtractor
  - name: LexicalSyntacticFeaturizer
  - name: EntitySynonymMapper
  - name: CountVectorsFeaturizer
  - name: CountVectorsFeaturizer
    analyzer: "char_wb"
    min_ngram: 1
    max_ngram: 4

Hi, I am using RASA NLU in my work recently. My subject is to classify email on two intents and a lots of entities like name of person, account number, membership number, phone number. I have tried a lot of configuration of the pipeline but I couldn’t find the pipeline that succeeds in extracting these entities.