A list of Sentence objects parsed from the given string. The string is the Unicode return value from parse().
(self, string, token=[WORD, POS, CHUNK, PNP, REL, ANCHOR, LEMMA], language="en", encoding="utf-8")
| 1042 | class Text(list): |
| 1043 | |
| 1044 | def __init__(self, string, token=[WORD, POS, CHUNK, PNP, REL, ANCHOR, LEMMA], language="en", encoding="utf-8"): |
| 1045 | """ A list of Sentence objects parsed from the given string. |
| 1046 | The string is the Unicode return value from parse(). |
| 1047 | """ |
| 1048 | self.encoding = encoding |
| 1049 | # Extract token format from TokenString if possible. |
| 1050 | if _is_tokenstring(string): |
| 1051 | token, language = string.tags, getattr(string, "language", language) |
| 1052 | if string: |
| 1053 | for s in string.split("\n"): |
| 1054 | self.append(Sentence(s, token, language)) |
| 1055 | |
| 1056 | def insert(self, index, sentence): |
| 1057 | list.insert(self, index, sentence) |
nothing calls this directly
no test coverage detected