Upgrade to our Diamond service and we will build you your own app for Android or iOS
Bot Libre Dev

Is there any tool that generates pattern based on the key words

by sreekar posted Jul 4 2017, 7:06

Hi Admin,

I want to generate patterns based on the key words i tried but i can't , is there any code or tool to generate patterns based on the key words please let me know if any such tools or code that helps me.

and also can i know how to remove dot (.) at the end of the response in the code.

Thanks,

Sreekar C


by admin posted Jul 4 2017, 13:46
You can use response lists for keyword responses.

Question
Response
keywords: keyword1 keyword2

See,
https://www.botlibre.com/forum-post?id=483549


For an AIML or Self pattern that evaluates keywords you can use a simple wildcard pattern,

In Self,

Pattern("^ [keyword1 keyword2] ^")

In AIML,

<pattern>^ [keyword1 keyword2] ^</pattern>

Updated: Jul 4 2017, 13:47
Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 2412, today: 0, week: 0, month: 25

by sreekar posted Jul 4 2017, 15:30
Thank you admin,

If my key words are not unique or it is duplicate then what can i do

For example:

 
  • keyword *  
and i have one more pattern
 
  • keyword (keyword) *
In this case my pattern will be always matching first one.even though my question matches second pattern in this type of situation what should i do

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 2281, today: 0, week: 0, month: 21

by sreekar posted Jul 4 2017, 15:42
In AIML,

 
  • keyword *
     
  • (example) keyword *
If my question is related to pattern 2 but my pattern is getting matched to pattern 1 only.

I tried

 
  • [example] keyword * this type also but its not working for me
PlZ help me


Also tell me how i can generate aiml pattern if i have more than two keyword ie; keyword 1, keyword 2, keyword 3

These keyword can be placed in different positions in my pattern can you explain me more about this.


Also let me know is there any java code or script to generate different aiml patterns with multiple keywords in multiple combinations


Thanks in advance 😊

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 2452, today: 1, week: 1, month: 23

by admin posted Jul 4 2017, 17:03
If you have two patterns that match the same question then the pattern matching the first word will be used.

AIML is not very good for supporting keywords, I would recommend a response list instead.

For AIML for multiple keywords you can either use multiple categories, or use,

<pattern>^ [keyword1 keyword2 keyword3] ^</pattern>

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 2423, today: 1, week: 1, month: 24

Id: 18194220
Posted: Jul 4 2017, 7:06
Updated: Jul 4 2017, 13:43
Replies: 4
Views: 2445, today: 1, week: 1, month: 38
0 0 0.0/5