class_docstr: Corpus reader for the SemCor 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()``.
code: def _word(xmlword, unit, pos_tag, sem_tag, wordnet):
      tkn = xmlword.text
      if not tkn:
          tkn = ""  # fixes issue 337?
  
      lemma = xmlword.get("lemma", tkn)  # lemma or NE class
      lexsn = xmlword.get(
          "lexsn"
      )  # lex_sense (locator for the lemma's sense)
      if lexsn is not None:
          sense_key = lemma + "%" + lexsn
          wnpos = ("n", "v", "a", "r", "s")[
              int(lexsn.split(":")[0]) - 1
          ]  # see http://wordnet.princeton.edu/man/senseidx.5WN.html
      else:
          sense_key = wnpos = None
      redef = xmlword.get(
          "rdf", tkn
      )  # redefinition--this indicates the lookup string
      # does not exactly match the enclosed string, e.g. due to typographical adjustments
      # or discontinuity of a multiword expression. If a redefinition has occurred,
      # the "rdf" attribute holds its inflected form and "lemma" holds its lemma.
      # For NEs, "rdf", "lemma", and "pn" all hold the same value (the NE class).
      sensenum = xmlword.get("wnsn")  # WordNet sense number
      isOOVEntity = (
          "pn" in xmlword.keys()
      )  # a "personal name" (NE) not in WordNet
      pos = xmlword.get(
          "pos"
      )  # part of speech for the whole chunk (None for punctuation)
  
      if unit == "token":
          if not pos_tag and not sem_tag:
              itm = tkn
          else:
              itm = (
                  (tkn,)
                  + ((pos,) if pos_tag else ())
                  + (
                      (lemma, wnpos, sensenum, isOOVEntity)
                      if sem_tag
                      else ()
                  )
              )
          return itm
      else:
          ww = tkn.split(
              "_"
          )  # TODO: case where punctuation intervenes in MWE
          if unit == "word":
              return ww
          else:
              if sensenum is not None:
                  try:
                      sense = wordnet.lemma_from_key(
                          sense_key
                      )  # Lemma object
                  except Exception:
                      # cannot retrieve the wordnet.Lemma object. possible reasons:
                      #  (a) the wordnet corpus is not downloaded;
                      #  (b) a nonexistent sense is annotated: e.g., such.s.00 triggers:
                      #  nltk.corpus.reader.wordnet.WordNetError: No synset found for key u'such%5:00:01:specified:00'
                      # solution: just use the lemma name as a string
                      try:
                          sense = "%s.%s.%02d" % (
                              lemma,
                              wnpos,
                              int(sensenum),
                          )  # e.g.: reach.v.02
                      except ValueError:
                          sense = (
                              lemma + "." + wnpos + "." + sensenum
                          )  # e.g. the sense number may be "2;1"
  
              bottom = [Tree(pos, ww)] if pos_tag else ww
  
              if sem_tag and isOOVEntity:
                  if sensenum is not None:
                      return Tree(sense, [Tree("NE", bottom)])
                  else:  # 'other' NE
                      return Tree("NE", bottom)
              elif sem_tag and sensenum is not None:
                  return Tree(sense, bottom)
              elif pos_tag:
                  return bottom[0]
              else:
                  return bottom
  
imports: from nltk.corpus.reader.api import *
  from nltk.corpus.reader.xmldocs import XMLCorpusReader, XMLCorpusView
  from nltk.tree import Tree
label_desc: Use image node_id 10 for calling the SemcorCorpusReader obj's underlying member method code with example usage: obj._word(xmlword, unit, pos_tag, sem_tag, wordnet) and returns: itm, ww, Tree, Tree, Tree, bottom, bottom