Знаете ли вы, бот Либре также предоставляет бесплатное размещение отслеживания проблем для вашего собственного сайта или мобильное приложение?
Self, AIML, and scripting : Dealing with sets in AIML on botlibre

RE: Dealing with sets in AIML on botlibre

по admin опубликовано Feb 25 2017, 7:24

If you define all of the bot's responses with one of these keywords, then the bot will use its default response for any off topic question. You can have your default response respond however you wish, or not respond at all using the following template,

Template("")

For a script, if you want to check if the users input has any of your words, you would need to tag all of these words in the bot's knowledgebase.

If you had already set them all as keywords in your responses, then they will already be tagged with #keyword.

To check if a sentence has any keywords in a Self script use,

var hasKeyword = false; for (word in sentence.word) { if (word.has(#instantiation, #keyword)) { hasKeyword = true; break; } }


You can create a JSON file to tag your keywords,

[ {#data:"security",instantiation:#keyword} {#data:"hackers",instantiation:#keyword} ]


Идентификатор: 15590631
Опубликовано: Feb 25 2017, 7:24
Обновлено: Feb 25 2017, 7:26
Ответы: 0
Вид: 513, сегодня: 1, неделю: 1, месяц: 10
Я уверен, что
Вывесить флаг как оскорбительное, или в нарушение правил сайта