Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: added comment on try/catch block #2980

Merged
merged 4 commits into from
May 28, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public static void asyncBatchAnnotateImages(String inputImageUri, String outputU

// The output is written to GCS with the provided output_uri as prefix
String gcsOutputUri = response.getOutputConfig().getGcsDestination().getUri();
System.out.printf("Output written to GCS with prefix: %s\n", gcsOutputUri);
System.out.format("Output written to GCS with prefix: %s%n", gcsOutputUri);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,17 @@ public static void batchAnnotateFiles(String filePath) throws IOException {
// sample.
for (AnnotateImageResponse imageResponse :
response.getResponsesList().get(0).getResponsesList()) {
System.out.printf("Full text: %s\n", imageResponse.getFullTextAnnotation().getText());
System.out.format("Full text: %s%n", imageResponse.getFullTextAnnotation().getText());
for (Page page : imageResponse.getFullTextAnnotation().getPagesList()) {
for (Block block : page.getBlocksList()) {
System.out.printf("\nBlock confidence: %s\n", block.getConfidence());
System.out.format("%nBlock confidence: %s%n", block.getConfidence());
for (Paragraph par : block.getParagraphsList()) {
System.out.printf("\tParagraph confidence: %s\n", par.getConfidence());
System.out.format("\tParagraph confidence: %s%n", par.getConfidence());
for (Word word : par.getWordsList()) {
System.out.printf("\t\tWord confidence: %s\n", word.getConfidence());
System.out.format("\t\tWord confidence: %s%n", word.getConfidence());
for (Symbol symbol : word.getSymbolsList()) {
System.out.printf(
"\t\t\tSymbol: %s, (confidence: %s)\n",
System.out.format(
"\t\t\tSymbol: %s, (confidence: %s)%n",
symbol.getText(), symbol.getConfidence());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,17 @@ public static void batchAnnotateFilesGcs(String gcsUri) throws IOException {
// sample.
for (AnnotateImageResponse imageResponse :
response.getResponsesList().get(0).getResponsesList()) {
System.out.printf("Full text: %s\n", imageResponse.getFullTextAnnotation().getText());
System.out.format("Full text: %s%n", imageResponse.getFullTextAnnotation().getText());
for (Page page : imageResponse.getFullTextAnnotation().getPagesList()) {
for (Block block : page.getBlocksList()) {
System.out.printf("\nBlock confidence: %s\n", block.getConfidence());
System.out.format("%nBlock confidence: %s%n", block.getConfidence());
for (Paragraph par : block.getParagraphsList()) {
System.out.printf("\tParagraph confidence: %s\n", par.getConfidence());
System.out.format("\tParagraph confidence: %s%n", par.getConfidence());
for (Word word : par.getWordsList()) {
System.out.printf("\t\tWord confidence: %s\n", word.getConfidence());
System.out.format("\t\tWord confidence: %s%n", word.getConfidence());
for (Symbol symbol : word.getSymbolsList()) {
System.out.printf(
"\t\t\tSymbol: %s, (confidence: %s)\n",
System.out.format(
"\t\t\tSymbol: %s, (confidence: %s)%n",
symbol.getText(), symbol.getConfidence());
}
}
Expand Down
Loading