nltk.parse.BllipParser.tagged_parse

BllipParser.tagged_parse(word_and_tag_pairs)[source]

Use BLLIP to parse a sentence. Takes a sentence as a list of (word, tag) tuples; the sentence must have already been tokenized and tagged. BLLIP will attempt to use the tags provided but may use others if it can’t come up with a complete parse subject to those constraints. You may also specify a tag as None to leave a token’s tag unconstrained.

Returns:An iterator that generates parse trees for the sentence

from most likely to least likely.

Parameters:sentence (list(tuple(str, str))) – Input sentence to parse as (word, tag) pairs
Return type:iter(Tree)