Text generator with keyword
via ssh
$ git clone [email protected]:HenryLee97/kyng.git
via https
$ git clone https://github.com/HenryLee97/kyng.git
Python 3.6 or above
Install PyTorch
$ pip install gensim
- pretrained fastText embedding, trained by fastText
- csv file, formated as follows:
keyword, text
Use train.py
to train model. For example,
$ python train.py -g -em fastText.bin -d training.csv -m KynG -e 10
Detailed options can be checked as follows:
$ python train.py -h
- pretrained fastText embedding, which used for training
- text file, that contains one keyword in each row.
Use test.py
to test trained model. For example,
$ python test.py -g -em fastText.bin -d testing.txt -m KynG.pt -r KynG.txt
Detailed options can be checked as follows:
$ python test.py -h