I am using contains-keywords and I know it handles stemming and lemmatization, however, when I want to repeat back that keyword would it be possible to return the root word? So if the contains-keyword is “walk” and user says “walking” how will I be able to return the root word “walk” instead of “walking”? Do I need to write a custom function for this?
Hi @angelica_t,
That’s a great question. You can use our lemmatize
function to achieve this. Here’s how:
- Assume you have the contains-keyword list already. Go to your response, and select adding a function. Because currently
lemmatize
function is not exposed (we plan to expose more function soon), you will need to add it as an external function.
- Inside the external function, put “lemmatize” as the name
- Add the contain-keyword attribute as the argument.
- Click “Add”. Now, in the chat, the response will lemmatize the captured user keyword content.
Let us know if you have any questions.
1 Like
Hi @wchen, what are these functions you plan on exposing soon? I’m wondering if those could be a great use for our chatbot. Thanks!
Hi @angelica_t,
While we haven’t exposed new functions in the UI, we have just updated our available function lists in our documentation (https://juji.io/docs/function/). You can use those functions the same way as the lemmatize
function or use them directly inside the REP script.
Let us know if you have any questions.