SangramMCP
Posts: 57
Joined: Wed Jul 26, 2017 7:41 pm

Custom Recognizers

Wed Aug 30, 2017 9:04 pm

enum PriorityTypes
{

[Synonyms("I","1")]
first,

[Synonyms("II","2")]
second,

[Synonyms("III","3")]
third,

[Synonyms("IV", "4")]
four
}
public static void CreateFloorRecognizer(OscovaBot oscovaBot)
{
var FloorRecognizer = oscovaBot.CreateRecognizer("floor-name");
FloorRecognizer.Entries.Add(PriorityTypes.first.ToString());
FloorRecognizer.Entries.Add(PriorityTypes.second.ToString());
FloorRecognizer.Entries.Add(PriorityTypes.third.ToString());
FloorRecognizer.Entries.Add(PriorityTypes.four.ToString());
}

Is this kind of recognizers possible, where it can accept synomns as well?

JeffersonStack
Pro
Posts: 44
Joined: Fri Apr 05, 2013 1:20 am

Re: Custom Recognizers

Thu Aug 31, 2017 10:43 am

just use

CSharp Code

oscovaBot.CreateRecognizer<PriorityTypes>("floor-name");
and ur done.

SangramMCP
Posts: 57
Joined: Wed Jul 26, 2017 7:41 pm

Re: Custom Recognizers

Thu Sep 14, 2017 9:25 pm

Hi,

How to compare a dynamic value to the existing entity?
For eg:

I will fetch value from Environment variable, and compare the same with entity. If the entity and the value in the environment variable matches, the context should change. Otherwise it should prompt that the entity is not valid.

Is it possible?

User avatar
Sreejith
Help & Support
Posts: 20
Joined: Sat Apr 06, 2013 6:16 pm

Re: Custom Recognizers

Fri Sep 15, 2017 2:31 am

sorry i don't understand ur question...how and where are u comparing entity and environment variable?

also I dont understand what u mean that the entity is invalid? if the user does not enter the desired text then why not use fallback...is there any reason u are not using conditional contexts as mentioned in the developer network?
If your experiment needs statistics, you ought to have done a better experiment - Ernest Rutherford

SangramMCP
Posts: 57
Joined: Wed Jul 26, 2017 7:41 pm

Re: Custom Recognizers

Fri Sep 15, 2017 4:40 pm

Hi,

We have a requirement like this:

1. The bot is hosted in a Intranet environment.
2. The user is authenticated with his windows credentials.
3. The chat bot is used to raise tickets.
4. The user has 2 options: Either he can raise a ticket on his behalf or on behalf of someone else.
5. The chat bot will check the credentials used, and ask if he wants to ask ticket for himself, or for someone else.
6. If he wants for some behalf, the bot will ask for the other person credentials, and then the ticket will be raised.


I need to achieve this.

Thanks,
Sangram

veeramani.ramu
Posts: 1
Joined: Fri Sep 15, 2017 8:36 pm

OscovaBot Evaluate issue

Fri Sep 15, 2017 8:55 pm

Hi,

Am getting "Object reference not set to an instance of an object", when passing "******* applied ****" string in OscovaBot.Evaluate(inputmessage). Below are the StackTrace result.

at Syn.Bot.Oscova.Collections.TokenCollection.Contains(String value)
at Syn.Bot.Oscova.Internal.ScoreEngine.GetIntentResult(Request request, EntityCollection entityCollection, ExpressionInfo expressionInfo)
at Syn.Bot.Oscova.OscovaBot.Evaluate(Request request)
at Syn.Bot.Oscova.OscovaBot.Evaluate(String message)
at IconnectOscavaBot.Chat.MyMethod(String inputmessage, String id, String gid) in
*******************\Chat.aspx.cs:line 313

Can you please help to solve this issue.

User avatar
Sreejith
Help & Support
Posts: 20
Joined: Sat Apr 06, 2013 6:16 pm

Re: Custom Recognizers

Sat Sep 16, 2017 12:29 am

to Sangram,

that is a classic example for soa bot system...in this case u can host ur bot as a web api service and pass the credential and chat message thru url...if ur not familiar with web api service creation you can go ahead and use the WebApiChannel in Syn.Bot.Channels framework...but remember that unlike syn bot framework...the syn bot channels framework is in beta and is updated regularly with breaking changes.

to veeramani,

I tested ur code here in my console program and it is working with the ******* applied **** string and is not giving any errors...also can u tell me why ur using asterisk character in the request?

since this is a topic opened by Sangram...can u create a new topic in general discussion by clickin the new topic button and make a post with more details so I can help you without mixing my posts with Sangram's posts
If your experiment needs statistics, you ought to have done a better experiment - Ernest Rutherford

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 0 guests