Skip to content
This repository has been archived by the owner on Dec 3, 2021. It is now read-only.

henrylee97/kyng

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KynG: Keyword & Generator

Text generator with keyword

Clone

via ssh

$ git clone [email protected]:HenryLee97/kyng.git

via https

$ git clone https://github.com/HenryLee97/kyng.git

Requirement

Python 3.6 or above
Install PyTorch

$ pip install gensim

Training

Need

  • pretrained fastText embedding, trained by fastText
  • csv file, formated as follows:
keyword, text

Usage

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

Testing

Need

  • pretrained fastText embedding, which used for training
  • text file, that contains one keyword in each row.

Usage

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

About

Keyword & Generator

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages