Skip to content

Commit 05a07e8

Browse files
committed
add NLC readme
1 parent efe22a8 commit 05a07e8

File tree

1 file changed

+53
-0
lines changed
  • src/IBM.WatsonDeveloperCloud.NaturalLanguageClassifier.v1

1 file changed

+53
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
[![NuGet](https://img.shields.io/badge/nuget-v2.0.0-green.svg?style=flat)](https://www.nuget.org/packages/IBM.WatsonDeveloperCloud.NaturalLanguageClassifier.v1/)
2+
3+
### Natural Language Classifier
4+
IBM Watson™ [Natural Language Classifier][natural_language_classifier] uses machine learning algorithms to return the top matching predefined classes for short text input. You create and train a classifier to connect predefined classes to example texts so that the service can apply those classes to new inputs.
5+
6+
### Installation
7+
#### Nuget
8+
```
9+
10+
PM > Install-Package IBM.WatsonDeveloperCloud.NaturalLanguageClassifier.v1
11+
12+
```
13+
#### Project.json
14+
```JSON
15+
16+
"dependencies": {
17+
"IBM.WatsonDeveloperCloud.NaturalLanguageClassifier.v1": "2.0.0"
18+
}
19+
20+
```
21+
### Usage
22+
IBM Watson™ Natural Language Classifier can help your application understand the language of short texts and make predictions about how to handle them. A classifier learns from your example data and then can return information for texts that it is not trained on.
23+
24+
You can create and train a classifier in less than 15 minutes.
25+
26+
#### Instantiating and authenticating the service
27+
Before you can send requests to the service it must be instantiated and credentials must be set.
28+
```cs
29+
// create a Natural Language Classifier Service instance
30+
NaturalLanguageClassifierService _naturalLanguageClassifierService = new NaturalLanguageClassifierService();
31+
32+
// set the credentials
33+
_naturalLanguageClassifierService.SetCredential("<username>", "<password>");
34+
```
35+
36+
#### Analyze
37+
Analyze features of natural language content.
38+
```cs
39+
ClassifyInput classifyInput = new ClassifyInput
40+
{
41+
Text = _textToClassify
42+
};
43+
44+
classifyResult = Classify(classifierId, classifyInput);
45+
```
46+
47+
#### List Models
48+
List available [custom models][custom_models].
49+
```cs
50+
var listClassifiersResult = ListClassifiers();
51+
```
52+
53+
[natural_language_classifier]: https://console.bluemix.net/docs/services/natural-language-classifier/getting-started.html

0 commit comments

Comments
 (0)