#NEWLINE# def tagged_parse( self , word_and_tag_pairs ) : #NEWLINE# #INDENT# "\n        Use BLLIP to parse a sentence. Takes a sentence as a list of\n        (word, tag) tuples; the sentence must have already been tokenized\n        and tagged. BLLIP will attempt to use the tags provided but may\n        use others if it can't come up with a complete parse subject\n        to those constraints. You may also specify a tag as ``None``\n        to leave a token's tag unconstrained.\n\n        :return: An iterator that generates parse trees for the sentence\n        from most likely to least likely.\n\n        :param sentence: Input sentence to parse as (word, tag) pairs\n        :type sentence: list(tuple(str, str))\n        :rtype: iter(Tree)\n        " #NEWLINE# words = [ ] #NEWLINE# tag_map = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for ( i , ( word , tag ) ) in enumerate ( word_and_tag_pairs ) : #NEWLINE# #INDENT# words . append ( word ) #NEWLINE# if ( word_and_tag_pairs is not None ) : #NEWLINE# #INDENT# tag_map [ i ] = tag #NEWLINE# #UNINDENT# #UNINDENT# _ensure_ascii ( words ) #NEWLINE# nbest_list = self . rrp . parse_tagged ( words , tag_map ) #NEWLINE# for scored_parse in nbest_list : #NEWLINE# #INDENT# ( yield _scored_parse_to_nltk_tree ( scored_parse ) )