Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Release History
## Version 1.0.0-beta.1 (2020-01-06)
## Version 1.0.0-beta.1 ((Unreleased))
For details on the Azure SDK for Java (January 2020 Preview) release refer to the [release announcement]().

- Initial release of this module.
Expand Down
1 change: 0 additions & 1 deletion sdk/textanalytics/azure-ai-textanalytics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,6 @@ for (TextSentiment textSentiment : client.analyzeSentiment(text).getSentenceSent

## Troubleshooting
## General
// TODO (savaity) update exceptions

## Next steps
- Samples are explained in detail [here][samples_readme].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ Mono<Response<DocumentResultCollection<DetectLanguageResult>>> detectBatchLangua
return service.languagesWithRestResponseAsync(
languageBatchInput, options == null ? null : options.getModelVersion(),
options == null ? null : options.showStatistics(), context)
.doOnSubscribe(ignoredValue -> logger.info("A batch of language input - {}", ignoredValue))
.doOnSubscribe(ignoredValue -> logger.info("A batch of language input - {}", textInputs.toString()))
.doOnSuccess(response -> logger.info("A batch of detected language output - {}", response.getValue()))
.doOnError(error -> logger.warning("Failed to detected languages - {}", error))
.map(response -> new SimpleResponse<>(response, toDocumentResultCollection(response.getValue())));
Expand All @@ -291,7 +291,7 @@ Mono<Response<DocumentResultCollection<DetectLanguageResult>>> detectBatchLangua
// Named Entity
/**
* Returns a list of general named entities in the provided text. For a list of supported entity types, check:
* <a href="https://aka.ms/taner"></a> For a list of enabled languages, check: <a href="https://aka.ms/talangs"></a>
* <a href="https://aka.ms/taner"></a>. For a list of enabled languages, check: <a href="https://aka.ms/talangs"></a>
*
* @param text the text to recognize entities for.
*
Expand All @@ -310,7 +310,7 @@ public Mono<RecognizeEntitiesResult> recognizeEntities(String text) {

/**
* Returns a list of general named entities in the provided text. For a list of supported entity types, check:
* <a href="https://aka.ms/taner"></a> For a list of enabled languages, check: <a href="https://aka.ms/talangs"></a>
* <a href="https://aka.ms/taner"></a>. For a list of enabled languages, check: <a href="https://aka.ms/talangs"></a>
*
* @param text the text to recognize entities for.
* @param language The 2 letter ISO 639-1 representation of language. If not set, uses "en" for English as
Expand Down Expand Up @@ -441,7 +441,7 @@ Mono<Response<DocumentResultCollection<RecognizeEntitiesResult>>> recognizeBatch
batchInput,
options == null ? null : options.getModelVersion(),
options == null ? null : options.showStatistics(), context)
.doOnSubscribe(ignoredValue -> logger.info("A batch of named entities input - {}", ignoredValue))
.doOnSubscribe(ignoredValue -> logger.info("A batch of named entities input - {}", textInputs.toString()))
.doOnSuccess(response -> logger.info("A batch of named entities output - {}", response.getValue()))
.doOnError(error -> logger.warning("Failed to named entities - {}", error))
.map(response -> new SimpleResponse<>(response, toDocumentResultCollection(response.getValue())));
Expand Down Expand Up @@ -470,7 +470,7 @@ public Mono<RecognizePiiEntitiesResult> recognizePiiEntities(String text) {

/**
* Returns a list of personal information entities ("SSN", "Bank Account", etc) in the text. For the list of
* supported entity types, check: <a href="https://aka.ms/taner"></a> For a list of enabled languages,
* supported entity types, check: <a href="https://aka.ms/taner"></a>. For a list of enabled languages,
* check: <a href="https://aka.ms/talangs"></a>.
*
* @param text the text to recognize PII entities for.
Expand Down Expand Up @@ -502,7 +502,7 @@ Mono<Response<RecognizePiiEntitiesResult>> recognizePiiEntitiesWithResponse(Stri

/**
* Returns a list of personal information entities ("SSN", "Bank Account", etc) in the list of texts. For the list
* of supported entity types, check: <a href="https://aka.ms/taner"></a> For a list of enabled languages,
* of supported entity types, check: <a href="https://aka.ms/taner"></a>. For a list of enabled languages,
* check: <a href="https://aka.ms/talangs"></a> for the list of enabled languages.
*
* @param textInputs A list of text to recognize PII entities for.
Expand All @@ -524,7 +524,7 @@ public Mono<DocumentResultCollection<RecognizePiiEntitiesResult>> recognizePiiEn

/**
* Returns a list of personal information entities ("SSN", "Bank Account", etc) in the list of texts. For the list
* of supported entity types, check <a href="https://aka.ms/taner"></a> For a list of enabled languages,
* of supported entity types, check <a href="https://aka.ms/taner"></a>. For a list of enabled languages,
* check: <a href="https://aka.ms/talangs"></a>.
*
* @param textInputs A list of text to recognize PII entities for.
Expand Down Expand Up @@ -583,7 +583,7 @@ public Mono<DocumentResultCollection<RecognizePiiEntitiesResult>> recognizeBatch

/**
* Returns a list of personal information entities ("SSN", "Bank Account", etc) in the batch of document inputs. For
* the list of supported entity types,check: <a href="https://aka.ms/taner"></a> For a list of enabled languages,
* the list of supported entity types,check: <a href="https://aka.ms/taner"></a>. For a list of enabled languages,
* check: <a href="https://aka.ms/talangs"></a>.
*
* @param textInputs A list of {@link TextDocumentInput inputs/documents} to recognize PII entities for.
Expand Down Expand Up @@ -614,7 +614,7 @@ Mono<Response<DocumentResultCollection<RecognizePiiEntitiesResult>>> recognizeBa
batchInput,
options == null ? null : options.getModelVersion(),
options == null ? null : options.showStatistics(), context)
.doOnSubscribe(ignoredValue -> logger.info("A batch of PII entities input - {}", ignoredValue))
.doOnSubscribe(ignoredValue -> logger.info("A batch of PII entities input - {}", textInputs.toString()))
.doOnSuccess(response -> logger.info("A batch of PII entities output - {}", response.getValue()))
.doOnError(error -> logger.warning("Failed to PII entities - {}", error))
.map(response -> new SimpleResponse<>(response, toPiiDocumentResultCollection(response.getValue())));
Expand Down Expand Up @@ -785,7 +785,7 @@ Mono<Response<DocumentResultCollection<RecognizeLinkedEntitiesResult>>> recogniz
batchInput,
options == null ? null : options.getModelVersion(),
options == null ? null : options.showStatistics(), context)
.doOnSubscribe(ignoredValue -> logger.info("A batch of linked entities input - {}", ignoredValue))
.doOnSubscribe(ignoredValue -> logger.info("A batch of linked entities input - {}", textInputs.toString()))
.doOnSuccess(response -> logger.info("A batch of linked entities output - {}", response.getValue()))
.doOnError(error -> logger.warning("Failed to linked entities - {}", error))
.map(response -> new SimpleResponse<>(response, toDocumentResultCollection(response.getValue())));
Expand Down Expand Up @@ -950,7 +950,7 @@ Mono<Response<DocumentResultCollection<ExtractKeyPhraseResult>>> extractBatchKey
batchInput,
options == null ? null : options.getModelVersion(),
options == null ? null : options.showStatistics(), context)
.doOnSubscribe(ignoredValue -> logger.info("A batch of key phrases input - {}", ignoredValue))
.doOnSubscribe(ignoredValue -> logger.info("A batch of key phrases input - {}", textInputs.toString()))
.doOnSuccess(response -> logger.info("A batch of key phrases output - {}", response.getValue()))
.doOnError(error -> logger.warning("Failed to key phrases - {}", error))
.map(response -> new SimpleResponse<>(response, toDocumentResultCollection(response.getValue())));
Expand Down Expand Up @@ -1132,7 +1132,7 @@ Mono<Response<DocumentResultCollection<AnalyzeSentimentResult>>> analyzeBatchSen
batchInput,
options == null ? null : options.getModelVersion(),
options == null ? null : options.showStatistics(), context)
.doOnSubscribe(ignoredValue -> logger.info("A batch of text sentiment input - {}", ignoredValue))
.doOnSubscribe(ignoredValue -> logger.info("A batch of text sentiment input - {}", textInputs.toString()))
.doOnSuccess(response -> logger.info("A batch of text sentiment output - {}", response))
.doOnError(error -> logger.warning("Failed to text sentiment - {}", error))
.map(response -> new SimpleResponse<>(response, toDocumentResultCollection(response.getValue())));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,10 @@ public String getText() {
public String getCountryHint() {
return this.countryHint;
}

@Override
public String toString() {
return String.format("Text = %s, Id = %s, Country Hint = %s",
this.getText(), this.getId(), this.getCountryHint());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public final class TextAnalyticsRequestOptions {
private boolean showStatistics;

/**
* Get the model version
* Gets the version of the text analytics model used by this operation.
*
* @return the model version
*/
Expand All @@ -23,7 +23,8 @@ public String getModelVersion() {
}

/**
* Set the model version
* Set the model version. This value indicates which model will be used for scoring, e.g. "latest", "2019-10-01".
* If a model-version is not specified, the API will default to the latest, non-preview version.
*
* @param modelVersion the model version
* @return the TextAnalyticsRequestOptions object itself
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,10 @@ public String getText() {
public String getLanguage() {
return this.language;
}

@Override
public String toString() {
return String.format("Text = %s, Id = %s, Language = %s",
this.getText(), this.getId(), this.getLanguage());
}
}