GENMODEL(1L)

NAME
genmodel

SYNOPSIS
genmodel [-b badWordFile] [-d inputDictionary] [-g grammar] [-i inputFile] [-j jumpOverFirstLineCount] [-m model] [-o outputDictionary] [-s] [[-u updateFreq]|[-q]]

DESCRIPTION
genmodel creates style sources from sample natural-language texts for use with the NICETEXT system.

OPTIONS

-b badWordFile
    Output a list of words that occurred in the input file but were not defined in the input dictionary.

-d inputDictionary
    Use inputDictionary as the prefix to select the input dictionary definition database. genmodel uses the input dictionary to assign types to words in the inputFile. For example: mstr specifies the database in the files mstrdict.dat mstrdict.alt mstrdict.jmp mstrtype.dat mstrtype.alt and mstrtype.jmp You may also include directory information in the prefix: ~/mydict/shak would point to ~/mydict/shakdict.dat ~/mydict/shakdict.jmp etc. The default input dictionary is mstr See sortdct(1L) and dct2mstr(1L) , to learn how to create the proper format dictionary tables.

-g grammar
    Output the generated style source into this grammar definition file. The grammar will consist of one rule with as many RHS rewrites as there are sentence models. This makes for a very inefficient use of the grammar-rule format. The reason for having the -g option is to assist in manual grammar definition. (To accomplish this, send individual sentences or fragments through genmodel to view the generated rules.)

-i inputFile
    Read sample natural-language texts from inputFile. The default is stdin.

-j jumpOverFirstLineCount
    Skip the first -j lines in the inputFile. NOTE: THIS OPTION MAY NOT BE AVAILABLE.

-m model
    Output the generated style-source into the sentence-model database with the model prefix. For example: mstr generates the database in the files mstrmodel.dat and mstrmodel.jmp You may also include directory information in the prefix: ~/mymodels/shak would point to ~/mymodels/shakmodel.dat and ~/mymodels/shakmodel.jmp The generation of sentence-model databases is the primary use of the genmodel program.

-o outputDictionary
    Create a new dictionary that is the subset of words in the inputDictionary that were defined in the inputFile. outputDictionary is the prefix for the distribution dictionary.

-s  Normally, the software loads all database tables into RAM before processing. The -s option instructs the software to read each record from the database tables on disk during analysis. The primary advantage is that the software has a significantly smaller memory footprint. Another advantage is that you do not need to wait to load the dictionary into RAM - which can take some time. The disadvantage is that processing of large input files is significantly slower. Use this option if you are processing a relatively small input file or if you get memory errors when running without -s set.

-u updateFreq
    Print status updates to stderr every updateFreq sentences. Use zero to disable updates. The following is the definition of the status information:

    SR: Number of sentences read from the inputFile

    US: Number of unique sentence-models read.

    WR: Number of words read.

    UW: Number of unique words read.

    BWR:
        Number of bad (undefined) words read.

    UBW:
        Number of unique bad words.

-q  Be quiet. This is the same as -u 0

EXAMPLES
It is strongly suggested that you try the examples in the tutorial directory of the NICETEXT distribution. For further information, please read the documentation in the doc directory.

SEE ALSO
bitcp(1L), dct2mstr(1L), expgram(1L), gramtest(1L), impkimmo(1L), impmsc(1L), impwbstr(1L), listword(1L), nicetext(1L), printint(1L), scramble(1L), sortdct(1L), txt2dct(1L).