Skip to content

Commit

Permalink
Merge pull request #643 from mkistler/634/add-nlu-readme
Browse files Browse the repository at this point in the history
[NLU] Add README.md
  • Loading branch information
germanattanasio authored Apr 7, 2017
2 parents f9899ba + facb636 commit 6b1db92
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions natural-language-understanding/README.md
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();
```

0 comments on commit 6b1db92

Please sign in to comment.