class_docstr: Prepossesses Latin text for prose rhythm analysis.
docstr: Tokenize syllables for word.
  "mihi" -> [{"syllable": "mi", index: 0, ... } ... ]
  Syllable properties:
  syllable: string -> syllable
  index: int -> postion in word
  long_by_nature: bool -> is syllable long by nature
  accented: bool -> does receive accent
  long_by_position: bool -> is syllable long by position
  :param word: string
  :return: list
  
  >>> Scansion()._tokenize_syllables("mihi")
  [{'syllable': 'mi', 'index': 0, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (False, None), 'accented': True}, {'syllable': 'hi', 'index': 1, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (False, None), 'accented': False}]
  >>> Scansion()._tokenize_syllables("ivi")
  [{'syllable': 'i', 'index': 0, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (False, None), 'accented': True}, {'syllable': 'vi', 'index': 1, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (False, None), 'accented': False}]
  >>> Scansion()._tokenize_syllables("audītū")
  [{'syllable': 'au', 'index': 0, 'elide': (False, None), 'long_by_nature': True, 'long_by_position': (False, None), 'accented': False}, {'syllable': 'dī', 'index': 1, 'elide': (False, None), 'long_by_nature': True, 'long_by_position': (False, None), 'accented': True}, {'syllable': 'tū', 'index': 2, 'elide': (False, None), 'long_by_nature': True, 'long_by_position': (False, None), 'accented': False}]
  >>> Scansion()._tokenize_syllables("ā")
  [{'syllable': 'ā', 'index': 0, 'elide': (False, None), 'long_by_nature': True, 'long_by_position': (False, None), 'accented': True}]
  >>> Scansion()._tokenize_syllables("conjiciō")
  [{'syllable': 'con', 'index': 0, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (True, None), 'accented': False}, {'syllable': 'ji', 'index': 1, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (False, None), 'accented': True}, {'syllable': 'ci', 'index': 2, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (False, None), 'accented': False}, {'syllable': 'ō', 'index': 3, 'elide': (False, None), 'long_by_nature': True, 'long_by_position': (False, None), 'accented': False}]
  >>> Scansion()._tokenize_syllables("lingua")
  [{'syllable': 'lin', 'index': 0, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (True, None), 'accented': True}, {'syllable': 'gua', 'index': 1, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (False, None), 'accented': False}]
  >>> Scansion()._tokenize_syllables("abrante")
  [{'syllable': 'ab', 'index': 0, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (False, 'mute+liquid'), 'accented': False}, {'syllable': 'ran', 'index': 1, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (True, None), 'accented': True}, {'syllable': 'te', 'index': 2, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (False, None), 'accented': False}]
  >>> Scansion()._tokenize_syllables("redemptor")
  [{'syllable': 'red', 'index': 0, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (False, None), 'accented': False}, {'syllable': 'em', 'index': 1, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (True, None), 'accented': True}, {'syllable': 'ptor', 'index': 2, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (False, None), 'accented': False}]
  >>> Scansion()._tokenize_syllables("nagrante")
  [{'syllable': 'na', 'index': 0, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (False, 'mute+liquid'), 'accented': False}, {'syllable': 'gran', 'index': 1, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (True, None), 'accented': True}, {'syllable': 'te', 'index': 2, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (False, None), 'accented': False}]
docstr_tok: ["Tokenize","syllables","for","word",".","``","mihi","''","-",">","[","{","``","syllable","''",":","``","mi","''",",","index",":","0",",","...","}","...","]","Syllable","properties",":","syllable",":","string","-",">","syllable","index",":","int","-",">","postion","in","word","long_by_nature",":","bool","-",">","is","syllable","long","by","nature","accented",":","bool","-",">","does","receive","accent","long_by_position",":","bool","-",">","is","syllable","long","by","position",":","param","word",":","string",":","return",":","list",">",">",">","Scansion","(",")","._tokenize_syllables","(","``","mihi","''",")","[","{","'syllable","'",":","'mi","'",",","'index","'",":","0",",","'elide","'",":","(","False",",","None",")",",","'long_by_nature","'",":","False",",","'long_by_position","'",":","(","False",",","None",")",",","'accented","'",":","True","}",",","{","'syllable","'",":","'hi","'",",","'index","'",":","1",",","'elide","'",":","(","False",",","None",")",",","'long_by_nature","'",":","False",",","'long_by_position","'",":","(","False",",","None",")",",","'accented","'",":","False","}","]",">",">",">","Scansion","(",")","._tokenize_syllables","(","``","ivi","''",")","[","{","'syllable","'",":","'","i","'",",","'index","'",":","0",",","'elide","'",":","(","False",",","None",")",",","'long_by_nature","'",":","False",",","'long_by_position","'",":","(","False",",","None",")",",","'accented","'",":","True","}",",","{","'syllable","'",":","'vi","'",",","'index","'",":","1",",","'elide","'",":","(","False",",","None",")",",","'long_by_nature","'",":","False",",","'long_by_position","'",":","(","False",",","None",")",",","'accented","'",":","False","}","]",">",">",">","Scansion","(",")","._tokenize_syllables","(","``","aud\u012bt\u016b","''",")","[","{","'syllable","'",":","'au","'",",","'index","'",":","0",",","'elide","'",":","(","False",",","None",")",",","'long_by_nature","'",":","True",",","'long_by_position","'",":","(","False",",","None",")",",","'accented","'",":","False","}",",","{","'syllable","'",":","'d\u012b","'",",","'index","'",":","1",",","'elide","'",":","(","False",",","None",")",",","'long_by_nature","'",":","True",",","'long_by_position","'",":","(","False",",","None",")",",","'accented","'",":","True","}",",","{","'syllable","'",":","'t\u016b","'",",","'index","'",":","2",",","'elide","'",":","(","False",",","None",")",",","'long_by_nature","'",":","True",",","'long_by_position","'",":","(","False",",","None",")",",","'accented","'",":","False","}","]",">",">",">","Scansion","(",")","._tokenize_syllables","(","``","\u0101","''",")","[","{","'syllable","'",":","'","\u0101","'",",","'index","'",":","0",",","'elide","'",":","(","False",",","None",")",",","'long_by_nature","'",":","True",",","'long_by_position","'",":","(","False",",","None",")",",","'accented","'",":","True","}","]",">",">",">","Scansion","(",")","._tokenize_syllables","(","``","conjici\u014d","''",")","[","{","'syllable","'",":","'con","'",",","'index","'",":","0",",","'elide","'",":","(","False",",","None",")",",","'long_by_nature","'",":","False",",","'long_by_position","'",":","(","True",",","None",")",",","'accented","'",":","False","}",",","{","'syllable","'",":","'ji","'",",","'index","'",":","1",",","'elide","'",":","(","False",",","None",")",",","'long_by_nature","'",":","False",",","'long_by_position","'",":","(","False",",","None",")",",","'accented","'",":","True","}",",","{","'syllable","'",":","'ci","'",",","'index","'",":","2",",","'elide","'",":","(","False",",","None",")",",","'long_by_nature","'",":","False",",","'long_by_position","'",":","(","False",",","None",")",",","'accented","'",":","False","}",",","{","'syllable","'",":","'","\u014d","'",",","'index","'",":","3",",","'elide","'",":","(","False",",","None",")",",","'long_by_nature","'",":","True",",","'long_by_position","'",":","(","False",",","None",")",",","'accented","'",":","False","}","]",">",">",">","Scansion","(",")","._tokenize_syllables","(","``","lingua","''",")","[","{","'syllable","'",":","'lin","'",",","'index","'",":","0",",","'elide","'",":","(","False",",","None",")",",","'long_by_nature","'",":","False",",","'long_by_position","'",":","(","True",",","None",")",",","'accented","'",":","True","}",",","{","'syllable","'",":","'gua","'",",","'index","'",":","1",",","'elide","'",":","(","False",",","None",")",",","'long_by_nature","'",":","False",",","'long_by_position","'",":","(","False",",","None",")",",","'accented","'",":","False","}","]",">",">",">","Scansion","(",")","._tokenize_syllables","(","``","abrante","''",")","[","{","'syllable","'",":","'ab","'",",","'index","'",":","0",",","'elide","'",":","(","False",",","None",")",",","'long_by_nature","'",":","False",",","'long_by_position","'",":","(","False",",","'mute+liquid","'",")",",","'accented","'",":","False","}",",","{","'syllable","'",":","'ran","'",",","'index","'",":","1",",","'elide","'",":","(","False",",","None",")",",","'long_by_nature","'",":","False",",","'long_by_position","'",":","(","True",",","None",")",",","'accented","'",":","True","}",",","{","'syllable","'",":","'te","'",",","'index","'",":","2",",","'elide","'",":","(","False",",","None",")",",","'long_by_nature","'",":","False",",","'long_by_position","'",":","(","False",",","None",")",",","'accented","'",":","False","}","]",">",">",">","Scansion","(",")","._tokenize_syllables","(","``","redemptor","''",")","[","{","'syllable","'",":","'red","'",",","'index","'",":","0",",","'elide","'",":","(","False",",","None",")",",","'long_by_nature","'",":","False",",","'long_by_position","'",":","(","False",",","None",")",",","'accented","'",":","False","}",",","{","'syllable","'",":","'em","'",",","'index","'",":","1",",","'elide","'",":","(","False",",","None",")",",","'long_by_nature","'",":","False",",","'long_by_position","'",":","(","True",",","None",")",",","'accented","'",":","True","}",",","{","'syllable","'",":","'ptor","'",",","'index","'",":","2",",","'elide","'",":","(","False",",","None",")",",","'long_by_nature","'",":","False",",","'long_by_position","'",":","(","False",",","None",")",",","'accented","'",":","False","}","]",">",">",">","Scansion","(",")","._tokenize_syllables","(","``","nagrante","''",")","[","{","'syllable","'",":","'na","'",",","'index","'",":","0",",","'elide","'",":","(","False",",","None",")",",","'long_by_nature","'",":","False",",","'long_by_position","'",":","(","False",",","'mute+liquid","'",")",",","'accented","'",":","False","}",",","{","'syllable","'",":","'gran","'",",","'index","'",":","1",",","'elide","'",":","(","False",",","None",")",",","'long_by_nature","'",":","False",",","'long_by_position","'",":","(","True",",","None",")",",","'accented","'",":","True","}",",","{","'syllable","'",":","'te","'",",","'index","'",":","2",",","'elide","'",":","(","False",",","None",")",",","'long_by_nature","'",":","False",",","'long_by_position","'",":","(","False",",","None",")",",","'accented","'",":","False","}","]"]
code: def _tokenize_syllables(self, word: str) -> List[Dict]:
      """
      Tokenize syllables for word.
      "mihi" -> [{"syllable": "mi", index: 0, ... } ... ]
      Syllable properties:
      syllable: string -> syllable
      index: int -> postion in word
      long_by_nature: bool -> is syllable long by nature
      accented: bool -> does receive accent
      long_by_position: bool -> is syllable long by position
      :param word: string
      :return: list
  
      >>> Scansion()._tokenize_syllables("mihi")
      [{'syllable': 'mi', 'index': 0, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (False, None), 'accented': True}, {'syllable': 'hi', 'index': 1, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (False, None), 'accented': False}]
      >>> Scansion()._tokenize_syllables("ivi")
      [{'syllable': 'i', 'index': 0, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (False, None), 'accented': True}, {'syllable': 'vi', 'index': 1, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (False, None), 'accented': False}]
      >>> Scansion()._tokenize_syllables("audītū")
      [{'syllable': 'au', 'index': 0, 'elide': (False, None), 'long_by_nature': True, 'long_by_position': (False, None), 'accented': False}, {'syllable': 'dī', 'index': 1, 'elide': (False, None), 'long_by_nature': True, 'long_by_position': (False, None), 'accented': True}, {'syllable': 'tū', 'index': 2, 'elide': (False, None), 'long_by_nature': True, 'long_by_position': (False, None), 'accented': False}]
      >>> Scansion()._tokenize_syllables("ā")
      [{'syllable': 'ā', 'index': 0, 'elide': (False, None), 'long_by_nature': True, 'long_by_position': (False, None), 'accented': True}]
      >>> Scansion()._tokenize_syllables("conjiciō")
      [{'syllable': 'con', 'index': 0, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (True, None), 'accented': False}, {'syllable': 'ji', 'index': 1, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (False, None), 'accented': True}, {'syllable': 'ci', 'index': 2, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (False, None), 'accented': False}, {'syllable': 'ō', 'index': 3, 'elide': (False, None), 'long_by_nature': True, 'long_by_position': (False, None), 'accented': False}]
      >>> Scansion()._tokenize_syllables("lingua")
      [{'syllable': 'lin', 'index': 0, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (True, None), 'accented': True}, {'syllable': 'gua', 'index': 1, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (False, None), 'accented': False}]
      >>> Scansion()._tokenize_syllables("abrante")
      [{'syllable': 'ab', 'index': 0, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (False, 'mute+liquid'), 'accented': False}, {'syllable': 'ran', 'index': 1, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (True, None), 'accented': True}, {'syllable': 'te', 'index': 2, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (False, None), 'accented': False}]
      >>> Scansion()._tokenize_syllables("redemptor")
      [{'syllable': 'red', 'index': 0, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (False, None), 'accented': False}, {'syllable': 'em', 'index': 1, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (True, None), 'accented': True}, {'syllable': 'ptor', 'index': 2, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (False, None), 'accented': False}]
      >>> Scansion()._tokenize_syllables("nagrante")
      [{'syllable': 'na', 'index': 0, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (False, 'mute+liquid'), 'accented': False}, {'syllable': 'gran', 'index': 1, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (True, None), 'accented': True}, {'syllable': 'te', 'index': 2, 'elide': (False, None), 'long_by_nature': False, 'long_by_position': (False, None), 'accented': False}]
      """
      syllable_tokens = []
      syllables = self.syllabifier.syllabify(word)
  
      longs = self.LONG_VOWELS + self.DIPHTHONGS
  
      for i, _ in enumerate(syllables):
          # basic properties
          syllable_dict = {
              "syllable": syllables[i],
              "index": i,
              "elide": (False, None),
          }
  
          # is long by nature
          if any(long in syllables[i] for long in longs):
              if syllables[i][:3] != "qui":
                  syllable_dict["long_by_nature"] = True
              else:
                  syllable_dict["long_by_nature"] = False
          else:
              syllable_dict["long_by_nature"] = False
  
          # long by position intra word
          if (
              i < len(syllables) - 1
              and syllable_dict["syllable"][-1] in self.CONSONANTS
          ):
              if (
                  syllable_dict["syllable"][-1] in self.MUTES
                  and syllables[i + 1][0] in self.LIQUIDS
                  and syllable_dict["syllable"][-1]
                  + syllables[i + 1][0]
                  not in self.MUTE_LIQUID_EXCEPTIONS
              ):
                  syllable_dict["long_by_position"] = (
                      False,
                      "mute+liquid",
                  )
              elif (
                  syllable_dict["syllable"][-1]
                  in self.DOUBLE_CONSONANTS
                  or syllables[i + 1][0] in self.CONSONANTS
              ):
                  syllable_dict["long_by_position"] = (True, None)
              else:
                  syllable_dict["long_by_position"] = (False, None)
          elif (
              i < len(syllables) - 1
              and syllable_dict["syllable"][-1] in self.VOWELS
              and len(syllables[i + 1]) > 1
          ):
              if (
                  syllables[i + 1][0] in self.MUTES
                  and syllables[i + 1][1] in self.LIQUIDS
                  and syllables[i + 1][0] + syllables[i + 1][1]
                  not in self.MUTE_LIQUID_EXCEPTIONS
              ):
                  syllable_dict["long_by_position"] = (
                      False,
                      "mute+liquid",
                  )
              elif (
                  syllables[i + 1][0] in self.CONSONANTS
                  and syllables[i + 1][1] in self.CONSONANTS
                  or syllables[i + 1][0] in self.DOUBLE_CONSONANTS
              ):
                  syllable_dict["long_by_position"] = (True, None)
              else:
                  syllable_dict["long_by_position"] = (False, None)
          elif (
              len(syllable_dict["syllable"]) > 2
              and syllable_dict["syllable"][-1] in self.CONSONANTS
              and syllable_dict["syllable"][-2] in self.CONSONANTS
              and syllable_dict["syllable"][-3] in self.VOWELS
          ):
              syllable_dict["long_by_position"] = (True, None)
          else:
              syllable_dict["long_by_position"] = (False, None)
  
          syllable_tokens.append(syllable_dict)
  
          # is accented
          if len(syllables) > 2 and i == len(syllables) - 2:
              if (
                  syllable_dict["long_by_nature"]
                  or syllable_dict["long_by_position"][0]
              ):
                  syllable_dict["accented"] = True
              else:
                  syllable_tokens[i - 1]["accented"] = True
          elif len(syllables) == 2 and i == 0 or len(syllables) == 1:
              syllable_dict["accented"] = True
  
          syllable_dict["accented"] = (
              False if "accented" not in syllable_dict else True
          )
  
      return syllable_tokens
  
file_path: cltk/src/cltk/prosody/lat/scanner.py
imports: from typing import Dict, List
  from cltk.prosody.lat.syllabifier import Syllabifier
label_desc: Use image node_id 2 for calling the Scansion obj's underlying member method code with example usage: obj._tokenize_syllables(word) and returns: syllable_tokens