forked from SciSharp/CherubNLP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
32 lines (29 loc) · 1.06 KB
/
Program.cs
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
using CherubNLP.UnitTest.Kaggle;
using FastText.NetWrapper;
using System;
using System.IO;
namespace CherubNLP.Console
{
class Program
{
static void Main(string[] args)
{
var model = Path.Combine(@"D:\SciSharp\CherubNLP\data", "dbpedia.bin");
using (var fastText = new FastTextWrapper())
{
fastText.LoadModel(model);
var vector1 = fastText.GetSentenceVector("Hello");
}
var similarities = Similarity.Cosine("Power Outage -Fifth & Park - JPMC150713", new[]
{
"Cosine Similarity algorithm function sample.",
"Power Restored -Fifth & Park - JPMC150713",
"Compute the similarity of two hardcoded lists.",
"We can compute the similarity of two hardcoded lists.",
"Coronavirus app could trace your contacts without sacrificing your privacy"
}, model);
// var test = new KaggleTest();
// test.SpookyAuthorIdentification();
}
}
}