Skip to content

Commit e87451d

Browse files
committed
Updated spacing
1 parent e948319 commit e87451d

File tree

1 file changed

+25
-25
lines changed
  • articles/cognitive-services/text-analytics/includes/quickstarts

1 file changed

+25
-25
lines changed

articles/cognitive-services/text-analytics/includes/quickstarts/java-sdk.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ Create a method to instantiate the `TextAnalyticsClient` object with your `KEY`
9696
```java
9797
static TextAnalyticsClient authenticateClient(String key, String endpoint) {
9898
return new TextAnalyticsClientBuilder()
99-
.apiKey(new TextAnalyticsApiKeyCredential(key))
100-
.endpoint(endpoint)
101-
.buildClient();
99+
.apiKey(new TextAnalyticsApiKeyCredential(key))
100+
.endpoint(endpoint)
101+
.buildClient();
102102
}
103103
```
104104

@@ -124,11 +124,11 @@ static void sentimentAnalysisExample(TextAnalyticsClient client)
124124

125125
for (SentenceSentiment sentenceSentiment : documentSentiment.getSentences()) {
126126
System.out.printf(
127-
"Recognized sentence sentiment: %s, positive score: %s, neutral score: %s, negative score: %.2f.%n",
128-
sentenceSentiment.getSentiment(),
129-
sentenceSentiment.getSentimentScores().getPositive(),
130-
sentenceSentiment.getSentimentScores().getNeutral(),
131-
sentenceSentiment.getSentimentScores().getNegative());
127+
"Recognized sentence sentiment: %s, positive score: %s, neutral score: %s, negative score: %.2f.%n",
128+
sentenceSentiment.getSentiment(),
129+
sentenceSentiment.getSentimentScores().getPositive(),
130+
sentenceSentiment.getSentimentScores().getNeutral(),
131+
sentenceSentiment.getSentimentScores().getNegative());
132132
}
133133
}
134134
```
@@ -155,9 +155,9 @@ static void detectLanguageExample(TextAnalyticsClient client)
155155

156156
DetectedLanguage detectedLanguage = client.detectLanguage(text);
157157
System.out.printf("Detected primary language: %s, ISO 6391 name: %s, score: %s.%n",
158-
detectedLanguage.getName(),
159-
detectedLanguage.getIso6391Name(),
160-
detectedLanguage.getScore());
158+
detectedLanguage.getName(),
159+
detectedLanguage.getIso6391Name(),
160+
detectedLanguage.getScore());
161161
}
162162
```
163163

@@ -183,13 +183,13 @@ static void recognizeEntitiesExample(TextAnalyticsClient client)
183183

184184
for (CategorizedEntity entity : client.recognizeEntities(text)) {
185185
System.out.printf(
186-
"Recognized entity: %s, entity category: %s, entity sub-category: %s, offset: %s, length: %s, score: %s.%n",
187-
entity.getText(),
188-
entity.getCategory(),
189-
entity.getSubCategory() == null || entity.getSubCategory().isEmpty() ? "N/A" : entity.getSubCategory(),
190-
entity.getOffset(),
191-
entity.getLength(),
192-
entity.getScore());
186+
"Recognized entity: %s, entity category: %s, entity sub-category: %s, offset: %s, length: %s, score: %s.%n",
187+
entity.getText(),
188+
entity.getCategory(),
189+
entity.getSubCategory() == null || entity.getSubCategory().isEmpty() ? "N/A" : entity.getSubCategory(),
190+
entity.getOffset(),
191+
entity.getLength(),
192+
entity.getScore());
193193
}
194194
}
195195
```
@@ -213,13 +213,13 @@ static void recognizePIIEntitiesExample(TextAnalyticsClient client)
213213

214214
for (PiiEntity entity : client.recognizePiiEntities(text)) {
215215
System.out.printf(
216-
"Recognized personal identifiable information entity: %s, entity category: %s, entity sub-category: %s, offset: %s, length: %s, score: %s.%n",
217-
entity.getText(),
218-
entity.getCategory(),
219-
entity.getSubCategory() == null || entity.getSubCategory().isEmpty() ? "N/A" : entity.getSubCategory(),
220-
entity.getOffset(),
221-
entity.getLength(),
222-
entity.getScore());
216+
"Recognized personal identifiable information entity: %s, entity category: %s, entity sub-category: %s, offset: %s, length: %s, score: %s.%n",
217+
entity.getText(),
218+
entity.getCategory(),
219+
entity.getSubCategory() == null || entity.getSubCategory().isEmpty() ? "N/A" : entity.getSubCategory(),
220+
entity.getOffset(),
221+
entity.getLength(),
222+
entity.getScore());
223223
}
224224
}
225225
```

0 commit comments

Comments
 (0)