-
Notifications
You must be signed in to change notification settings - Fork 533
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #643 from mkistler/634/add-nlu-readme
[NLU] Add README.md
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Natural Language Understanding | ||
|
||
## Installation | ||
|
||
##### Maven | ||
```xml | ||
<dependency> | ||
<groupId>com.ibm.watson.developer_cloud</groupId> | ||
<artifactId>natural-language-understanding</artifactId> | ||
<version>3.7.1</version> | ||
</dependency> | ||
``` | ||
|
||
##### Gradle | ||
```gradle | ||
'com.ibm.watson.developer_cloud:natural-language-understanding:3.7.1' | ||
``` | ||
|
||
## Usage | ||
Use [Natural Language Understanding](http://www.ibm.com/watson/developercloud/doc/natural-language-understanding/index.html) | ||
to analyze various features of text content at scale. Provide text, raw HTML, or a public URL, and IBM Watson Natural | ||
Language Understanding will give you results for the features you request. The service cleans HTML content before | ||
analysis by default, so the results can ignore most advertisements and other unwanted content. | ||
|
||
```java | ||
NaturalLanguageUnderstanding service = new NaturalLanguageUnderstanding(); | ||
service.setUsernameAndPassword("<username>", "<password>"); | ||
|
||
EntitiesOptions entities = new EntitiesOptions.Builder().sentiment(true).limit(1).build(); | ||
Features features = new Features.Builder().entities(entities).build(); | ||
AnalyzeOptions parameters = new AnalyzeOptions.Builder().url("www.cnn.com").features(features).build(); | ||
AnalysisResults results = service.analyze(parameters).execute(); | ||
``` |