Textonyms: Difference between revisions

Content added Content deleted
imported>Meerkut
m (→‎AWK: Redundant variable assignment removed)
imported>Meerkut
m (→‎AWK: clarified that a message indicating that the key "99999" is present in the table, but the associated word for that key ("XXXX") is not found.)
Line 435: Line 435:
}
}
}
}
function userQuery( userasks,ss,nn,key,words){
function userQuery( userasks,ss,ss1,nn,key,words){
printf "txn>> "
printf "txn>> "
RS=OLD_RS
RS=OLD_RS
Line 452: Line 452:
ss=tolower(userasks)
ss=tolower(userasks)
if ((key=keySeq_orElse_zero(ss))>0) {
if ((key=keySeq_orElse_zero(ss))>0) {
printf "%s -> %s;%s in the table\n", ss,key,
ss1=(index((TXN[key][TOTAL]" ") , " "ss" ")>0) ?
((key in TXN) ?"":" not")
", and the word is in" : ", but the word is not in"
printf "%s -> %s; the key is%s in the table%s\n", ss,key,
((key in TXN) ?"":" not"),ss1
}
}
else {
else {
Line 483: Line 485:
textonym groups in the table: 4670
textonym groups in the table: 4670
txn>> cafe
txn>> cafe
cafe -> 2233; in the table
cafe -> 2233; the key is in the table, but the word is not in
txn>> 2233
2233 -> (3) abed aced bade
txn>> café
txn>> café
café -> not a valid word for the alphabet:
café -> not a valid word for the alphabet:
a b c d e f g h i j k l m n o p q r s t u v w x y z
a b c d e f g h i j k l m n o p q r s t u v w x y z
txn>> 2233
2233 -> (3) abed aced bade
txn>> --exit
txn>> --exit
$
$