Skip to content

Commit

Permalink
make snippets shorter
Browse files Browse the repository at this point in the history
  • Loading branch information
samvaity committed Jan 6, 2020
1 parent 7a2b8aa commit d491816
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 90 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,6 @@
<suppress checks="LineLength" files="com.azure.ai.textanalytics.implementation.TextAnalyticsClientImplBuilder"/>
<suppress checks="LineLength" files="com.azure.ai.textanalytics.implementation.TextAnalyticsClientImpl"/>

<!-- Suppress this until all endpoints are implemented. -->
<!-- TODO: Fix with https://github.com/Azure/azure-sdk-for-java/issues#6716 Method name should follow a common vocabulary. -->
<suppress checks="com.azure.tools.checkstyle.checks.ServiceClientCheck" files=".*[/\\]textanalytics[/\\].*"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void detectLanguageCodeSnippets() {
final TextDocumentBatchStatistics batchStatistics = detectedBatchResult.getStatistics();
System.out.printf("Batch statistics, document count: %s, erroneous document count: %s,"
+ " transaction count: %s, valid document count: %s.%n",
batchStatistics.getDocumentCount(),
batchStatistics.getTransactionCount(),
batchStatistics.getTransactionCount(),
batchStatistics.getValidDocumentCount());

Expand All @@ -111,16 +111,13 @@ public void detectLanguageCodeSnippets() {

// Batch statistics
final TextDocumentBatchStatistics batchStatistics = detectedBatchResult.getStatistics();
System.out.printf("Batch statistics, document count: %s, erroneous document count: %s, "
+ "transaction count: %s, valid document count: %s.%n",
batchStatistics.getDocumentCount(),
batchStatistics.getErroneousDocumentCount(),
System.out.printf("Batch statistics,transaction count: %s, valid document count: %s.%n",
batchStatistics.getTransactionCount(),
batchStatistics.getValidDocumentCount());

for (DetectLanguageResult detectLanguageResult : detectedBatchResult) {
for (DetectedLanguage detectedLanguage : detectLanguageResult.getDetectedLanguages()) {
System.out.printf("Another detected language: %s, ISO 6391 name: %s, score: %s.%n",
System.out.printf("Other detected language: %s, ISO 6391 name: %s, score: %s.%n",
detectedLanguage.getName(),
detectedLanguage.getIso6391Name(),
detectedLanguage.getScore());
Expand All @@ -139,16 +136,13 @@ public void detectLanguageCodeSnippets() {

// Batch statistics
final TextDocumentBatchStatistics batchStatistics = detectedBatchResult.getStatistics();
System.out.printf("Batch statistics, document count: %s, erroneous document count: %s, "
+ "transaction count: %s, valid document count: %s.%n",
batchStatistics.getDocumentCount(),
batchStatistics.getErroneousDocumentCount(),
System.out.printf("Batch statistics, transaction count: %s, valid document count: %s.%n",
batchStatistics.getTransactionCount(),
batchStatistics.getValidDocumentCount());

for (DetectLanguageResult detectLanguageResult : detectedBatchResult) {
for (DetectedLanguage detectedLanguage : detectLanguageResult.getDetectedLanguages()) {
System.out.printf("Another detected language: %s, ISO 6391 name: %s, score: %s.%n",
System.out.printf("Other detected language: %s, ISO 6391 name: %s, score: %s.%n",
detectedLanguage.getName(),
detectedLanguage.getIso6391Name(),
detectedLanguage.getScore());
Expand All @@ -173,10 +167,7 @@ public void detectLanguageCodeSnippets() {

// Batch statistics
final TextDocumentBatchStatistics batchStatistics = detectedBatchResult.getStatistics();
System.out.printf("Batch statistics, document count: %s, erroneous document count: %s,"
+ " transaction count: %s, valid document count: %s.%n",
batchStatistics.getDocumentCount(),
batchStatistics.getErroneousDocumentCount(),
System.out.printf("Batch statistics, transaction count: %s, valid document count: %s.%n",
batchStatistics.getTransactionCount(),
batchStatistics.getValidDocumentCount());

Expand Down Expand Up @@ -239,9 +230,7 @@ public void recognizeEntitiesCodeSnippets() {

// Batch statistics
final TextDocumentBatchStatistics batchStatistics = recognizeEntitiesResults.getStatistics();
System.out.printf("Batch statistics, document count: %s, erroneous document count: %s, "
+ "transaction count: %s, valid document count: %s.%n",
batchStatistics.getDocumentCount(),
System.out.printf("Batch statistics, transaction count: %s, valid document count: %s.%n",
batchStatistics.getTransactionCount(),
batchStatistics.getValidDocumentCount());

Expand All @@ -268,10 +257,7 @@ public void recognizeEntitiesCodeSnippets() {

// Batch statistics
final TextDocumentBatchStatistics batchStatistics = recognizeEntitiesResults.getStatistics();
System.out.printf("Batch statistics, document count: %s, erroneous document count: %s, "
+ "transaction count: %s, valid document count: %s.%n",
batchStatistics.getDocumentCount(),
batchStatistics.getErroneousDocumentCount(),
System.out.printf("Batch statistics, transaction count: %s, valid document count: %s.%n",
batchStatistics.getTransactionCount(),
batchStatistics.getValidDocumentCount());

Expand All @@ -298,10 +284,7 @@ public void recognizeEntitiesCodeSnippets() {

// Batch statistics
final TextDocumentBatchStatistics batchStatistics = recognizeEntitiesResults.getStatistics();
System.out.printf("Batch statistics, document count: %s, erroneous document count: %s, "
+ "transaction count: %s, valid document count: %s.%n",
batchStatistics.getDocumentCount(),
batchStatistics.getErroneousDocumentCount(),
System.out.printf("Batch statistics, transaction count: %s, valid document count: %s.%n",
batchStatistics.getTransactionCount(),
batchStatistics.getValidDocumentCount());

Expand Down Expand Up @@ -333,10 +316,7 @@ public void recognizeEntitiesCodeSnippets() {

// Batch statistics
final TextDocumentBatchStatistics batchStatistics = recognizeEntitiesResults.getStatistics();
System.out.printf("Batch statistics, document count: %s, erroneous document count: %s, "
+ "transaction count: %s, valid document count: %s.%n",
batchStatistics.getDocumentCount(),
batchStatistics.getErroneousDocumentCount(),
System.out.printf("Batch statistics, transaction count: %s, valid document count: %s.%n",
batchStatistics.getTransactionCount(),
batchStatistics.getValidDocumentCount());

Expand Down Expand Up @@ -401,9 +381,7 @@ public void recognizePiiEntitiesCodeSnippets() {

// Batch statistics
final TextDocumentBatchStatistics batchStatistics = recognizeEntitiesResults.getStatistics();
System.out.printf("Batch statistics, document count: %s, erroneous document count: %s, "
+ "transaction count: %s, valid document count: %s.%n",
batchStatistics.getDocumentCount(),
System.out.printf("Batch statistics,transaction count: %s, valid document count: %s.%n",
batchStatistics.getTransactionCount(),
batchStatistics.getValidDocumentCount());

Expand All @@ -430,10 +408,7 @@ public void recognizePiiEntitiesCodeSnippets() {

// Batch statistics
final TextDocumentBatchStatistics batchStatistics = recognizeEntitiesResults.getStatistics();
System.out.printf("Batch statistics, document count: %s, erroneous document count: %s, "
+ "transaction count: %s, valid document count: %s.%n",
batchStatistics.getDocumentCount(),
batchStatistics.getErroneousDocumentCount(),
System.out.printf("Batch statistics,transaction count: %s, valid document count: %s.%n",
batchStatistics.getTransactionCount(),
batchStatistics.getValidDocumentCount());

Expand All @@ -460,10 +435,7 @@ public void recognizePiiEntitiesCodeSnippets() {

// Batch statistics
final TextDocumentBatchStatistics batchStatistics = recognizeEntitiesResults.getStatistics();
System.out.printf("Batch statistics, document count: %s, erroneous document count: %s, "
+ "transaction count: %s, valid document count: %s.%n",
batchStatistics.getDocumentCount(),
batchStatistics.getErroneousDocumentCount(),
System.out.printf("Batch statistics,transaction count: %s, valid document count: %s.%n",
batchStatistics.getTransactionCount(),
batchStatistics.getValidDocumentCount());

Expand Down Expand Up @@ -495,10 +467,7 @@ public void recognizePiiEntitiesCodeSnippets() {

// Batch statistics
final TextDocumentBatchStatistics batchStatistics = recognizeEntitiesResults.getStatistics();
System.out.printf("Batch statistics, document count: %s, erroneous document count: %s, "
+ "transaction count: %s, valid document count: %s.%n",
batchStatistics.getDocumentCount(),
batchStatistics.getErroneousDocumentCount(),
System.out.printf("Batch statistics,transaction count: %s, valid document count: %s.%n",
batchStatistics.getTransactionCount(),
batchStatistics.getValidDocumentCount());

Expand Down Expand Up @@ -559,9 +528,7 @@ public void recognizeLinkedEntitiesCodeSnippets() {

// Batch statistics
TextDocumentBatchStatistics batchStatistics = recognizeLinkedEntitiesResults.getStatistics();
System.out.printf("Batch statistics, document count: %s, erroneous document count: %s,"
+ " transaction count: %s, valid document count: %s.%n",
batchStatistics.getDocumentCount(),
System.out.printf("Batch statistics, transaction count: %s, valid document count: %s.%n",
batchStatistics.getTransactionCount(),
batchStatistics.getValidDocumentCount());

Expand All @@ -586,10 +553,7 @@ public void recognizeLinkedEntitiesCodeSnippets() {

// Batch statistics
TextDocumentBatchStatistics batchStatistics = recognizeLinkedEntitiesResults.getStatistics();
System.out.printf("Batch statistics, document count: %s, erroneous document count: %s, "
+ "transaction count: %s, valid document count: %s.%n",
batchStatistics.getDocumentCount(),
batchStatistics.getErroneousDocumentCount(),
System.out.printf("Batch statistics,transaction count: %s, valid document count: %s.%n",
batchStatistics.getTransactionCount(),
batchStatistics.getValidDocumentCount());

Expand All @@ -615,10 +579,7 @@ public void recognizeLinkedEntitiesCodeSnippets() {

// Batch statistics
final TextDocumentBatchStatistics batchStatistics = recognizeLinkedEntitiesResults.getStatistics();
System.out.printf("Batch statistics, document count: %s, erroneous document count: %s, "
+ "transaction count: %s, valid document count: %s.%n",
batchStatistics.getDocumentCount(),
batchStatistics.getErroneousDocumentCount(),
System.out.printf("Batch statistics,transaction count: %s, valid document count: %s.%n",
batchStatistics.getTransactionCount(),
batchStatistics.getValidDocumentCount());

Expand Down Expand Up @@ -651,8 +612,6 @@ public void recognizeLinkedEntitiesCodeSnippets() {
final TextDocumentBatchStatistics batchStatistics = recognizeLinkedEntitiesResults.getStatistics();
System.out.printf("Batch statistics, document count: %s, erroneous document count: %s, transaction"
+ " count: %s, valid document count: %s.%n",
batchStatistics.getDocumentCount(),
batchStatistics.getErroneousDocumentCount(),
batchStatistics.getTransactionCount(),
batchStatistics.getValidDocumentCount());

Expand Down Expand Up @@ -706,9 +665,8 @@ public void extractKeyPhrasesCodeSnippets() {

// Batch statistics
final TextDocumentBatchStatistics batchStatistics = extractKeyPhraseResults.getStatistics();
System.out.printf("Batch statistics, document count: %s, erroneous document count: %s,"
+ " transaction count: %s, valid document count: %s.%n",
batchStatistics.getDocumentCount(),
System.out.printf("Batch statistics, transaction count: %s, valid document count: %s.%n",
batchStatistics.getTransactionCount(),
batchStatistics.getTransactionCount(),
batchStatistics.getValidDocumentCount());

Expand All @@ -731,10 +689,7 @@ public void extractKeyPhrasesCodeSnippets() {

// Batch statistics
final TextDocumentBatchStatistics batchStatistics = extractKeyPhraseResults.getStatistics();
System.out.printf("Batch statistics, document count: %s, erroneous document count: %s, "
+ "transaction count: %s, valid document count: %s.%n",
batchStatistics.getDocumentCount(),
batchStatistics.getErroneousDocumentCount(),
System.out.printf("Batch statistics,transaction count: %s, valid document count: %s.%n",
batchStatistics.getTransactionCount(),
batchStatistics.getValidDocumentCount());

Expand All @@ -756,10 +711,7 @@ public void extractKeyPhrasesCodeSnippets() {

// Batch statistics
final TextDocumentBatchStatistics batchStatistics = extractKeyPhraseResults.getStatistics();
System.out.printf("Batch statistics, document count: %s, erroneous document count: %s, transaction count:"
+ " %s, valid document count: %s.%n",
batchStatistics.getDocumentCount(),
batchStatistics.getErroneousDocumentCount(),
System.out.printf("Batch statistics, transaction count: %s, valid document count: %s.%n",
batchStatistics.getTransactionCount(),
batchStatistics.getValidDocumentCount());

Expand All @@ -786,10 +738,7 @@ public void extractKeyPhrasesCodeSnippets() {

// Batch statistics
final TextDocumentBatchStatistics batchStatistics = extractKeyPhraseResults.getStatistics();
System.out.printf("Batch statistics, document count: %s, erroneous document count: %s, transaction"
+ " count: %s, valid document count: %s.%n",
batchStatistics.getDocumentCount(),
batchStatistics.getErroneousDocumentCount(),
System.out.printf("Batch statistics, transaction count: %s, valid document count: %s.%n",
batchStatistics.getTransactionCount(),
batchStatistics.getValidDocumentCount());

Expand All @@ -803,7 +752,6 @@ public void extractKeyPhrasesCodeSnippets() {
}

// Sentiment

/**
* Code snippet for recognizing entities
*/
Expand Down Expand Up @@ -861,9 +809,8 @@ public void analyzeSentimentCodeSnippets() {

// Batch statistics
final TextDocumentBatchStatistics batchStatistics = analyzeSentimentResults.getStatistics();
System.out.printf("Batch statistics, document count: %s, erroneous document count: %s,"
+ " transaction count: %s, valid document count: %s.%n",
batchStatistics.getDocumentCount(),
System.out.printf("Batch statistics, transaction count: %s, valid document count: %s.%n",
batchStatistics.getTransactionCount(),
batchStatistics.getTransactionCount(),
batchStatistics.getValidDocumentCount());

Expand Down Expand Up @@ -896,10 +843,7 @@ public void analyzeSentimentCodeSnippets() {

// Batch statistics
final TextDocumentBatchStatistics batchStatistics = analyzeSentimentResults.getStatistics();
System.out.printf("Batch statistics, document count: %s, erroneous document count: %s, "
+ "transaction count: %s, valid document count: %s.%n",
batchStatistics.getDocumentCount(),
batchStatistics.getErroneousDocumentCount(),
System.out.printf("Batch statistics,transaction count: %s, valid document count: %s.%n",
batchStatistics.getTransactionCount(),
batchStatistics.getValidDocumentCount());

Expand Down Expand Up @@ -932,10 +876,7 @@ public void analyzeSentimentCodeSnippets() {

// Batch statistics
final TextDocumentBatchStatistics batchStatistics = analyzeSentimentResults.getStatistics();
System.out.printf("Batch statistics, document count: %s, erroneous document count: %s, transaction count:"
+ " %s, valid document count: %s.%n",
batchStatistics.getDocumentCount(),
batchStatistics.getErroneousDocumentCount(),
System.out.printf("Batch statistics, transaction count: %s, valid document count: %s.%n",
batchStatistics.getTransactionCount(),
batchStatistics.getValidDocumentCount());

Expand Down Expand Up @@ -973,10 +914,7 @@ public void analyzeSentimentCodeSnippets() {

// Batch statistics
TextDocumentBatchStatistics batchStatistics = analyzeSentimentResults.getStatistics();
System.out.printf("Batch statistics, document count: %s, erroneous document count: %s, transaction"
+ " count: %s, valid document count: %s.%n",
batchStatistics.getDocumentCount(),
batchStatistics.getErroneousDocumentCount(),
System.out.printf("Batch statistics, transaction count: %s, valid document count: %s.%n",
batchStatistics.getTransactionCount(),
batchStatistics.getValidDocumentCount());

Expand Down

0 comments on commit d491816

Please sign in to comment.