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'
code: def morphology(self):
      self.casing = {
          "language": str.lower,
          "extlang": str.lower,
          "script": str.title,
          "region": str.upper,
          "variant": str.lower,
      }
      dig = "[0-9]"
      low = "[a-z]"
      up = "[A-Z]"
      alnum = "[a-zA-Z0-9]"
      self.format = {
          "language": re.compile(f"{low*3}?"),
          "extlang": re.compile(f"{low*3}"),
          "script": re.compile(f"{up}{low*3}"),
          "region": re.compile(f"({up*2})|({dig*3})"),
          "variant": re.compile(f"{alnum*4}{(alnum+'?')*4}"),
          "singleton": re.compile(f"{low}"),
      }
  
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 5 for calling the BCP47CorpusReader obj's underlying member method code with example usage: obj.morphology() without return types