@@ -22,7 +22,7 @@ class CorenlpAdapter {
2222 * - sends request to online CoreNLP API
2323 * - returns JSON reply
2424 */
25- public function getServerOutputOnline (string $ text ){
25+ public function getServerOutputOnline ($ text ){
2626
2727 $ doc = new DomDocument ();
2828 $ doc ->loadHTMLfile (ONLINE_URL .urlencode ($ text ));
@@ -46,7 +46,7 @@ public function getServerOutputOnline(string $text){
4646 * @param string $text
4747 * @return type
4848 */
49- public function getServerOutput (string $ text ){
49+ public function getServerOutput ($ text ){
5050
5151 if (USE_GUZZLE ){
5252 $ this ->getOutputGuzzle ($ text );
@@ -92,7 +92,7 @@ public function getOutputGuzzle($text){
9292 *
9393 * - role: all-in-one function to make life easy for the user
9494 */
95- public function getOutput (string $ text ){
95+ public function getOutput ($ text ){
9696
9797 if (ONLINE_API ){
9898 // run the text through the public API
@@ -142,7 +142,7 @@ public function getOutput(string $text){
142142 * @param string $parse
143143 * @return array
144144 */
145- public function getTree (string $ parse ){
145+ public function getTree ($ parse ){
146146
147147 $ this ->getSentenceTree ($ parse ); // creates tree from parse, then saves tree in "mem"
148148 $ result = $ this ->mem ; // get tree from "mem"
@@ -157,7 +157,7 @@ public function getTree(string $parse){
157157 * @param array $sentence
158158 * @return array
159159 */
160- public function getTreeWithTokens (array $ sentence ){
160+ public function getTreeWithTokens ($ sentence ){
161161
162162 $ parse = $ sentence ['parse ' ];
163163 $ tokens = $ sentence ['tokens ' ];
@@ -217,7 +217,7 @@ private function resetSentenceTree(){
217217 *
218218 * @param string $sentence
219219 */
220- public function getSentenceTree (string $ sentence ){
220+ public function getSentenceTree ($ sentence ){
221221
222222 // parse the tree
223223 $ this ->sentenceTree = $ this ->runSentenceTree ($ sentence );
@@ -305,7 +305,7 @@ private function depthShiftDown(){
305305 * @param string $sentence
306306 * @return type
307307 */
308- private function runSentenceTree (string $ sentence )
308+ private function runSentenceTree ($ sentence )
309309 {
310310 $ arr = array ('pennTag ' => null );
311311 $ length = strlen ($ sentence );
@@ -347,7 +347,7 @@ private function runSentenceTree(string $sentence)
347347 * @param int $start_pos
348348 * @return type
349349 */
350- private function getMatchingBracket (string $ string , int $ start_pos )
350+ private function getMatchingBracket ($ string , $ start_pos )
351351 {
352352 $ length = strlen ($ string );
353353 $ bracket = 1 ;
@@ -370,7 +370,7 @@ private function getMatchingBracket(string $string, int $start_pos)
370370 */
371371
372372 // Get an array that contains the keys to words within one tree
373- public function getWordKeys (array $ tree ){
373+ public function getWordKeys ($ tree ){
374374
375375 $ result = array ();
376376
@@ -383,7 +383,7 @@ public function getWordKeys(array $tree){
383383 }
384384
385385 // Get an array with the tree leaves that contain words
386- public function getWordValues (array $ tree ){
386+ public function getWordValues ($ tree ){
387387
388388 $ result = array ();
389389
0 commit comments