Skip to content

thawhakyi/neural-rewriter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Rewriter

1

$ git clone git://github.com/RomaniukVadim/neural-rewriter.git

neural-rewriter

$ mkdir models && cd models
$ curl -O http://www.cs.toronto.edu/~rkiros/models/dictionary.txt
$ curl -O http://www.cs.toronto.edu/~rkiros/models/utable.npy
$ curl -O http://www.cs.toronto.edu/~rkiros/models/btable.npy
$ curl -O http://www.cs.toronto.edu/~rkiros/models/uni_skip.npz
$ curl -O http://www.cs.toronto.edu/~rkiros/models/uni_skip.npz.pkl
$ curl -O http://www.cs.toronto.edu/~rkiros/models/bi_skip.npz
$ curl -O http://www.cs.toronto.edu/~rkiros/models/bi_skip.npz.pkl
$ cd ..
$ mkdir storyteller && cd storyteller
$ wget -ci https://s3.amazonaws.com/lasagne/recipes/pretrained/imagenet/vgg19.pkl
$ wget http://www.cs.toronto.edu/\~rkiros/neural_storyteller.zip
$ unzip neural_storyteller.zip && rm neural_storyteller.zip

Add input text to rewriter/in.txt and

$ pip install -r requirements.txt --user
# emerge dev-python/nltk
$ python
  >>> import nltk
  >>> nltk.download('punkt')
$ cd rewriter
$ python generate.py

If you get error like sequence bla bla...

$  grep '[^[:blank:]]' < in.txt > file.out && rm in.txt && mv file.out in.txt

About

Neural style transfer of text

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%