@@ -278,14 +278,14 @@ discard block |
||
| 278 | 278 | public function transformBetweenNounAndVerb($tags, $i, $token) |
| 279 | 279 | { |
| 280 | 280 | # Noun to verb if the word before is 'would' |
| 281 | - if ($tags[$i - 1]['token'] === 'would' && $this->isSingularNoun($tags[$i]['tag'])) { |
|
| 281 | + if ($tags[$i-1]['token'] === 'would' && $this->isSingularNoun($tags[$i]['tag'])) { |
|
| 282 | 282 | $tags[$i]['tag'] = 'VB'; |
| 283 | 283 | } |
| 284 | 284 | |
| 285 | 285 | # If we get noun noun, and the 2nd can be a verb, convert to verb |
| 286 | 286 | if ($this->tokenExists($token) |
| 287 | 287 | && $this->isNoun($tags[$i]['tag']) |
| 288 | - && $this->isNoun($tags[$i - 1]['tag']) |
|
| 288 | + && $this->isNoun($tags[$i-1]['tag']) |
|
| 289 | 289 | ) { |
| 290 | 290 | if ($this->isPastTenseVerb($token)) { |
| 291 | 291 | $tags[$i]['tag'] = 'VBN'; |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | } |
| 296 | 296 | |
| 297 | 297 | # Converts verbs after 'the' to nouns |
| 298 | - if ($tags[$i - 1]['tag'] === 'DT' && $this->isVerb($tags[$i]['tag'])) { |
|
| 298 | + if ($tags[$i-1]['tag'] === 'DT' && $this->isVerb($tags[$i]['tag'])) { |
|
| 299 | 299 | $tags[$i]['tag'] = 'NN'; |
| 300 | 300 | } |
| 301 | 301 | |