-
Notifications
You must be signed in to change notification settings - Fork 471
Intent Classification Pipeline
Oceania edited this page Aug 10, 2018
·
3 revisions
Plug in a new intent classifier is as easy as just follow below steps:
Add a new class named FooClassifier in the Classifiers folder.
public class FooClassifier
{
}
Implement the NLP pipline interface named INlpPipeline.
public class FooClassifier : INlpPipeline
{
public IConfiguration Configuration { get; set; }
public Task<bool> Predict(Agent agent, JObject data, PipeModel meta)
{
throw new NotImplementedException();
}
public Task<bool> Train(Agent agent, JObject data, PipeModel meta)
{
throw new NotImplementedException();
}
}
Modify the bot.json under the Settings folder, located at your BotPlatform section, add FooClassifier in the Pipe.
"BotSharpAi": {
"Pipe": "BarTokenizer, ZooEntityRecognizer, FooClassifer"
}
Well done. You've wrote a new intent classifier.