Skip to content

Commit

Permalink
feat(natural-language-understanding): generated code
Browse files Browse the repository at this point in the history
chore(natural-language-understanding): manual changes

chore(natural-language-understanding): manual changes
  • Loading branch information
germanattanasio committed Feb 24, 2020
1 parent d088954 commit 5d2dd6d
Show file tree
Hide file tree
Showing 55 changed files with 81 additions and 104 deletions.
5 changes: 4 additions & 1 deletion natural-language-understanding/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Installation

##### Maven

```xml
<dependency>
<groupId>com.ibm.watson</groupId>
Expand All @@ -12,12 +13,14 @@
```

##### Gradle

```gradle
'com.ibm.watson:natural-language-understanding:8.2.1'
```

## Usage
Use [Natural Language Understanding](https://cloud.ibm.com/docs/services/natural-language-understanding?topic=natural-language-understanding-about)

Use [Natural Language Understanding](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-about)
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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2019, 2020.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -36,19 +36,18 @@
* analysis by default, so the results can ignore most advertisements and other unwanted content.
*
* You can create [custom
* models]
* (https://cloud.ibm.com/docs/services/natural-language-understanding?topic=natural-language-understanding-customizing)
* with Watson Knowledge Studio to detect custom entities, relations, and categories in Natural Language Understanding.
* models](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing)
* with Watson Knowledge Studio to detect custom entities and relations in Natural Language Understanding.
*
* @version v1
* @see <a href="https://cloud.ibm.com/docs/services/natural-language-understanding/">Natural Language Understanding</a>
* @see <a href="https://cloud.ibm.com/docs/natural-language-understanding/">Natural Language Understanding</a>
*/
public class NaturalLanguageUnderstanding extends BaseService {

private static final String DEFAULT_SERVICE_NAME = "natural_language_understanding";

private static final String DEFAULT_SERVICE_URL
= "https://gateway.watsonplatform.net/natural-language-understanding/api";
= "https://gateway.watsonplatform.net/natural-language-understanding/api";

private String versionDate;

Expand Down Expand Up @@ -120,9 +119,7 @@ public NaturalLanguageUnderstanding(String versionDate, String serviceName, Auth
*
* If a language for the input text is not specified with the `language` parameter, the service [automatically detects
* the
* language]
* (https://cloud.ibm.com/docs/services/natural-language-understanding
* ?topic=natural-language-understanding-detectable-languages).
* language](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-detectable-languages).
*
* @param analyzeOptions the {@link AnalyzeOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link AnalysisResults}
Expand Down Expand Up @@ -179,9 +176,7 @@ public ServiceCall<AnalysisResults> analyze(AnalyzeOptions analyzeOptions) {
* List models.
*
* Lists Watson Knowledge Studio [custom entities and relations
* models]
* (https://cloud.ibm.com/docs/services/natural-language-understanding
* ?topic=natural-language-understanding-customizing)
* models](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing)
* that are deployed to your Natural Language Understanding service.
*
* @param listModelsOptions the {@link ListModelsOptions} containing the options for the call
Expand Down Expand Up @@ -209,9 +204,7 @@ public ServiceCall<ListModelsResults> listModels(ListModelsOptions listModelsOpt
* List models.
*
* Lists Watson Knowledge Studio [custom entities and relations
* models]
* (https://cloud.ibm.com/docs/services/natural-language-understanding
* ?topic=natural-language-understanding-customizing)
* models](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing)
* that are deployed to your Natural Language Understanding service.
*
* @return a {@link ServiceCall} with a response type of {@link ListModelsResults}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2017, 2020.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2019, 2020.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2019, 2020.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2017, 2020.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -265,9 +265,7 @@ public String url() {
* Gets the clean.
*
* Set this to `false` to disable webpage cleaning. To learn more about webpage cleaning, see the [Analyzing
* webpages]
* (https://cloud.ibm.com/docs/services/natural-language-understanding
* ?topic=natural-language-understanding-analyzing-webpages)
* webpages](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-analyzing-webpages)
* documentation.
*
* @return the clean
Expand All @@ -280,9 +278,7 @@ public Boolean clean() {
* Gets the xpath.
*
* An [XPath
* query]
* (https://cloud.ibm.com/docs/services/natural-language-understanding
* ?topic=natural-language-understanding-analyzing-webpages#xpath)
* query](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-analyzing-webpages#xpath)
* to perform on `html` or `url` input. Results of the query will be appended to the cleaned webpage text before it is
* analyzed. To analyze only the results of the XPath query, set the `clean` parameter to `false`.
*
Expand Down Expand Up @@ -319,9 +315,7 @@ public Boolean returnAnalyzedText() {
*
* ISO 639-1 code that specifies the language of your text. This overrides automatic language detection. Language
* support differs depending on the features you include in your analysis. See [Language
* support]
* (https://cloud.ibm.com/docs/services/natural-language-understanding
* ?topic=natural-language-understanding-language-support)
* support](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-language-support)
* for more information.
*
* @return the language
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2019, 2020.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2019, 2020.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -134,14 +134,17 @@ public Long limit() {
* Gets the model.
*
* Enter a [custom
* model]
* (https://cloud.ibm.com/docs/services/natural-language-understanding
* ?topic=natural-language-understanding-customizing)
* model](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing)
* ID to override the standard categories model.
*
* The custom categories experimental feature will be retired on 19 December 2019. On that date, deployed custom
* categories models will no longer be accessible in Natural Language Understanding. The feature will be removed from
* Knowledge Studio on an earlier date. Custom categories models will no longer be accessible in Knowledge Studio on
* 17 December 2019.
*
* @return the model
* @deprecated the model parameter is no longer supported by the Natural Language Understanding service and will
* be removed in the next major release
* @deprecated the model parameter is no longer supported by the Natural Language Understanding
* service and will be removed in the next major release
*/
public String model() {
return model;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2019, 2020.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2019, 2020.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -28,9 +28,7 @@ public class CategoriesResult extends GenericModel {
*
* The path to the category through the 5-level taxonomy hierarchy. For the complete list of categories, see the
* [Categories
* hierarchy]
* (https://cloud.ibm.com/docs/services/natural-language-understanding
* ?topic=natural-language-understanding-categories#categories-hierarchy)
* hierarchy](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-categories#categories-hierarchy)
* documentation.
*
* @return the label
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2019, 2020.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2017, 2020.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2017, 2020.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2017, 2020.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2019, 2020.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2019, 2020.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2019, 2020.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2019, 2020.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2017, 2020.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2019, 2020.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2017, 2020.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2017, 2020.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -16,9 +16,7 @@

/**
* Identifies people, cities, organizations, and other entities in the content. See [Entity types and
* subtypes]
* (https://cloud.ibm.com/docs/services/natural-language-understanding
* ?topic=natural-language-understanding-entity-types).
* subtypes](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-entity-types).
*
* Supported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish, Swedish.
* Arabic, Chinese, and Dutch are supported only through custom models.
Expand Down Expand Up @@ -163,9 +161,7 @@ public Boolean mentions() {
* Gets the model.
*
* Enter a [custom
* model]
* (https://cloud.ibm.com/docs/services/natural-language-understanding
* ?topic=natural-language-understanding-customizing)
* model](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing)
* ID to override the standard entity detection model.
*
* @return the model
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2017, 2020.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2019, 2020.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2019, 2020.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2017, 2020.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -241,9 +241,7 @@ public EmotionOptions emotion() {
* Gets the entities.
*
* Identifies people, cities, organizations, and other entities in the content. See [Entity types and
* subtypes]
* (https://cloud.ibm.com/docs/services/natural-language-understanding
* ?topic=natural-language-understanding-entity-types).
* subtypes](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-entity-types).
*
* Supported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish, Swedish.
* Arabic, Chinese, and Dutch are supported only through custom models.
Expand Down Expand Up @@ -284,9 +282,7 @@ public MetadataOptions metadata() {
*
* Recognizes when two entities are related and identifies the type of relation. For example, an `awardedTo` relation
* might connect the entities "Nobel Prize" and "Albert Einstein". See [Relation
* types]
* (https://cloud.ibm.com/docs/services/natural-language-understanding
* ?topic=natural-language-understanding-relations).
* types](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-relations).
*
* Supported languages: Arabic, English, German, Japanese, Korean, Spanish. Chinese, Dutch, French, Italian, and
* Portuguese custom models are also supported.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2019, 2020.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2017, 2020.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2017, 2020.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2019, 2020.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
Loading

0 comments on commit 5d2dd6d

Please sign in to comment.