File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313 echo 'Usage: php ' . __FILE__ . " --key <api_key> --url=<alternate_url> \n" ;
1414 exit ();
1515}
16- $ events_text_data = "I am looking for a flight to Los Angeles. " ;
16+
17+ $ events_text_data = "Alice has a flight to Budapest. She has not booked a hotel. " ;
1718$ api = isset ($ options ['url ' ]) ? new Api ($ options ['key ' ], $ options ['url ' ]) : new Api ($ options ['key ' ]);
1819$ params = new DocumentParameters ();
1920$ content = $ events_text_data ;
2627 error_log ($ e );
2728}
2829
29- // $api->setOption('negation', 'ONLY_NEGATIVE ');
30- // try {
31- // $result = $api->events($params);
32- // var_dump($result);
33- // } catch (RosetteException $e) {
34- // error_log($e);
35- // }
30+ $ api ->setOption ('negation ' , 'BOTH ' );
31+ try {
32+ $ result = $ api ->events ($ params );
33+ var_dump ($ result );
34+ } catch (RosetteException $ e ) {
35+ error_log ($ e );
36+ }
3637
You can’t perform that action at this time.
0 commit comments