Catagorizing Expressions

Catagorizing Expressions

Postby SangramMCP » Mon Sep 04, 2017 6:25 pm

Hi,

I have a database, which has some 1 lakh records, that can be used as expression. From those 1 lakh records, I want to categorize entity as well as their relevant expression. Is there any way for doing the same in Synbot studio. or we have to apply ML into that.

because practically, its not possible to catagorize all the expression.

Thanks,
Sangram
SangramMCP
 
Posts: 47
Joined: Wed Jul 26, 2017 7:41 pm

Re: Catagorizing Expressions

Postby FranzZ » Mon Sep 04, 2017 8:09 pm

you can load unlimited number of expressions in Oscova but how many of the expressions have a particular intent assigned to them? Oscova's 2.6.0 (alpha is already available in NuGet) will always be using ML (as Rule and RuleAndML mode are replaced by Standard and Deep mode) so there is no need to set the processing mode to ML. 1 lakh expressions will cause problem only in Deep processing mode as it will take a lot of time to train maybe hours.

Manually classifying expressions for intents would be the best way so that your bot will have a well structured intent classification and will be very well trained. Extracting entities after training the bot is very simple. You can use the OscovaBot.Recognizers.ExtractEntities() method by passing each expression in your db as a user request and Oscova will return all the entities found in the user request. But I still think if you want you bot to be robust you must manually create properly structured expressions.
User avatar
FranzZ
Help & Support
 
Posts: 258
Joined: Fri Oct 25, 2013 9:20 pm

Re: Catagorizing Expressions

Postby SangramMCP » Mon Sep 04, 2017 9:07 pm

Hi FranzZ,

Can you demonstate the same with the help of a small example, which will make use of OscovaBot.Recognizers.ExtractEntities()
SangramMCP
 
Posts: 47
Joined: Wed Jul 26, 2017 7:41 pm

Re: Catagorizing Expressions

Postby FranzZ » Mon Sep 04, 2017 10:46 pm

well it should be easy shouldn't it.

CSharp Code

var someList = new List<string>(); // add sentences to this list.

foreach (var item in someList)
{
var entities = bot.Recognizers.ExtractEntities(bot.MainUser.CreateRequest(item));
//do something with the entities here.
}
User avatar
FranzZ
Help & Support
 
Posts: 258
Joined: Fri Oct 25, 2013 9:20 pm

Re: Catagorizing Expressions

Postby SangramMCP » Tue Sep 05, 2017 4:38 pm

string str1 = "my name is oscova";
someList.Add(str1);
string str2 = "reject the Quality entry for the below QCA’s";
someList.Add(str2);
string str3 = "revise increase the target of attached employee ins scorecard for entire month";
someList.Add(str3);
string str4 = "enable accuracy in escorecard for the emp";
someList.Add(str4);
string str5 = "Can you please reject the below date as the employee updated incorrect number my mistake";
someList.Add(str5);
string str6 = "user updated scorecard incorrectly yesterday and is approved mistakenly";
someList.Add(str6);


string[] entitiesl = new string[10];

foreach (var item in someList)
{
var entities = oscovaBot.Recognizers.ExtractEntities(oscovaBot.MainUser.CreateRequest(item));
entitiesl[0] = (Syn.Bot.Oscova.Collections.EntityCollection)entities.; -- not sure what to write here

randomAccessRecognizer.Entries.Add(entities.ToString()); -- or even this
//do something with the entities here.
}
SangramMCP
 
Posts: 47
Joined: Wed Jul 26, 2017 7:41 pm

Re: Catagorizing Expressions

Postby SangramMCP » Tue Sep 05, 2017 4:52 pm

Moreover,

[Expression("request {backdate batches}")]
[Expression("{QC target} need to be set. User details attached")]
[Expression(" Need to {change the target} for")]
[Expression("Could you please {add the below sub - process} for QCA’s., Sub - ProcessPIA - 6 QA, Allowable QA, Collection QA, Returned Mail QA, PIA - 2 QA, Misc - Mail other work QA.")]
[Expression("Please {approve OT} for 5 users from backend as I was on leave. Details sent thru email.")]
[Expression("{Need correction} in BMS target setting. need to set revised target")]
[Expression("{backend OT approval}")]
[Expression("Kindly {update OT details} for ClinicAnywhere coding team users which was planned on 08/25/2016.")]
[Expression("Please {approve the request} in Carli, as Manager is on leave and Sr manager is unable to approve the request in Carli.")]
[Entity("IssuesError")]
public void InitialIntent(Context context, Result result)
{
result.SendResponse("The request type is of Issues/Error");
}

I feel there is something wrong with the expression. It doesn't detect the expression, if I covey one of these in chat window. Please help
SangramMCP
 
Posts: 47
Joined: Wed Jul 26, 2017 7:41 pm

Re: Catagorizing Expressions

Postby SangramMCP » Wed Sep 06, 2017 4:56 pm

Any answer for this query!!

SangramMCP wrote:Moreover,

[Expression("request {backdate batches}")]
[Expression("{QC target} need to be set. User details attached")]
[Expression(" Need to {change the target} for")]
[Expression("Could you please {add the below sub - process} for QCA’s., Sub - ProcessPIA - 6 QA, Allowable QA, Collection QA, Returned Mail QA, PIA - 2 QA, Misc - Mail other work QA.")]
[Expression("Please {approve OT} for 5 users from backend as I was on leave. Details sent thru email.")]
[Expression("{Need correction} in BMS target setting. need to set revised target")]
[Expression("{backend OT approval}")]
[Expression("Kindly {update OT details} for ClinicAnywhere coding team users which was planned on 08/25/2016.")]
[Expression("Please {approve the request} in Carli, as Manager is on leave and Sr manager is unable to approve the request in Carli.")]
[Entity("IssuesError")]
public void InitialIntent(Context context, Result result)
{
result.SendResponse("The request type is of Issues/Error");
}

I feel there is something wrong with the expression. It doesn't detect the expression, if I covey one of these in chat window. Please help
SangramMCP
 
Posts: 47
Joined: Wed Jul 26, 2017 7:41 pm

Re: Catagorizing Expressions

Postby FranzZ » Wed Sep 06, 2017 5:31 pm

majority of the expressions in your example are invalid as they are using invalid characters in them. You can see the allowed characters here. By the way the way the expressions are added in your example I am certain it will be causing scoring issues as the expressions are clearly giving no pattern in similarities for the intent.
User avatar
FranzZ
Help & Support
 
Posts: 258
Joined: Fri Oct 25, 2013 9:20 pm

Re: Catagorizing Expressions

Postby SangramMCP » Wed Sep 06, 2017 7:46 pm

Hi Franzz,

Thank you for your clarifications.

Can you correct the expressions and tell me the correct way of framing the expressions for the same sentences.
I will get a idea of how the expressions has to be formed.

Thanks,
Sangram
SangramMCP
 
Posts: 47
Joined: Wed Jul 26, 2017 7:41 pm

Re: Catagorizing Expressions

Postby FranzZ » Wed Sep 06, 2017 10:02 pm

There's a lot of expressions in your example so I will point out some mistakes.

In the below expressions you are using multiple sentences. All expressions in Oscova process a single user request so the following is invalid.

[Expression("{QC target} need to be set. User details attached")]
[Expression("Please {approve OT} for 5 users from backend as I was on leave. Details sent thru email.")]
[Expression("{Need correction} in BMS target setting. need to set revised target")]
[Expression("Please {approve the request} in Carli, as Manager is on leave and Sr manager is unable to approve the request in Carli.")]

In the below expression you are using commas, hypens, and is not a single sentence so it will cause problem. Also the expression is too long so it will never be matched with good confidence.
[Expression("Could you please {add the below sub - process} for QCA’s., Sub - ProcessPIA - 6 QA, Allowable QA, Collection QA, Returned Mail QA, PIA - 2 QA, Misc - Mail other work QA.")]

The following are the cleanest expressions and I find nothing wrong with them.

[Expression("request {backdate batches}")]
[Expression(" Need to {change the target} for")]
[Expression("{backend OT approval}")]

A big issue with the expressions are that they mostly belong to different intents but are being grouped together as similar expressions for the same intent. Expressions have to be in their simplest form and must be clean but all of the above expressions that I mentioned are actually jumbled up and the structure is not at all proper
User avatar
FranzZ
Help & Support
 
Posts: 258
Joined: Fri Oct 25, 2013 9:20 pm

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest
cron