ConceptNet API wrapper in c# NuGet Package

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 .




Got any ConceptNet API wrapper in c# Question?





Info

Version: 1.1.4
Author(s): SBen
Last Update: Friday, September 15, 2017
.NET Fiddle: Create the first Fiddle
NuGet Url: https://www.nuget.org/packages/ConceptNetDotNet


Install
Install-Package ConceptNetDotNet
dotnet add package ConceptNetDotNet
paket add ConceptNetDotNet
ConceptNetDotNet Download (Unzip the "nupkg" after downloading)



Tags



STATS

must-have-score

avg-downloads-per-day

0

days-since-last-release

2626