@@ -235,6 +235,9 @@ discard block |
||
| 235 | 235 | return $tag; |
| 236 | 236 | } |
| 237 | 237 | |
| 238 | + /** |
|
| 239 | + * @param integer $i |
|
| 240 | + */ |
|
| 238 | 241 | public function transformNounToVerb($tags, $i, $token) { |
| 239 | 242 | # Noun to verb if the word before is 'would' |
| 240 | 243 | if ($this->isSingularNoun($tags[$i]['tag']) && strtolower($tags[$i-1]['token']) == 'would') { |
@@ -256,6 +259,9 @@ discard block |
||
| 256 | 259 | return $tags[$i]['tag']; |
| 257 | 260 | } |
| 258 | 261 | |
| 262 | + /** |
|
| 263 | + * @param integer $i |
|
| 264 | + */ |
|
| 259 | 265 | public function transformVerbToNoun($tags, $i) { |
| 260 | 266 | # Converts verbs after 'the' to nouns |
| 261 | 267 | if ($tags[$i-1]['tag'] == 'DT' && $this->isVerb($tags[$i]['tag'])) { |
@@ -265,6 +271,9 @@ discard block |
||
| 265 | 271 | return $tags[$i]['tag']; |
| 266 | 272 | } |
| 267 | 273 | |
| 274 | + /** |
|
| 275 | + * @param string $tag |
|
| 276 | + */ |
|
| 268 | 277 | public function transformNumerics($tag, $token) { |
| 269 | 278 | # tag numerals, cardinals, money (NNS) |
| 270 | 279 | if (preg_match(NUMERAL, $token)) { |