original_docstring: 
      Converts an osis word to usfm3
      :param lexicon:
      :param word:
      :param passage: used for reporting errors.
      :return:
      
docstring: Converts an osis word to usfm3
docstring_tokens: Converts an osis word to usfm3
code: def convertWord(lexicon, word, passage=''):
      """
      Converts an osis word to usfm3
      :param lexicon:
      :param word:
      :param passage: used for reporting errors.
      :return:
      """
      logger = logging.getLogger(LOGGER_NAME)
      morph = ''
      strong = ''
      formatted_strong = ''
  
      if 'morph' in word.attrib:
          morph = word.attrib['morph']
          if morph[0] == 'H':
              morph = 'He,{}'.format(morph[1:])
          elif morph[0] == 'A':
              morph = 'Ar,{}'.format(morph[1:])
          else:
              raise Exception('Unknown language in morph at {}'.format(passage))
          morph = morph.replace('/', ':')
      # TRICKY: the lemma field contains the strong number
      if 'lemma' in word.attrib:
          strong, formatted_strong = parseStrong(word.attrib['lemma'].decode('utf-8'))
      else:
          logger.warn('Missing lemma in {} at {}'.format(word.text, passage))
      # TRICKY: look up the actual lemma from the strong
      lemma = getLemma(lexicon, 'H{}'.format(strong))
      if not lemma:
          lemma = ''
          logger.error('No match in lexicon for strong\'s "{}" at  {}'.format(word.attrib['lemma'].decode('utf-8'), passage))
      text = re.sub(r'/', u'\u2060', word.text)
  
      if morph:
          # validate morph and word component count
          if text.count(u'\u2060') != morph.count(':'):
              logger.warning('Word and morph components are not aligned at {}'.format(passage))
          return u'\w {}|lemma="{}" strong="{}" x-morph="{}" \w*'.format(
              text,
              lemma,
              formatted_strong,
              morph
          )
      else:
          return u'\w {}|lemma="{}" strong="{}" \w*'.format(
              text,
              lemma,
              formatted_strong
          )
code_tokens: def convertWord ( lexicon , word , passage = '' ) : logger = logging . getLogger ( LOGGER_NAME ) morph = '' strong = '' formatted_strong = '' if 'morph' in word . attrib : morph = word . attrib [ 'morph' ] if morph [ 0 ] == 'H' : morph = 'He,{}' . format ( morph [ 1 : ] ) elif morph [ 0 ] == 'A' : morph = 'Ar,{}' . format ( morph [ 1 : ] ) else : raise Exception ( 'Unknown language in morph at {}' . format ( passage ) ) morph = morph . replace ( '/' , ':' ) if 'lemma' in word . attrib : strong , formatted_strong = parseStrong ( word . attrib [ 'lemma' ] . decode ( 'utf-8' ) ) else : logger . warn ( 'Missing lemma in {} at {}' . format ( word . text , passage ) ) lemma = getLemma ( lexicon , 'H{}' . format ( strong ) ) if not lemma : lemma = '' logger . error ( 'No match in lexicon for strong\'s "{}" at  {}' . format ( word . attrib [ 'lemma' ] . decode ( 'utf-8' ) , passage ) ) text = re . sub ( r'/' , u'\u2060' , word . text ) if morph : if text . count ( u'\u2060' ) != morph . count ( ':' ) : logger . warning ( 'Word and morph components are not aligned at {}' . format ( passage ) ) return u'\w {}|lemma="{}" strong="{}" x-morph="{}" \w*' . format ( text , lemma , formatted_strong , morph ) else : return u'\w {}|lemma="{}" strong="{}" \w*' . format ( text , lemma , formatted_strong )
short_docstring: Converts an osis word to usfm3
short_docstring_tokens: Converts an osis word to usfm3
comment: """
      Converts an osis word to usfm3
      :param lexicon:
      :param word:
      :param passage: used for reporting errors.
      :return:
      """$SEP$# TRICKY: the lemma field contains the strong number$SEP$# TRICKY: look up the actual lemma from the strong$SEP$# validate morph and word component count