Table of Contents

NAME

fsa_hash - convert words to numbers, and numbers to words

SYNOPSIS

fsa_hash -N [ options ] [ <infile ] [ >outfile ]

fsa_hash -W [ options ] [ <infile ] [ >outfile ]

DESCRIPTION

fsa_hash reads lines from the input. Each line contains either one word, or one number. Every word is looked up in specified dictionaries. If the word is found, its number is printed, if not, -1 is printed. Every number is treated as a word number. The word corresponding to that number is printed, or an error message if the word is not present in the dictionary. Note that fsa_hash is only a demo of what the underlying funtions can do.

OPTIONS

-d dictionary
use that dictionary. Several dictionaries may be given. At least one dictionary must be specified. Only the first dictionary is used. Dictionaries are automata built using fsa_build or fsa_ubuild.
-N
convert words into numbers.
-W
convert numbers into words.
-i input_file
specifies a file with words to be corrected. More than one file can be specified in this way (i.e. the option can be used more than once). In absence of this option, standard input is used.
-l language_file
specifies a file that hold language specific information, i.e. (for now) characters that form words, and pairs of (lowercase, uppercase) characters for case conversion. If the option is not specified, latin letters with standard case conversions wil be used.

Note: whether this information will be used or not depends on the module used for I/O handling (one_word_io or text_io).

-v
prints version details.

EXIT STATUS

  1. OK
  2. Invalid option, or lack of a required option.
  3. Dictionary file could not be opened.
  4. Not enough memory.

SEE ALSO

fsa_accent(1) , fsa_build(1) , fsa_guess(1) , fsa_morph(1) , fsa_prefix(1) , fsa_spell(1) , fsa_ubuild(1) , fsa_visual(1) .

BUGS

Send bug reports to the author: Jan Daciuk, jjaannddaacc@eti.pg.gda.pl (correct the stuttering!).


Table of Contents