class_docstr: Parse BCP-47 composite language tags
  
  Supports all the main subtags, and the 'u-sd' extension:
  
  >>> from nltk.corpus import bcp47
  >>> bcp47.name('oc-gascon-u-sd-fr64')
  'Occitan (post 1500): Gascon: Pyrénées-Atlantiques'
  
  Can load a conversion table to Wikidata Q-codes:
  >>> bcp47.load_wiki_q()
  >>> bcp47.wiki_q['en-GI-spanglis']
  'Q79388'
docstr: Read the BCP-47 database
docstr_tok: ["Read","the","BCP-47","database"]
code: def __init__(self, root, fileids):
      """Read the BCP-47 database"""
      super().__init__(root, fileids)
      self.langcode = {}
      with self.open("iana/language-subtag-registry.txt") as fp:
          self.db = self.data_dict(fp.read().split("%%\n"))
      with self.open("cldr/common-subdivisions-en.xml") as fp:
          self.subdiv = self.subdiv_dict(
              et.parse(fp).iterfind(
                  "localeDisplayNames/subdivisions/subdivision"
              )
          )
      self.morphology()
  
file_path: nltk/nltk/corpus/reader/bcp47.py
imports: import re
  from warnings import warn
  from xml.etree import ElementTree
  from nltk.corpus.reader import CorpusReader
label_desc: Use image node_id 1 to create a new BCP47CorpusReader object from inherited base classes: CorpusReader with example: obj = BCP47CorpusReader(root, fileids)