def parse(self, s, tokenize=True, tags=True, chunks=True, relations=False, lemmata=False, encoding="<STR_LIT:utf-8>", **kwargs):
<EOL>if tokenize is True:<EOL><INDENT>s = self.find_tokens(s, **kwargs)<EOL><DEDENT>if isinstance(s, (list, tuple)):<EOL><INDENT>s = [isinstance(s, basestring) and s.split("<STR_LIT:U+0020>") or s for s in s]<EOL><DEDENT>if isinstance(s, basestring):<EOL><INDENT>s = [s.split("<STR_LIT:U+0020>") for s in s.split("<STR_LIT:\n>")]<EOL><DEDENT>for i in range(len(s)):<EOL><INDENT>for j in range(len(s[i])):<EOL><INDENT>if isinstance(s[i][j], str):<EOL><INDENT>s[i][j] = decode_string(s[i][j], encoding)<EOL><DEDENT><DEDENT>if tags or chunks or relations or lemmata:<EOL><INDENT>s[i] = self.find_tags(s[i], **kwargs)<EOL><DEDENT>else:<EOL><INDENT>s[i] = [[w] for w in s[i]]<EOL><DEDENT>if chunks or relations:<EOL><INDENT>s[i] = self.find_chunks(s[i], **kwargs)<EOL><DEDENT>if relations:<EOL><INDENT>s[i] = self.find_labels(s[i], **kwargs)<EOL><DEDENT>if lemmata:<EOL><INDENT>s[i] = self.find_lemmata(s[i], **kwargs)<EOL><DEDENT><DEDENT>if not kwargs.get("<STR_LIT>", True)or kwargs.get("<STR_LIT>", False):<EOL><INDENT>return s<EOL><DEDENT>format = ["<STR_LIT>"]<EOL>if tags:<EOL><INDENT>format.append("<STR_LIT>")<EOL><DEDENT>if chunks:<EOL><INDENT>format.extend(("<STR_LIT>", "<STR_LIT>"))<EOL><DEDENT>if relations:<EOL><INDENT>format.append("<STR_LIT>")<EOL><DEDENT>if lemmata:<EOL><INDENT>format.append("<STR_LIT>")<EOL><DEDENT>for i in range(len(s)):<EOL><INDENT>for j in range(len(s[i])):<EOL><INDENT>s[i][j][<NUM_LIT:0>] = s[i][j][<NUM_LIT:0>].replace("<STR_LIT:/>", "<STR_LIT>")<EOL>s[i][j] = "<STR_LIT:/>".join(s[i][j])<EOL><DEDENT>s[i] = "<STR_LIT:U+0020>".join(s[i])<EOL><DEDENT>s = "<STR_LIT:\n>".join(s)<EOL>s = TaggedString(s, format, language=kwargs.get("<STR_LIT>", self.language))<EOL>return s<EOL>
Takes a string (sentences) and returns a tagged Unicode string (TaggedString).
            Sentences in the output are separated by newlines.
            With tokenize=True, punctuation is split from words and sentences are separated by \n.
            With tags=True, part-of-speech tags are parsed (NN, VB, IN, ...).
            With chunks=True, phrase chunk tags are parsed (NP, VP, PP, PNP, ...).
            With relations=True, semantic role labels are parsed (SBJ, OBJ).
            With lemmata=True, word lemmata are parsed.
            Optional parameters are passed to
            the tokenizer, tagger, chunker, labeler and lemmatizer.