class_docstr: Scans Greek texts that already contain macronized
  (i.e., long and shorts) texts.
class_docstr_tok: ["Scans","Greek","texts","that","already","contain","macronized","(","i.e.",",","long","and","shorts",")","texts","."]
docstr: First tokenize, then divide word tokens into a list of syllables.
  Note that a syllable in this instance is defined as a vocalic
  group (i.e., vowel or a diphthong). This means that all
  syllables which are not the last syllable in the word
  will end with a vowel or diphthong.
  
  Todo:
      * Determine whether a CLTK syllabifier could replace this.
  
  Args:
      sentences_words: Text string
  
  Returns:
      List of list of list of syllables
  
  >>> from cltk.prosody.grc import Scansion
  >>> text_string = "νέος μὲν καὶ ἄπειρος, δικῶν ἔγωγε ἔτι. μὲν καὶ ἄπειρος."
  >>> Scansion()._make_syllables(text_string)
  [[['νε', 'ος'], ['μεν'], ['και'], ['α', 'πει', 'ρος'], ['δι', 'κων'], ['ε', 'γω', 'γε'], ['ε', 'τι']], [['μεν'], ['και'], ['α', 'πει', 'ρος']]]
docstr_tok: ["First","tokenize",",","then","divide","word","tokens","into","a","list","of","syllables",".","Note","that","a","syllable","in","this","instance","is","defined","as","a","vocalic","group","(","i.e.",",","vowel","or","a","diphthong",")",".","This","means","that","all","syllables","which","are","not","the","last","syllable","in","the","word","will","end","with","a","vowel","or","diphthong",".","Todo",":","*","Determine","whether","a","CLTK","syllabifier","could","replace","this",".","Args",":","sentences_words",":","Text","string","Returns",":","List","of","list","of","list","of","syllables",">",">",">","from","cltk.prosody.grc","import","Scansion",">",">",">","text_string","=","``","\u03bd\u03ad\u03bf\u03c2","\u03bc\u1f72\u03bd","\u03ba\u03b1\u1f76","\u1f04\u03c0\u03b5\u03b9\u03c1\u03bf\u03c2",",","\u03b4\u03b9\u03ba\u1ff6\u03bd","\u1f14\u03b3\u03c9\u03b3\u03b5","\u1f14\u03c4\u03b9",".","\u03bc\u1f72\u03bd","\u03ba\u03b1\u1f76","\u1f04\u03c0\u03b5\u03b9\u03c1\u03bf\u03c2",".","''",">",">",">","Scansion","(",")","._make_syllables","(","text_string",")","[","[","[","'\u03bd\u03b5","'",",","'\u03bf\u03c2","'","]",",","[","'\u03bc\u03b5\u03bd","'","]",",","[","'\u03ba\u03b1\u03b9","'","]",",","[","'","\u03b1","'",",","'\u03c0\u03b5\u03b9","'",",","'\u03c1\u03bf\u03c2","'","]",",","[","'\u03b4\u03b9","'",",","'\u03ba\u03c9\u03bd","'","]",",","[","'","\u03b5","'",",","'\u03b3\u03c9","'",",","'\u03b3\u03b5","'","]",",","[","'","\u03b5","'",",","'\u03c4\u03b9","'","]","]",",","[","[","'\u03bc\u03b5\u03bd","'","]",",","[","'\u03ba\u03b1\u03b9","'","]",",","[","'","\u03b1","'",",","'\u03c0\u03b5\u03b9","'",",","'\u03c1\u03bf\u03c2","'","]","]","]"]
code: def _make_syllables(
      self, sentences_words: str
  ) -> List[List[List[str]]]:
      """First tokenize, then divide word tokens into a list of syllables.
      Note that a syllable in this instance is defined as a vocalic
      group (i.e., vowel or a diphthong). This means that all
      syllables which are not the last syllable in the word
      will end with a vowel or diphthong.
  
      Todo:
          * Determine whether a CLTK syllabifier could replace this.
  
      Args:
          sentences_words: Text string
  
      Returns:
          List of list of list of syllables
  
      >>> from cltk.prosody.grc import Scansion
      >>> text_string = "νέος μὲν καὶ ἄπειρος, δικῶν ἔγωγε ἔτι. μὲν καὶ ἄπειρος."
      >>> Scansion()._make_syllables(text_string)
      [[['νε', 'ος'], ['μεν'], ['και'], ['α', 'πει', 'ρος'], ['δι', 'κων'], ['ε', 'γω', 'γε'], ['ε', 'τι']], [['μεν'], ['και'], ['α', 'πει', 'ρος']]]
      """
      text = self._tokenize(sentences_words)
      all_syllables = list()
      for sentence in text:
          syll_per_sent = list()
          for word in sentence:
              syll_start = 0  # Begins syllable iterator
              syll_per_word = list()
              cur_letter_in = 0  # Begins general iterator
              while cur_letter_in < len(word):
                  letter = word[cur_letter_in]
                  if (cur_letter_in != len(word) - 1) and (
                      word[cur_letter_in] + word[cur_letter_in + 1]
                  ) in self.diphthongs:
                      cur_letter_in += 1
                      # Syllable ends with a diphthong
                      syll_per_word.append(
                          word[syll_start : cur_letter_in + 1]
                      )
                      syll_start = cur_letter_in + 1
                  elif (letter in self.vowels) or (
                      letter in self.long_vowels
                  ):
                      # Syllable ends with a vowel
                      syll_per_word.append(
                          word[syll_start : cur_letter_in + 1]
                      )
                      syll_start = cur_letter_in + 1
                  cur_letter_in += 1
              try:
                  last_vowel = syll_per_word[-1][
                      -1
                  ]  # Last vowel of a word
                  # Modifies general iterator to accomodate consonants after
                  # the last syllable in a word
                  cur_letter_in = len(word) - 1
                  # Contains all of the consonants after the last vowel in a word
                  leftovers = ""
                  while word[cur_letter_in] != last_vowel:
                      if word[cur_letter_in] != ".":
                          # Adds consonants to leftovers
                          leftovers = word[cur_letter_in] + leftovers
                      cur_letter_in -= 1
                  # Adds leftovers to last syllable in a word
                  syll_per_word[-1] += leftovers
                  syll_per_sent.append(syll_per_word)
              except IndexError:
                  logger.info(
                      "IndexError while making syllables of '%s'. Continuing.",
                      word,
                  )
          all_syllables.append(syll_per_sent)
      return all_syllables
  
file_path: cltk/src/cltk/prosody/grc.py
imports: from typing import List
  from cltk.core.cltk_logger import logger
label_desc: Use image node_id 10 for calling the Scansion obj's underlying member method code with example usage: obj._make_syllables(sentences_words) and returns: all_syllables