#AWK script to handle transduction of running Mixtec text. Attempts to handle both Mixtec and Spanish. #Version: 5 #Foma Mixtec version: 39 (wt39.bin) #2018-02-14 { del=0 for (i=1; i<=NF; i++) { if ($i ~ /^\[.*\]$/ && $i != "[...]") continue; if ($i ~ /^\[/ && $i !~ /\]/) del=1 if (del == 0) { if ($i !~ /[1234]/ || $i ~ /\*/) { cmd = "echo \"" $i "\" | flookup -ix minspan_deletes-punct.bin | head -1" } else { cmd = "echo \"" $i "\" | flookup -ix wt39_deletes-punct.bin | head -1" } cmd | getline out[i] close(cmd) printf "%s ", out[i] } if ($i ~ /\]/) del=0 } printf "\n" }