royaltca
Pro
Posts: 33
Joined: Mon Mar 30, 2015 5:18 pm

Dynamic random word alternation in responses.

Tue Jun 23, 2015 3:35 am

I've got an idea. Please look at the code below.

SIML Code

<Model>
<Pattern>Do you like alcohol</Pattern>
<Response>No I don't like (drinks|alcohol|beer|vodka|wine).</Response>
</Model>
The code would do the following:

Code: Select all

User: Do you like alcohol?
Bot:No I don't like drinks.

User: Do you like alcohol?
Bot:No I don't like alcohol.

User: Do you like alcohol?
Bot:No I don't like beer.

User: Do you like alcohol?
Bot:No I don't like vodka.

User: Do you like alcohol?
Bot:No I don't like vine.
I know I can use Random with many Item tags, but what if I want randomize more words. Let's say:

SIML Code

<Response>(hello|hi) (user|guest) do you (need|look for) some (information|guide)?</Response>
As you can see doing this with Random&Item tags and getting all the combinations is little bit difficult. I think the idea is good, cuz when Bot uses many different words with the same(or close) sense, meaning it appears smarter. And that's all we want, isn't it?

User avatar
Leslie
Lead Software Architect
Posts: 377
Joined: Fri Sep 14, 2012 12:20 pm
Contact: Website

Re: Dynamic random word alternation in responses.

Wed Jun 24, 2015 7:39 am

Creating the aforementioned random syntax sequence directly within a Response would break scripting.

But I do like this suggestion and there is no constraint on usage of Random tag without any Item elements. So I guess I will try to check if we can incorporate something like the following.

SIML Code

<Response>
    <Random>(hello|hi) (user|guest) do you (need|look for) some (information|guide)?</Random>
</Response>
Whenever we add a new feature to Syn.Bot we run a lot of Tests to make sure none of the other features have been affected. For example we recently (version 1.1.5) enabled support for Ranged Wildcards only after the test results were successful. Though the feature existed since version 1.1.0

SIML Code

<Model>
  <Pattern>MY NAME IS *2</Pattern>
  <Response>
	<Match /> is a nice name.
  </Response>
</Model>

<Model>
  <Pattern>MY NAME IS *~3</Pattern>
  <Response>Good to know your name, <Match /></Response>
</Model>

Anyways, I personally like the suggested feature and will add something like it in Syn.Bot version 1.1.6

royaltca
Pro
Posts: 33
Joined: Mon Mar 30, 2015 5:18 pm

Re: Dynamic random word alternation in responses.

Wed Jun 24, 2015 1:59 pm

Or something like that to allow more freedom.

SIML Code

<Response>
<Random>
<Item>(hello|hi) (user|guest) do you (need|look for) some (information|guide)?</Item>
<Item>(yo|ey yo) (man|guy) do u need (sum|a bit of) (info|guide)?</Info>
</Random>
</Response>

Return to “Feature Request and Suggestions”

Who is online

Users browsing this forum: No registered users and 1 guest