class_docstr: The scansion symbols used can be configured by passing a suitable constants class to
  the constructor.
docstr: Accent vowels according to the rules of scansion.
  
  :param verse_line: a line of unaccented verse
  :return: the same line with vowels accented by position
  
  >>> print(VerseScanner().accent_by_position(
  ... "Arma virumque cano, Troiae qui primus ab oris").lstrip())
  Ārma virūmque canō  Trojae qui primus ab oris
docstr_tok: ["Accent","vowels","according","to","the","rules","of","scansion",".",":","param","verse_line",":","a","line","of","unaccented","verse",":","return",":","the","same","line","with","vowels","accented","by","position",">",">",">","print","(","VerseScanner","(",")",".accent_by_position","(","...","``","Arma","virumque","cano",",","Troiae","qui","primus","ab","oris","''",")",".lstrip","(",")",")","\u0100rma","vir\u016bmque","can\u014d","Trojae","qui","primus","ab","oris"]
code: def accent_by_position(self, verse_line: str) -> str:
      """
      Accent vowels according to the rules of scansion.
  
      :param verse_line: a line of unaccented verse
      :return: the same line with vowels accented by position
  
      >>> print(VerseScanner().accent_by_position(
      ... "Arma virumque cano, Troiae qui primus ab oris").lstrip())
      Ārma virūmque canō  Trojae qui primus ab oris
      """
      line = verse_line.translate(self.punctuation_substitutions)
      line = self.transform_i_to_j(line)
      marks = list(line)
  
      # locate and save dipthong positions since we don't want them being accented
      dipthong_positions = []
      for dipth in self.constants.DIPTHONGS:
          if dipth in line:
              dipthong_positions.append(line.find(dipth))
  
      # Vowels followed by 2 consonants
      # The digraphs ch, ph, th, qu and sometimes gu and su count as single consonants.
      # see http://people.virginia.edu/~jdk3t/epicintrog/scansion.htm
      marks = string_utils.overwrite(
          marks,
          "[{}][{}][{}]".format(
              self.constants.VOWELS,
              self.constants.CONSONANTS,
              self.constants.CONSONANTS_WO_H,
          ),
          self.constants.STRESSED,
      )
      # one space (or more for 'dropped' punctuation may intervene)
      marks = string_utils.overwrite(
          marks,
          r"[{}][{}]\s*[{}]".format(
              self.constants.VOWELS,
              self.constants.CONSONANTS,
              self.constants.CONSONANTS_WO_H,
          ),
          self.constants.STRESSED,
      )
      # ... if both consonants are in the next word, the vowel may be long
      # .... but it could be short if the vowel is not on the thesis/emphatic part of the foot
      # ... see Gildersleeve and Lodge p.446
      marks = string_utils.overwrite(
          marks,
          r"[{}]\s*[{}][{}]".format(
              self.constants.VOWELS,
              self.constants.CONSONANTS,
              self.constants.CONSONANTS_WO_H,
          ),
          self.constants.STRESSED,
      )
      #  x is considered as two letters
      marks = string_utils.overwrite(
          marks,
          "[{}][xX]".format(self.constants.VOWELS),
          self.constants.STRESSED,
      )
      #  z is considered as two letters
      marks = string_utils.overwrite(
          marks,
          r"[{}][zZ]".format(self.constants.VOWELS),
          self.constants.STRESSED,
      )
      original_verse = list(line)
      for idx, word in enumerate(original_verse):
          if marks[idx] == self.constants.STRESSED:
              original_verse[idx] = self.constants.VOWELS_TO_ACCENTS[
                  original_verse[idx]
              ]
      # make sure dipthongs aren't accented
      for idx in dipthong_positions:
          if (
              original_verse[idx + 1]
              in self.constants.ACCENTS_TO_VOWELS
          ):
              original_verse[
                  idx + 1
              ] = self.constants.ACCENTS_TO_VOWELS[
                  original_verse[idx + 1]
              ]
  
      return "".join(original_verse)
  
imports: import logging
  import re
  from typing import Any, Dict, List
  import cltk.prosody.lat.string_utils
  from cltk.prosody.lat.metrical_validator import MetricalValidator
  from cltk.prosody.lat.scansion_constants import ScansionConstants
  from cltk.prosody.lat.scansion_formatter import ScansionFormatter
  from cltk.prosody.lat.syllabifier import Syllabifier
  from cltk.prosody.lat.verse import Verse
label_desc: Use image node_id 4 for calling the VerseScanner obj's underlying member method code with example usage: obj.accent_by_position(verse_line) and returns: str