Textgen
Text generation from existing source text using weighted predictions.
Installation
go install github.com/vcokltfre/[email protected]
Usage
To train from a corpus:
textgen train -i corpus.txt
To generate text:
textgen generate
Additional options
For the train
command you can specify:
-i
or--input
to specify the input file-w
or--weights
to specify the weights output file
For the generate
command you can specify:
-w
or--weights
to specify the weights input file-l
or--length
to specify the length of the generated text-s
or--start
to specify the seed word for the generator
The train
command accepts either a file path or an HTTP/HTTPS URL as input.
Pre-trained Weights
In the weights/
directory you can find pre-trained weights for the following corpora: