File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
language/analysis/src/main/java/com/google/cloud/language/samples Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ public static void analyzeEntitiesFile(String gcsUri) throws Exception {
168168 * Identifies the sentiment in the string {@code text}.
169169 */
170170 public static Sentiment analyzeSentimentText (String text ) throws Exception {
171- // [START analyze_sentiment_text ]
171+ // [START language_sentiment_text ]
172172 // Instantiate the Language client com.google.cloud.language.v1.LanguageServiceClient
173173 try (LanguageServiceClient language = LanguageServiceClient .create ()) {
174174 Document doc = Document .newBuilder ()
@@ -185,14 +185,14 @@ public static Sentiment analyzeSentimentText(String text) throws Exception {
185185 }
186186 return sentiment ;
187187 }
188- // [END analyze_sentiment_text ]
188+ // [END language_sentiment_text ]
189189 }
190190
191191 /**
192192 * Gets {@link Sentiment} from the contents of the GCS hosted file.
193193 */
194194 public static Sentiment analyzeSentimentFile (String gcsUri ) throws Exception {
195- // [START analyze_sentiment_file ]
195+ // [START language_sentiment_file_gcs ]
196196 // Instantiate the Language client com.google.cloud.language.v1.LanguageServiceClient
197197 try (LanguageServiceClient language = LanguageServiceClient .create ()) {
198198 Document doc = Document .newBuilder ()
@@ -209,7 +209,7 @@ public static Sentiment analyzeSentimentFile(String gcsUri) throws Exception {
209209 }
210210 return sentiment ;
211211 }
212- // [END analyze_sentiment_file ]
212+ // [END language_sentiment_file_gcs ]
213213 }
214214
215215 /**
You can’t perform that action at this time.
0 commit comments