-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Rasa Entities Roles and Groups #48
Comments
Hi :) Thanks for your kind message I don't currently have plans to support the entities roles and groups in the near future, as there are other things of higher priority on my todo list and I don't have as much time to work on this as I used to. I hope this isn't too much of an issue for you. I'll take a look at your yaml adapter on your repo as well. Have a good day! |
Hi, thank you for your reply. If I have time, I will take a look into it. Can you give me suggestion on what kind of symbol that can be used for entities roles and groups? Also, which part of the code that I should start looking into if I want to add this functionality? Cheers! |
Hi! Sorry about the late answer, I've been extremely busy for the past few days. As entity roles and groups are related to entities, I'd say we could put the information about roles and groups within parentheses placed after the entity (e.g. Note that we can always change symbols before we merge changes. To implement this kind of feature, you'll need to do 3 things:
This is quite a big task that requires a quite deep understanding of the current code, so feel free to ask for help if you try this out! Sorry again for the late answer. |
Hi, I've been busy so I just started looking into this improvement recently. I think I've found on a way on how to do it, but I need advice on adding the entity roles/groups to the
I think the entity role and group cannot be stored inside Based on above, I'm thinking of adding role/group pattern inside intent's sentence pattern, for example:
As you can see, there can be an annotation pattern right after entity reference pattern. I've added this to the rule in my repository right here. As a result of adding it outside the entity reference, I will need to change something around here to separate the
Hope to hear something from you soon! |
Hello, Sorry for the late answer. I'm glad you are interested in implementing this! About the fact that roles and groups cannot be stored in We could even add a way to declare which values for roles and groups are expected for a given intent (e.g. the role About where you want to make changes (and the code you already wrote), I think you are on the right track. Be careful when modifying the parser though, it is a central and complicated part of the system and is easy to get wrong: just be sure that the unit tests are still working after you made your changes. For the pattern, I'd go for For the error to be raised when there is a syntax error, I'd say a It definitely sounds good to me to make a new subclass of About Rasa's markdown format, I actually didn't know it was deprecated (I didn't check in a few months). I'd prefer to continue supporting it until it actually gets removed from Rasa's codebase entirely, so I think this should be implemented for the relevant adapter as well. That being said, I'm not sure Rasa itself supports roles/groups in the markdown format (I can't find anything about this in their documentation). If it turns out they don't, then of course we don't need to modify this adapter. That means the adapters that should be changed are:
I hope this clears it up for you and you are still enthusiastic about implementing this. |
Hello, I think I have almost finished the implementations of adding role/group to Chatette. As you said, I'm going with the pattern I've also created a new subclass of As for the Adapter, rasa (json) and jsonl adapter are automatically implemented after I added role and/or group into
If you notice, I also added the inline entity value (as requested here) for entities with synonyms for both markdown and yaml. The There are few things that I still need to do:
If you have any more suggestions, please tell me. Cheers! |
Hey! Props to you for implementing most of this so fast! About the fact that you can't raise an error if the annotation syntax is not correct, you are actually right. That being said, I don't see how we can easily detect that what is after a slot is an incorrect annotation. For instance, I assume those examples should raise a warning:
but this shouldn't
Did you have something in mind to avoid raising a warning for every slot that doesn't have an annotation? As I said above, if it turns out it's hard to detect that the user mistyped an annotation, it seems acceptable to me to not print any warning whatsoever. The way you made the changes to the parser is exactly how I would have done it :) Thanks for adding support for inline entities at the same time. If you think adding a few tests can help catching errors quickly, feel free to do it. I'm not aiming at 100% coverage, just enough coverage to catch big mistakes when refactoring. If you can, it would be nice to add a unit test that checks the parser is correctly parsing annotations for slots. Maybe a few tests for the new For the new dependency, you will need to add it in When you are done with the implementation, can you please open a pull request so I can review it more in depth and merge it? Cheers! |
Hello, thanks for your work. I've been using chatette until recently.
I want to know whether you have plan to support the new Rasa's entities roles and groups since it's quite important to have with the recent Rasa.
If you don't plan to do it in short term, I might be able to look at it, but the parser section of the code is quite difficult to understand for me compared to the adapter part.
I've also created a new yml adapter in preparation for Rasa 2.0 on my forked repo.
Thanks!
The text was updated successfully, but these errors were encountered: