File tree 1 file changed +4
-4
lines changed
language/analysis/src/main/java/com/google/cloud/language/samples
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -303,7 +303,7 @@ public static List<Token> analyzeSyntaxFile(String gcsUri) throws Exception {
303
303
* Detects categories in text using the Language Beta API.
304
304
*/
305
305
public static void classifyText (String text ) throws Exception {
306
- // [START classify_text ]
306
+ // [START language_classify_text ]
307
307
// Instantiate the Language client com.google.cloud.language.v1.LanguageServiceClient
308
308
try (LanguageServiceClient language = LanguageServiceClient .create ()) {
309
309
// set content to the text string
@@ -322,14 +322,14 @@ public static void classifyText(String text) throws Exception {
322
322
category .getName (), category .getConfidence ());
323
323
}
324
324
}
325
- // [END classify_text ]
325
+ // [END language_classify_text ]
326
326
}
327
327
328
328
/**
329
329
* Detects categories in a GCS hosted file using the Language Beta API.
330
330
*/
331
331
public static void classifyFile (String gcsUri ) throws Exception {
332
- // [START classify_file ]
332
+ // [START language_classify_file_gcs ]
333
333
// Instantiate the Language client com.google.cloud.language.v1.LanguageServiceClient
334
334
try (LanguageServiceClient language = LanguageServiceClient .create ()) {
335
335
// set the GCS content URI path
@@ -348,7 +348,7 @@ public static void classifyFile(String gcsUri) throws Exception {
348
348
category .getName (), category .getConfidence ());
349
349
}
350
350
}
351
- // [END classify_file ]
351
+ // [END language_classify_file_gcs ]
352
352
}
353
353
354
354
/**
You can’t perform that action at this time.
0 commit comments