Skip to content

Commit 68d1191

Browse files
committed
chore: fix region tag prefix
1 parent 039ae2f commit 68d1191

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

language/snippets/src/main/java/beta/example/language/AnalyzeBeta.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public static void main(String[] args) throws Exception {
6161

6262
/** Detects sentiments from the string {@code text}. */
6363
public static Sentiment analyzeSentimentText(String text, String lang) throws Exception {
64-
// [START beta_sentiment_text]
64+
// [START language_beta_sentiment_text]
6565
// Instantiate a beta client : com.google.cloud.language.v1beta2.LanguageServiceClient
6666
try (LanguageServiceClient language = LanguageServiceClient.create()) {
6767
// NL auto-detects the language, if not provided
@@ -87,12 +87,12 @@ public static Sentiment analyzeSentimentText(String text, String lang) throws Ex
8787
}
8888
return sentiment;
8989
}
90-
// [END beta_sentiment_text]
90+
// [END language_beta_sentiment_text]
9191
}
9292

9393
/** Detects categories in text using the Language Beta API. */
9494
public static void classifyText(String text) throws Exception {
95-
// [START classify_text]
95+
// [START language_classify_text]
9696
// Instantiate a beta client : com.google.cloud.language.v1beta2.LanguageServiceClient
9797
try (LanguageServiceClient language = LanguageServiceClient.create()) {
9898
// set content to the text string
@@ -107,12 +107,12 @@ public static void classifyText(String text) throws Exception {
107107
category.getName(), category.getConfidence());
108108
}
109109
}
110-
// [END classify_text]
110+
// [END language_classify_text]
111111
}
112112

113113
/** Detects categories in a GCS hosted file using the Language Beta API. */
114114
public static void classifyFile(String gcsUri) throws Exception {
115-
// [START classify_file]
115+
// [START language_classify_file]
116116
// Instantiate a beta client : com.google.cloud.language.v1beta2.LanguageServiceClient
117117
try (LanguageServiceClient language = LanguageServiceClient.create()) {
118118
// set the GCS content URI path
@@ -128,6 +128,6 @@ public static void classifyFile(String gcsUri) throws Exception {
128128
category.getName(), category.getConfidence());
129129
}
130130
}
131-
// [END classify_file]
131+
// [END language_classify_file]
132132
}
133133
}

0 commit comments

Comments
 (0)