Hi Rasa Community,
I am currently developing a custom component for sentimental analysis. What I want is after the user input is classified by the pretrained model, the slot of the predicted label could be set to true. Like this:
User input: “I am feeling excited today!” → Slot: {“excitement”: True}
According to this post, it seems like I have to store the label in an entity first, so I did the following.
Then in the domain file, I set auto_fill of these slots to be True. So far the code is working properly and when I am in debug mode, the slot is actually set. But the problem is that the rasa test couldn’t run:
I got the test running by assigning zeros the starting position and ending position when I convert to rasa compatible format:
But the story test failed, and the error log is:
Here is the test_stories.yml:I think it is failing because of the random number I assigned to “start” and “end”. But as you can see in the above example, “excitement” is not a part of the sentence, so I couldn’t specify the values for “start” and “end”.
In summary, my main questions are:
- Is there any way to get around with it (e.g. setting specific numbers to “start” and “end”), so that I can pass rasa test?
- Is there any way to set slots in rasa NLU pipeline (before the core)?
Thanks for your help! Yinzhou