# Last edited on 2002-01-20 22:06:43 by stolfi function slot_extract(w, s) { # Extracts the tone mark(s) from a Vietnamese VIQR word. # If there is no tone mark, returns "". # Remove anything but tone marks: gsub(/[^`'?~.]/, "", w); return w; } function slot_factor(w) { # Trivial factorization (VIQR bytes) return gensub(/(.)/, "{\\1}", "g", w); }