SciSharp / CherubNLP

Natural Language Processing in .NET Core

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CherubNLP

Natural Language Processing in .NET Standard.

PM > Install-Package CherubNLP

Word Vector

Text Vector

Text Similarity

using NumSharp;

var similarities = Similarity.Cosine("We can use Cosine to compute the similarity of two hardcoded lists.", new[]
            {
                "Cosine Similarity algorithm function sample.",
                "The Cosine Similarity function computes the similarity of two lists of numbers.",
                "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"
            }, "dbpedia.ftz"));

Assert.AreEqual(new[] { 0, 4, 1, 3, 2 }, np.argsort<double>(similarities));

About

Natural Language Processing in .NET Core

License:Apache License 2.0


Languages

Language:C# 100.0%