-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
46 lines (36 loc) · 1.09 KB
/
Program.cs
File metadata and controls
46 lines (36 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using SemanticRouter.Models;
using SmartComponents.Inference;
Route chitchat = new Route(
name:"chitchat",
utterances: [
"how's the weather today?",
"how are things going?",
"lovely weather today",
"the weather is horrendous",
"let's go to the chippy",
]
);
Route politics = new Route(
name : "politics",
utterances : [
"isn't politics the best thing ever",
"why don't you tell me about your political opinions",
"don't you just love the president",
"they're going to destroy this country!",
"they will save the country!",
]
);
Route[] routes = [chitchat,politics];
RouteLayer routeLayer = new RouteLayer();
string c_target = "how are you doing?";
var c_result = routeLayer.GetRoute(c_target, routes);
// Output: chitchat
Console.WriteLine(c_result);
string p_target = "I think the president is doing a great job";
var p_result = routeLayer.GetRoute(p_target, routes);
// Output: politics
Console.WriteLine(p_result);
// run using dotnet run
// Expected output:
// chitchat
// politics