NICETEXT(1L)

NAME
nicetext

SYNOPSIS
nicetext -i inputFile [[-g grammar]|[-m model]] [-d dictionary] [-o outputFile] [-s] [-l maxModelLength] [[-u updateFreq]|[-q]]

DESCRIPTION
nicetext is a program that converts any file into pseudo-natural-language text.

A companion program (scramble(1L)), converts the natural-language text back into the original file as long as the dictionary is the same for both applications. The nicetext program may generate different pseudo-natural-language texts for the same input file with the same dictionary. It is strongly recommended that you go through the tutorial supplied with the software. It demonstrates the flexibility in defining dictionaries and style sources for nicetext generation. The .ps or .pdf files in the doc directory of the distribution contain detailed papers on the theory of operation, etc.

QUICK-AND-DIRTY-DEMONSTRATION
If you are looking for a quick demonstration, try running the qstart-nttpd shell-script. You may then go to http://localhost:2119/ with your favorite browser to try some transformations.

OPTIONS

-d dictionary
    Use dictionary as the prefix to select the dictionary definition database. 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 dictionary is mstr See sortdct(1L) and dct2mstr(1L) , to learn how to create the proper format dictionary tables.

-g grammar
    Use the grammar defined in this (fully qualified) file name as the style-source. Note that -g and -m are mutually exclusive.

-i inputFile
    This is the file that will be used for input. Right now, nicetext is not designed to work with non-file streams because it stores the length of the file within the pseudo-natural-language output.

-l maxModelLength
    This is the maximum sentence-model length that will be used if you are using a grammar-definition file (-g) for a style-source. This is important, since cyclic grammars could produce an infinitly long sentence model which would take forever to complete! Note that the length of a sentence model counts punctuation as elements in the sentence model. The default value is 1024.

-m model
    Use model as the prefix to select the style-source definition database. For example: mstr specifies 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 default model is mstr See (genmodel(1L)), to find out how to create custom sentence-model style sources from sample texts. Note that -g and -m are mutually exclusive.

-o outputFile
    Send the pseudo-natural-language text to outputFile The default is standard output.

-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 text generation. 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 stder revery updateFreq sentences. Use zero to disable updates. The following is the definition of the status information:

    I:  Number of input bits read.

    E:  Number of extra bits appended to input to complete the last sentence model.

    O:  Number of output bits written.

    G:  Growth ration (100*0)/(I+E)

    U:  Number of models used.

    S:  Number of models skipped because more than -l maxModelLength elements were generated by the grammar in -g grammar

    N:  Total number of model elements used.

    A:  Average number of elements per model.

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

EXAMPLES
A classic example:

    nicetext -i /etc/passwd -m shak -d shak -s

converts the /etc/passwd file into pseudo-Shakespeare.

    nicetext -i /etc/passwd -m jfk -d jfk -s

converts the /etc/passwd file into random sentences inspired by JFK's inaugural address. 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), genmodel(1L), gramtest(1L), impkimmo(1L), impmsc(1L), impwbstr(1L), listword(1L), nttpd(1L), printint(1L), scramble(1L), sortdct(1L), txt2dct(1L).