All Projects → tokestermw → Tensorflow Shakespeare

tokestermw / Tensorflow Shakespeare

Licence: apache-2.0
Neural machine translation between the writings of Shakespeare and modern English using TensorFlow

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Tensorflow Shakespeare

dynmt-py
Neural machine translation implementation using dynet's python bindings
Stars: ✭ 17 (-93.03%)
Mutual labels:  seq2seq, neural-machine-translation
Tf Seq2seq
Sequence to sequence learning using TensorFlow.
Stars: ✭ 387 (+58.61%)
Mutual labels:  seq2seq, neural-machine-translation
minimal-nmt
A minimal nmt example to serve as an seq2seq+attention reference.
Stars: ✭ 36 (-85.25%)
Mutual labels:  seq2seq, neural-machine-translation
RNNSearch
An implementation of attention-based neural machine translation using Pytorch
Stars: ✭ 43 (-82.38%)
Mutual labels:  seq2seq, neural-machine-translation
Sockeye
Sequence-to-sequence framework with a focus on Neural Machine Translation based on Apache MXNet
Stars: ✭ 990 (+305.74%)
Mutual labels:  seq2seq, neural-machine-translation
Word-Level-Eng-Mar-NMT
Translating English sentences to Marathi using Neural Machine Translation
Stars: ✭ 37 (-84.84%)
Mutual labels:  seq2seq, neural-machine-translation
transformer
Neutron: A pytorch based implementation of Transformer and its variants.
Stars: ✭ 60 (-75.41%)
Mutual labels:  seq2seq, neural-machine-translation
Pytorch Seq2seq
Tutorials on implementing a few sequence-to-sequence (seq2seq) models with PyTorch and TorchText.
Stars: ✭ 3,418 (+1300.82%)
Mutual labels:  seq2seq, neural-machine-translation
Seq2seq.pytorch
Sequence-to-Sequence learning using PyTorch
Stars: ✭ 514 (+110.66%)
Mutual labels:  seq2seq, neural-machine-translation
Joeynmt
Minimalist NMT for educational purposes
Stars: ✭ 420 (+72.13%)
Mutual labels:  seq2seq, neural-machine-translation
Nmtpytorch
Sequence-to-Sequence Framework in PyTorch
Stars: ✭ 392 (+60.66%)
Mutual labels:  seq2seq, neural-machine-translation
Openseq2seq
Toolkit for efficient experimentation with Speech Recognition, Text2Speech and NLP
Stars: ✭ 1,378 (+464.75%)
Mutual labels:  seq2seq, neural-machine-translation
Xmunmt
An implementation of RNNsearch using TensorFlow
Stars: ✭ 69 (-71.72%)
Mutual labels:  seq2seq, neural-machine-translation
Nspm
🤖 Neural SPARQL Machines for Knowledge Graph Question Answering.
Stars: ✭ 156 (-36.07%)
Mutual labels:  seq2seq, neural-machine-translation
Kospeech
Open-Source Toolkit for End-to-End Korean Automatic Speech Recognition.
Stars: ✭ 190 (-22.13%)
Mutual labels:  seq2seq
Natural Language Processing With Tensorflow
Natural Language Processing with TensorFlow, published by Packt
Stars: ✭ 222 (-9.02%)
Mutual labels:  seq2seq
Deep Time Series Prediction
Seq2Seq, Bert, Transformer, WaveNet for time series prediction.
Stars: ✭ 183 (-25%)
Mutual labels:  seq2seq
Tgen
Statistical NLG for spoken dialogue systems
Stars: ✭ 179 (-26.64%)
Mutual labels:  seq2seq
Nlp made easy
Explains nlp building blocks in a simple manner.
Stars: ✭ 232 (-4.92%)
Mutual labels:  seq2seq
Headliner
🏖 Easy training and deployment of seq2seq models.
Stars: ✭ 221 (-9.43%)
Mutual labels:  seq2seq

Shakespeare translations using TensorFlow

This is an example of using the new Google's TensorFlow library on monolingual translation going from modern English to Shakespeare based on research from Wei Xu.

Prepare

First download the TensorFlow library depending on your platform:

pip install https://storage.googleapis.com/tensorflow/mac/tensorflow-0.5.0-py2-none-any.whl # for mac
pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl # for ubuntu
  1. Grabs parallel data.
  2. Gets train, dev split.
  3. Builds vocabulary
  4. Converts parallel data into ids

From the root directory:

python -m tensorshake.get_data
python -m tensorshake.prepare_corpus

Delete /cache to start anew.

Train

Use the example BASH script to train the model. This saves the check points in the --train_dir directory. If you run it again, the training process continues from the check point. To restart with fresh parameters, simply delete/rename the check points.

./run.sh

Results

Benchmarks from original paper. (Shakespeare -> Modern English)

Input Output
i will bite thee by the ear for that jest . i ’ ll bite you by the ear for that joke .
what further woe conspires against mine age ? what ’ s true despair conspires against my old age ?
how doth my lady ? how is my lady ?
hast thou slain tybalt ? have you killed tybalt ?
an i might live to see thee married once , i have my wish . if i could live to see you married, i ’ ve my wish .
benvolio , who began this bloody fray ? benvolio , who started this bloody fight itself ?
what is your will ? what do you want ?
call her forth to me . bring her out to me .

Cherrypicked examples from this repo (Modern English -> Shakespeare)

Input Output
but you’re not listening to me. but you do not hear me .
Gregory, on my word, we will not be humiliated, like carrying coal. regory , we 'll not carry coals .
but he got the promotion. he is the friend .
i can hit quickly, if i'm motivated. i strike , i am moved .
Did you just give us the finger, sir? have you leave the thumb , sir ?
You don’t know what you’re doing! you do not what you know you .
have you killed Tybalt? hast thou slain tybalt ?
Why, Romeo, are you crazy? why , art thou mad , mad ?

Pre-Trained Models

Here is a link for an example model: https://s3-us-west-2.amazonaws.com/foxtype-nlp/tensorshake/model_cache.zip

Possible improvements

  • word embeddings
  • beam search
  • language model reranking
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].