class_docstr: Prepossesses Latin text for prose rhythm analysis.
docstr: Return a flat list of rhythms.
  Desired clausula length is passed as a parameter. Clausula shorter than the specified
  length can be exluded.
  :return:
  
  >>> Scansion().scan_text('dedērunt te miror antōnī quorum. sī quid est in mē ingenī jūdicēs quod sentiō.')
  ['u--uuu---ux', 'u---u--u---ux']
docstr_tok: ["Return","a","flat","list","of","rhythms",".","Desired","clausula","length","is","passed","as","a","parameter",".","Clausula","shorter","than","the","specified","length","can","be","exluded",".",":","return",":",">",">",">","Scansion","(",")",".scan_text","(","'ded\u0113runt","te","miror","ant\u014dn\u012b","quorum",".","s\u012b","quid","est","in","m\u0113","ingen\u012b","j\u016bdic\u0113s","quod","senti\u014d",".","'",")","[","'","u","--","uuu","--","-ux","'",",","'","u","--","-u","--","u","--","-ux","'","]"]
code: def scan_text(self, text: str) -> List[str]:
      """
      Return a flat list of rhythms.
      Desired clausula length is passed as a parameter. Clausula shorter than the specified
      length can be exluded.
      :return:
  
      >>> Scansion().scan_text('dedērunt te miror antōnī quorum. sī quid est in mē ingenī jūdicēs quod sentiō.')
      ['u--uuu---ux', 'u---u--u---ux']
      """
      tokens = self.tokenize(text)
      clausulae = []
      for sentence in tokens:
          sentence_clausula = []
          syllables = [
              word["syllables"]
              for word in sentence["structured_sentence"]
          ]
          flat_syllables = [
              syllable for word in syllables for syllable in word
          ]
          if self.elide:
              flat_syllables = [
                  syll
                  for syll in flat_syllables
                  if not syll["elide"][0]
              ][:-1][::-1]
          for syllable in flat_syllables:
              if len(sentence_clausula) < self.clausula_length - 1:
                  if (
                      syllable["long_by_nature"]
                      or syllable["long_by_position"][0]
                  ):
                      sentence_clausula.append("-")
                  else:
                      sentence_clausula.append("u")
          sentence_clausula = sentence_clausula[::-1]
          sentence_clausula.append("x")
          clausulae.append("".join(sentence_clausula))
      clausulae = clausulae[:-1]
      return clausulae
  
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 5 for calling the Scansion obj's underlying member method code with example usage: obj.scan_text(text) and returns: clausulae