C# Class Microsoft.ProjectOxford.EntityLinking.EntityLinkingServiceClient

The EntityLinking service client proxy implementation.
Inheritance: IEntityLinkingServiceClient
Show file Open project: Microsoft/ProjectOxford-ClientSDK

Public Methods

Method Description
EntityLinkingServiceClient ( HttpClient httpClient, string subscriptionKey ) : System

Initializes a new instance of the EntityLinkingServiceClient class, with a client-supplied HttpClient object. Intended primarily for testing.

EntityLinkingServiceClient ( HttpClient httpClient, string subscriptionKey, string apiRoot ) : System

Initializes a new instance of the EntityLinkingServiceClient class, with a client-supplied HttpClient object. Intended primarily for testing.

EntityLinkingServiceClient ( string subscriptionKey ) : System

Initializes a new instance of the EntityLinkingServiceClient class.

EntityLinkingServiceClient ( string subscriptionKey, string apiRoot ) : System

Initializes a new instance of the EntityLinkingServiceClient class.

LinkAsync ( string text, string selection = "", int offset ) : Task

Linking entities in a text.

Private Methods

Method Description
SendRequestAsync ( string requestBody, string selection, int offset ) : Task

Helper method executing the REST request.

Method Details

EntityLinkingServiceClient() public method

Initializes a new instance of the EntityLinkingServiceClient class, with a client-supplied HttpClient object. Intended primarily for testing.
public EntityLinkingServiceClient ( HttpClient httpClient, string subscriptionKey ) : System
httpClient System.Net.Http.HttpClient the HttpClient object
subscriptionKey string The subscription key.
return System

EntityLinkingServiceClient() public method

Initializes a new instance of the EntityLinkingServiceClient class, with a client-supplied HttpClient object. Intended primarily for testing.
public EntityLinkingServiceClient ( HttpClient httpClient, string subscriptionKey, string apiRoot ) : System
httpClient System.Net.Http.HttpClient the HttpClient object
subscriptionKey string The subscription key.
apiRoot string
return System

EntityLinkingServiceClient() public method

Initializes a new instance of the EntityLinkingServiceClient class.
public EntityLinkingServiceClient ( string subscriptionKey ) : System
subscriptionKey string The subscription key.
return System

EntityLinkingServiceClient() public method

Initializes a new instance of the EntityLinkingServiceClient class.
public EntityLinkingServiceClient ( string subscriptionKey, string apiRoot ) : System
subscriptionKey string The subscription key.
apiRoot string Host name of the service URL, without the trailing slash.
return System

LinkAsync() public method

Linking entities in a text.
public LinkAsync ( string text, string selection = "", int offset ) : Task
text string the text.
selection string the specific word or phrase within the text that is to be entity linked. If not specified, the service will try to recognize and identify all the entities within the input text.
offset int the location (in offset by characters) of the selected word or phrase within the input text. Used to distinguish when there are multiple instances of the same words or phrases within the input text. Only valid when the selection is specified.
return Task