def tag(self, sentence, tokenize=True):
<EOL>if sentence.strip() == "<STR_LIT>":<EOL><INDENT>return []<EOL><DEDENT>elif sentence.strip() in PUNCTUATION:<EOL><INDENT>if self.include_punc:<EOL><INDENT>_sym = sentence.strip()<EOL>if _sym in tuple('<STR_LIT>'):<EOL><INDENT>_tag = "<STR_LIT:.>"<EOL><DEDENT>else:<EOL><INDENT>_tag = _sym<EOL><DEDENT>return [(_sym, _tag)]<EOL><DEDENT>else:<EOL><INDENT>return []<EOL><DEDENT><DEDENT>if tokenize:<EOL><INDENT>_tokenized = "<STR_LIT:U+0020>".join(self.tokenizer.tokenize(sentence))<EOL>sentence = _tokenized<EOL><DEDENT>_tagged = pattern_tag(sentence, tokenize=False,<EOL>encoding=self.encoding,<EOL>tagset=self.tagset)<EOL>if self.include_punc:<EOL><INDENT>return _tagged<EOL><DEDENT>else:<EOL><INDENT>_tagged = [<EOL>(word, t) for word, t in _tagged if not PUNCTUATION_REGEX.match(<EOL>unicode(t))]<EOL>return _tagged<EOL><DEDENT>
Tag a string `sentence`.

        :param str or list sentence: A string or a list of sentence strings.
        :param tokenize: (optional) If ``False`` string has to be tokenized before
            (space separated string).