File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
examples/src/main/java/com/ibm/watson/developer_cloud/tone_analyzer/v3 Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,7 @@ public class ToneAnalyzerExample {
2323
2424
2525 public static void main (String [] args ) {
26- final String VERSION_DATE = "2016-05-19" ;
27- ToneAnalyzer service = new ToneAnalyzer (VERSION_DATE );
26+ ToneAnalyzer service = new ToneAnalyzer ("2017-09-21" );
2827 service .setUsernameAndPassword ("<username>" , "<password>" );
2928
3029 String [] texts = {
Original file line number Diff line number Diff line change 1313package com .ibm .watson .developer_cloud .tone_analyzer .v3 ;
1414
1515import com .ibm .watson .developer_cloud .tone_analyzer .v3 .model .ToneAnalysis ;
16+ import com .ibm .watson .developer_cloud .tone_analyzer .v3 .model .ToneOptions ;
1617
1718public class ToneAnalyzerExample {
1819
1920
2021 public static void main (String [] args ) {
21- final String VERSION_DATE = "2016-05-19" ;
22- ToneAnalyzer service = new ToneAnalyzer (VERSION_DATE );
22+ ToneAnalyzer service = new ToneAnalyzer ("2017-09-21" );
2323 service .setUsernameAndPassword ("<username>" , "<password>" );
2424
2525 String text = "I know the times are difficult! Our sales have been "
@@ -33,8 +33,10 @@ public static void main(String[] args) {
3333 + "business outcomes. Economy has nothing to do with it." ;
3434
3535 // Call the service and get the tone
36- ToneOptions tonOptions = new ToneOptions .Builder ().text (text ).build ();
37- ToneAnalysis tone = service .tone (tonOptions ).execute ();
36+ ToneOptions toneOptions = new ToneOptions .Builder ()
37+ .text (text )
38+ .build ();
39+ ToneAnalysis tone = service .tone (toneOptions ).execute ();
3840 System .out .println (tone );
3941
4042 }
You can’t perform that action at this time.
0 commit comments