# Last edited on 2002-01-16 02:57:23 by stolfi
# Sampling functions for geez/gok
# Ge'ez (classic Ethiopian) - "Glory of the Kings",
# in the stadard SERA encoding.
# To be included in select-evt-lines, fix-raw-words, select-gud-bad-words

function select_evt_line(subsec,chapter,unit,linenum)
{
  # Consider only chapter titles (unit type "T") and running text ("P"):
  if (subsec = "bod.1")
    { return ((chapter ~ /^[a]/) && (unit ~ /^[TP]/)); }
  else
    { arg_error(("bad subsection \"" subsec "\"")); }
}

function fix_raw_word(word)
{
  # No special processing:
  return word;
}

function define_patterns()
{
  # No patterns needed 
}

function is_good_word(word)
{ 
  # Accept upper and lower case alpha, plus apostrophe
  # and backquote (as charater prefixes only):
  return ((word ~ /^([`']?[a-zA-Z])+$/));
}