Обновление Platinum обслуживание и давайте строить свой бот для вас
Bugs and Features

General versus specific pattern matching.

по aazxcqwe опубликовано Jan 13 2015, 14:02

I have a general question, is there a way to override a general pattern with a specific pattern? For example, in the above could I have the bot return the input phrases by using 'show' in front of the same sentence. I can see both cases where the generic pattern should win and where the specific one should. Any thoughts or methods to deal with this?

State:FirstThisThenThat { pattern Pattern:"* then *" template Formula:"{srai (get #word from :star at 1)}, {srai (get #word from :star at 2)}"; pattern Pattern:"show first * then *" template Formula:"{get #word from :star at 1}, {get #word from :star at 2}";}


by admin posted Jan 13 2015, 14:18
The patterns are evaluated in the order they are specified. So if you put "show first * then *" first, it will take precedence.

You can also use patterns outside of scripts, as general learned responses. In which case the bot will pick the best matching pattern to the input, taking into account the input, topic, previous, and context.

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 631, today: 0, week: 1, month: 3

Идентификатор: 704670
Теги: patterns
Опубликовано: Jan 13 2015, 14:02
Ответы: 1
Вид: 656, сегодня: 1, неделю: 1, месяц: 5
Я уверен, что
Вывесить флаг как оскорбительное, или в нарушение правил сайта