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: Check if syllable is long by position. Returns ``True``
  if syllable is long by position Long by position
  includes contexts when:
  
  1. Next syllable begins with two consonants, unless those consonants are a stop + liquid combination
  2. Next syllable begins with a double consonant
  3. Syllable ends with a consonant and the next syllable begins with a consonant
  
  Args:
      syllable: Current syllable
      sentence: Sentence in which syllable appears
  
  Returns:
      Whether or not a syllable is long by position
  
  >>> from cltk.prosody.grc import Scansion
  >>> syllables_sentence = ["μεν", "και", "α", "πει", "ρος"]
  >>> [Scansion()._long_by_position(syllable=syllable, sentence=syllables_sentence) for syllable in syllables_sentence]
  [True, False, False, False, False]
docstr_tok: ["Check","if","syllable","is","long","by","position",".","Returns","``","True","``","if","syllable","is","long","by","position","Long","by","position","includes","contexts","when",":","1",".","Next","syllable","begins","with","two","consonants",",","unless","those","consonants","are","a","stop","+","liquid","combination","2",".","Next","syllable","begins","with","a","double","consonant","3",".","Syllable","ends","with","a","consonant","and","the","next","syllable","begins","with","a","consonant","Args",":","syllable",":","Current","syllable","sentence",":","Sentence","in","which","syllable","appears","Returns",":","Whether","or","not","a","syllable","is","long","by","position",">",">",">","from","cltk.prosody.grc","import","Scansion",">",">",">","syllables_sentence","=","[","``","\u03bc\u03b5\u03bd","''",",","``","\u03ba\u03b1\u03b9","''",",","``","\u03b1","''",",","``","\u03c0\u03b5\u03b9","''",",","``","\u03c1\u03bf\u03c2","''","]",">",">",">","[","Scansion","(",")","._long_by_position","(","syllable=syllable",",","sentence=syllables_sentence",")","for","syllable","in","syllables_sentence","]","[","True",",","False",",","False",",","False",",","False","]"]
code: def _long_by_position(
      self, syllable: str, sentence: List[str]
  ) -> bool:
      """Check if syllable is long by position. Returns ``True``
      if syllable is long by position Long by position
      includes contexts when:
  
      1. Next syllable begins with two consonants, unless those consonants are a stop + liquid combination
      2. Next syllable begins with a double consonant
      3. Syllable ends with a consonant and the next syllable begins with a consonant
  
      Args:
          syllable: Current syllable
          sentence: Sentence in which syllable appears
  
      Returns:
          Whether or not a syllable is long by position
  
      >>> from cltk.prosody.grc import Scansion
      >>> syllables_sentence = ["μεν", "και", "α", "πει", "ρος"]
      >>> [Scansion()._long_by_position(syllable=syllable, sentence=syllables_sentence) for syllable in syllables_sentence]
      [True, False, False, False, False]
      """
      try:
          next_syll = sentence[sentence.index(syllable) + 1]
          # Long by position by case 1
          if (
              next_syll[0] in self.sing_cons
              and next_syll[1] in self.sing_cons
          ) and (
              next_syll[0] not in self.stops
              and next_syll[1] not in self.liquids
          ):
              return True
          # Long by position by case 2
          if (
              syllable[-1] in self.vowels
              and next_syll[0] in self.doub_cons
          ):
              return True
          # Long by position by case 3
          if syllable[-1] in self.sing_cons and (
              next_syll[0] in self.sing_cons
          ):
              return True
      except IndexError:
          logger.info(
              "IndexError while checking if syllable '%s' is long. Continuing.",
              syllable,
          )
      return False
  
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 8 for calling the Scansion obj's underlying member method code with example usage: obj._long_by_position(syllable, sentence) and returns: False, True, True, True