class_docstr: Currently supports validation for: hexameter, hendecasyllables, pentameter.
class_docstr_tok: ["Currently","supports","validation","for",":","hexameter",",","hendecasyllables",",","pentameter","."]
docstr: Build a hexameter scansion template from string of 5 binary numbers;
  NOTE: Traditionally the fifth foot is dactyl and spondee substitution is rare,
  however since it *is* a possible combination, we include it here.
  
  :param stress_positions: 5 binary integers, indicating whether foot is dactyl or spondee
  :return: a valid hexameter scansion template, a string representing stressed and unstresssed syllables with the optional terminal ending.
  
  >>> print(MetricalValidator()._build_hexameter_template("01010"))
  -UU---UU---UU-X
docstr_tok: ["Build","a","hexameter","scansion","template","from","string","of","5","binary","numbers",";","NOTE",":","Traditionally","the","fifth","foot","is","dactyl","and","spondee","substitution","is","rare",",","however","since","it","*","is","*","a","possible","combination",",","we","include","it","here",".",":","param","stress_positions",":","5","binary","integers",",","indicating","whether","foot","is","dactyl","or","spondee",":","return",":","a","valid","hexameter","scansion","template",",","a","string","representing","stressed","and","unstresssed","syllables","with","the","optional","terminal","ending",".",">",">",">","print","(","MetricalValidator","(",")","._build_hexameter_template","(","``","01010","''",")",")","-UU","--","-UU","--","-UU-X"]
code: def _build_hexameter_template(self, stress_positions: str) -> str:
      """
      Build a hexameter scansion template from string of 5 binary numbers;
      NOTE: Traditionally the fifth foot is dactyl and spondee substitution is rare,
      however since it *is* a possible combination, we include it here.
  
      :param stress_positions: 5 binary integers, indicating whether foot is dactyl or spondee
      :return: a valid hexameter scansion template, a string representing stressed and unstresssed syllables with the optional terminal ending.
  
      >>> print(MetricalValidator()._build_hexameter_template("01010"))
      -UU---UU---UU-X
      """
      hexameter = []
      for binary in stress_positions:
          if binary == "1":
              hexameter.append(self.constants.SPONDEE)
          if binary == "0":
              hexameter.append(self.constants.DACTYL)
      hexameter.append(self.constants.HEXAMETER_ENDING)
      return "".join(hexameter)
  
file_path: cltk/src/cltk/prosody/lat/metrical_validator.py
imports: import logging
  from typing import List
  from rapidfuzz.distance import DamerauLevenshtein
  from cltk.prosody.lat.scansion_constants import ScansionConstants
label_desc: Use image node_id 13 for calling the MetricalValidator obj's underlying member method code with example usage: obj._build_hexameter_template(stress_positions) and returns: str