Module Expr Str ImportFrom alias ImportFrom alias alias alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore IfExp NameLoad Str Str Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore IfExp NameLoad Str Str Return Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore IfExp AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Return Call NameLoad ListComp Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad comprehension NameStore Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore ListLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr For NameStore Call AttributeLoad NameLoad attr Str body Assign NameStore ListLoad For NameStore Call NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Assign NameStore Str If BoolOpOr NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If CompareEq NameLoad Str body Assign NameStore TupleLoad NameLoad Call AttributeLoad NameLoad attr Str orelse If CompareEq NameLoad Str body Assign NameStore TupleLoad NameLoad Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad Assert CompareNotIn NameLoad NameLoad Return NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body If CompareIs NameLoad NameLoad body Assign NameStore ListLoad For NameStore NameLoad body If CompareIn AttributeLoad NameLoad attr TupleLoad Str Str body Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call NameLoad NameLoad NameLoad Return NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Call NameLoad ListLoad Str Str Str Str Str Str Str Str Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str If NameLoad body Assign NameStore Str orelse Assign NameStore Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Dict Num TupleLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str If NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad Str attr GeneratorExp Call AttributeLoad AttributeLoad NameLoad attr attr comprehension NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str If NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad Str attr GeneratorExp Call AttributeLoad AttributeLoad NameLoad attr attr comprehension NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str If NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad Str attr GeneratorExp Call AttributeLoad AttributeLoad NameLoad attr attr comprehension NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str If NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad Str attr GeneratorExp Call AttributeLoad Str attr GeneratorExp Call AttributeLoad AttributeLoad NameLoad attr attr comprehension NameStore NameLoad comprehension NameStore NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr NameLoad orelse Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Assign NameStore Str If BoolOpOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore TupleLoad NameLoad Call AttributeLoad NameLoad attr Str orelse If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore TupleLoad NameLoad Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore ListLoad For NameStore NameLoad body If CompareIn AttributeLoad NameLoad attr TupleLoad Str Str Str Str body AugAssignAdd NameStore ListComp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad orelse If CompareIn AttributeLoad NameLoad attr TupleLoad Str Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad orelse If CompareNotIn AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str AttributeLoad NameLoad attr Return Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str NameLoad decorator_list decorator_list
N/A N/A Corpus reader for the XML version of the British National Corpus. nltk.corpus.reader.util concat nltk.corpus.reader.xmldocs XMLCorpusReader XMLCorpusView ElementTree BNCCorpusReader N/A XMLCorpusReader N/A N/A Corpus reader for the XML version of the British National Corpus.

    For access to the complete XML data structure, use the ``xml()``
    method.  For access to simple word lists and tagged word lists, use
    ``words()``, ``sents()``, ``tagged_words()``, and ``tagged_sents()``.

    You can obtain the full version of the BNC corpus at
    http://www.ota.ox.ac.uk/desc/2554

    If you extracted the archive to a directory called `BNC`, then you can
    instantiate the reader as::

        BNCCorpusReader(root='BNC/Texts/', fileids=r'[A-K]/\w*/\w*\.xml')

     __init__ N/A N/A self root fileids lazy N/A True N/A N/A N/A N/A XMLCorpusReader __init__ self root fileids N/A N/A self _lazy lazy N/A words N/A N/A self fileids strip_space stem N/A None True False N/A N/A 
        :return: the given file(s) as a list of words
            and punctuation symbols.
        :rtype: list(str)

        :param strip_space: If true, then strip trailing spaces from
            word tokens.  Otherwise, leave the spaces on the tokens.
        :param stem: If true, then use word stems instead of word strings.
         N/A N/A N/A self _views fileids False None strip_space stem N/A tagged_words N/A N/A self fileids c5 strip_space stem N/A None False True False N/A N/A 
        :return: the given file(s) as a list of tagged
            words and punctuation symbols, encoded as tuples
            ``(word,tag)``.
        :rtype: list(tuple(str,str))

        :param c5: If true, then the tags used will be the more detailed
            c5 tags.  Otherwise, the simplified tags will be used.
        :param strip_space: If true, then strip trailing spaces from
            word tokens.  Otherwise, leave the spaces on the tokens.
        :param stem: If true, then use word stems instead of word strings.
         N/A tag N/A c5 c5 pos N/A N/A N/A self _views fileids False tag strip_space stem N/A sents N/A N/A self fileids strip_space stem N/A None True False N/A N/A 
        :return: the given file(s) as a list of
            sentences or utterances, each encoded as a list of word
            strings.
        :rtype: list(list(str))

        :param strip_space: If true, then strip trailing spaces from
            word tokens.  Otherwise, leave the spaces on the tokens.
        :param stem: If true, then use word stems instead of word strings.
         N/A N/A N/A self _views fileids True None strip_space stem N/A tagged_sents N/A N/A self fileids c5 strip_space stem N/A None False True False N/A N/A 
        :return: the given file(s) as a list of
            sentences, each encoded as a list of ``(word,tag)`` tuples.
        :rtype: list(list(tuple(str,str)))

        :param c5: If true, then the tags used will be the more detailed
            c5 tags.  Otherwise, the simplified tags will be used.
        :param strip_space: If true, then strip trailing spaces from
            word tokens.  Otherwise, leave the spaces on the tokens.
        :param stem: If true, then use word stems instead of word strings.
         N/A tag N/A c5 c5 pos N/A N/A N/A self _views fileids sent True tag tag strip_space strip_space stem stem N/A _views N/A N/A self fileids sent tag strip_space stem N/A None False False True False N/A N/A A helper function that instantiates BNCWordViews or the list of words/sentences. N/A f N/A N/A self _lazy BNCWordView N/A self _words N/A N/A concat N/A N/A f fileid sent tag strip_space stem N/A fileid N/A N/A self abspaths fileids N/A _words N/A N/A self fileid bracket_sent tag strip_space stem N/A N/A N/A 
        Helper used to implement the view methods -- returns a list of
        words or a list of sentences, optionally tagged.

        :param fileid: The name of the underlying file.
        :param bracket_sent: If true, include sentence bracketing.
        :param tag: The name of the tagset to use, or None for no tags.
        :param strip_space: If true, strip spaces from word tokens.
        :param stem: If true, then substitute stems for words.
         N/A result N/A N/A xmldoc N/A N/A N/A N/A ElementTree parse fileid getroot N/A xmlsent N/A N/A xmldoc findall .//s N/A N/A sent N/A N/A xmlword N/A _all_xmlwords_in xmlsent N/A N/A word N/A xmlword text N/A N/A word N/A N/A word N/A N/A strip_space stem N/A N/A word N/A N/A word strip N/A stem N/A N/A word N/A N/A xmlword get hw word N/A N/A tag c5 N/A N/A word N/A word N/A N/A xmlword get c5 N/A N/A N/A tag pos N/A N/A word N/A word N/A N/A xmlword get pos N/A N/A xmlword get c5 N/A N/A N/A sent append word N/A bracket_sent N/A N/A N/A N/A result append N/A BNCSentence N/A N/A xmlsent attrib N/A n sent N/A N/A N/A N/A result extend sent N/A N/A None result N/A result N/A N/A _all_xmlwords_in N/A N/A elt result N/A None N/A N/A N/A result None N/A N/A result N/A N/A child elt N/A N/A N/A N/A child tag N/A c w N/A N/A N/A N/A result append child N/A N/A N/A _all_xmlwords_in child result N/A result N/A BNCSentence N/A list N/A N/A 
    A list of words, augmented by an attribute ``num`` used to record
    the sentence identifier (the ``n`` attribute from the XML).
     __init__ N/A N/A self num items N/A N/A N/A N/A self num num N/A N/A N/A list __init__ self items N/A N/A BNCWordView N/A XMLCorpusView N/A N/A 
    A stream backed corpus view specialized for use with the BNC corpus.
     N/A tags_to_ignore N/A set N/A pb gap vocal event unclear shift pause align N/A These tags are ignored. For their description refer to the
    technical documentation, for example,
    http://www.natcorp.ox.ac.uk/docs/URG/ref-vocal.html

     __init__ N/A N/A self fileid sent tag strip_space stem N/A N/A N/A 
        :param fileid: The name of the underlying file.
        :param sent: If true, include sentence bracketing.
        :param tag: The name of the tagset to use, or None for no tags.
        :param strip_space: If true, strip spaces from word tokens.
        :param stem: If true, then substitute stems for words.
         N/A sent N/A N/A tagspec .*/s N/A N/A tagspec .*/s/(.*/)?(c|w) N/A N/A self _sent sent N/A N/A self _tag tag N/A N/A self _strip_space strip_space N/A N/A self _stem stem N/A N/A self title None N/A N/A self author None N/A N/A self editor None N/A N/A self resps None N/A N/A N/A XMLCorpusView __init__ self fileid tagspec N/A N/A N/A self _open N/A N/A N/A self read_block N/A self _stream .*/teiHeader$ N/A self handle_header N/A N/A N/A self close N/A N/A self _tag_context N/A 0 N/A N/A handle_header N/A N/A self elt context N/A N/A N/A titles N/A N/A elt findall titleStmt/title N/A titles N/A N/A N/A self title N/A N/A join N/A N/A N/A N/A title text strip N/A title titles N/A authors N/A N/A elt findall titleStmt/author N/A authors N/A N/A N/A self author N/A N/A join N/A N/A N/A N/A author text strip N/A author authors N/A editors N/A N/A elt findall titleStmt/editor N/A editors N/A N/A N/A self editor N/A N/A join N/A N/A N/A N/A editor text strip N/A editor editors N/A resps N/A N/A elt findall titleStmt/respStmt N/A resps N/A N/A N/A self resps N/A N/A join N/A N/A N/A join N/A N/A N/A N/A resp_elt text strip N/A resp_elt resp N/A resp resps N/A handle_elt N/A N/A self elt context N/A N/A N/A N/A self _sent N/A N/A N/A N/A self handle_sent elt N/A N/A N/A N/A self handle_word elt N/A handle_word N/A N/A self elt N/A N/A N/A word N/A elt text N/A N/A word N/A N/A word N/A N/A N/A self _strip_space N/A self _stem N/A N/A word N/A N/A word strip N/A N/A self _stem N/A N/A word N/A N/A elt get hw word N/A N/A N/A self _tag c5 N/A N/A word N/A word N/A N/A elt get c5 N/A N/A N/A N/A self _tag pos N/A N/A word N/A word N/A N/A elt get pos N/A N/A elt get c5 N/A word N/A handle_sent N/A N/A self elt N/A N/A N/A sent N/A N/A child elt N/A N/A N/A N/A child tag N/A mw hi corr trunc N/A N/A sent N/A N/A N/A self handle_word w N/A w child N/A N/A N/A N/A child tag N/A w c N/A N/A N/A N/A sent append N/A N/A self handle_word child N/A N/A N/A N/A child tag N/A self tags_to_ignore N/A N/A N/A ValueError N/A Unexpected element %s N/A child tag N/A N/A BNCSentence N/A N/A elt attrib N/A n sent N/A N/A