ConceptNetDotNet 1.1.4
dotnet add package ConceptNetDotNet --version 1.1.4
NuGet\Install-Package ConceptNetDotNet -Version 1.1.4
<PackageReference Include="ConceptNetDotNet" Version="1.1.4" />
paket add ConceptNetDotNet --version 1.1.4
#r "nuget: ConceptNetDotNet, 1.1.4"
// Install ConceptNetDotNet as a Cake Addin #addin nuget:?package=ConceptNetDotNet&version=1.1.4 // Install ConceptNetDotNet as a Cake Tool #tool nuget:?package=ConceptNetDotNet&version=1.1.4
ConceptNet API wrapper in c#
------------------------------------------------------------
What is ConceptNet?
ConceptNet is a freely-available semantic network, designed to help
computers understand the meanings of words that people use.
(http://conceptnet.io/)
------------------------------------------------------------
How to use this package?
** var wrapper = new ConceptNetWrapper("http://api.conceptnet.io/"); **
The wrapper get as first argument the base URL for the ConceptNet API.
The second argument (non-mandatory) is the language, the default is "en" (i.e., english).
The third argument (non-mandatory) is the filter language results, Filter the results which are not the from the defined language (default is true).
Example:
Getting the relations for the term 'example'
** var result = wrapper.GetConceptRelationsAsString("example"); **
Results are shown in the following format:
Start (start node - e.g., 'example'), Rel ('type of relation'), End (end node), Text
- Rel describes one of the defined relations that connect the nodes of ConceptNet.
- Some of ConceptNet's data is extracted from natural-language text. The Text value shows you what this text was.
Some Results:
// apology,IsA,example,[[apology]] is a type of [[example]]
// example,IsA,admonition,[[example]] is a type of [[admonition]]
------------------------------------------------------------
Other examples:
** var result2 = wrapper.GetConceptRelationsAsString("blabla"); //Return empty string, since this term doesn't exist**
** var result3 = wrapper.GetConceptNetResults("dog", "bark"); //Return the relations between these two terms**
** var result4 = wrapper.GetConceptRelationsAsString("dog", "bark"); //Return the relations between these two terms as comma separated string **
** var result5 = wrapper.GetConceptRelationsAsDataTable("dog", "bark"); //Return the relations between these two terms in data table format **
** var result6 = wrapper.GetRelatedTerms("Tea Kettle"); // Return terms related to the term (e.g., "cat") **
** var result7 = wrapper.GetHowTermsRelated("tea_kettle", "coffee_pot"); // If you just want to see how related term1 (e.g., "tea kettle") is to term2 (e.g., "coffee pot") **
** var result8 = crawler.GetRelationScore("tea_kettle", "coffee_pot"); //Return the relation score **
**
var result9 = crawler.GetConceptNetQueryResults("node=/c/en/dog,other=/c/en/bark"); //Get results based on query (comma seperated string )
// You can specify any of the following parameters:
// start: a URI that the "start" or "subject" position must match.
// end: a URI that the "end" or "object" position must match.
// rel: a relation. node: a URI that must match either the start or the end.
// other: a URI that must match either the start or the end, and be different from node.
// sources: a URI that must match one of the sources of the edge.
// For more information, see : https://github.com/commonsense/conceptnet5/wiki/API#complex-queries
**
------------------------------------------------------------
For more information, see the API documentation page in GitHub:
https://github.com/commonsense/conceptnet5/wiki/API
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net452 is compatible. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
- Newtonsoft.Json (>= 8.0.1)
- RestSharp (>= 104.5.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.1.4 | 1,710 | 9/15/2017 |
Second Release