Annotates the given list of tokens with chunk tags. Several tags can be added, for example chunk + preposition tags.
(self, tokens, **kwargs)
| 531 | map = kwargs.get( "map", None)) |
| 532 | |
| 533 | def find_chunks(self, tokens, **kwargs): |
| 534 | """ Annotates the given list of tokens with chunk tags. |
| 535 | Several tags can be added, for example chunk + preposition tags. |
| 536 | """ |
| 537 | # [["The", "DT"], ["cat", "NN"], ["purs", "VB"]] => |
| 538 | # [["The", "DT", "B-NP"], ["cat", "NN", "I-NP"], ["purs", "VB", "B-VP"]] |
| 539 | return find_prepositions( |
| 540 | find_chunks(tokens, |
| 541 | language = kwargs.get("language", self.language))) |
| 542 | |
| 543 | def find_prepositions(self, tokens, **kwargs): |
| 544 | """ Annotates the given list of tokens with prepositional noun phrase tags. |