Skip to main content

The Seq2Seq-LSTM is a sequence-to-sequence classifier with the sklearn-like interface, and it uses the Keras package for neural modeling.

Developing of this module was inspired by Francois Chollet’s tutorial A ten-minute introduction to sequence-to-sequence learning in Keras

The goal of this project is creating a simple Python package with the sklearn-like interface for solution of different seq2seq tasks: machine translation, question answering, decoding phonemes sequence into the word sequence, etc.

Getting Started

Installing

To install this project on your local machine, you should run the following commands in Terminal:

git clone https://github.com/bond005/seq2seq.git
cd seq2seq
sudo python setup.py

You can also run the tests:

python setup.py test

But I recommend you to use pip and install this package from PyPi:

pip install seq2seq-lstm

or (using sudo):

sudo pip install seq2seq-lstm

Usage

After installing the Seq2Seq-LSTM can be used as Python package in your projects. For example:

from seq2seq import Seq2SeqLSTM  # import the Seq2Seq-LSTM package
seq2seq = Seq2SeqLSTM()  # create new sequence-to-sequence transformer

To see the work of the Seq2Seq-LSTM on a large dataset, you can run a demo

python demo/seq2seq_lstm_demo.py

or (with saving model after its training):

python demo/seq2seq_lstm_demo.py some_file.pkl

In this demo, the Seq2Seq-LSTM learns to translate the sentences from English into Russian. If you specify the neural model file (for example, aforementioned some_file.pkl), then the learned neural model will be saved into this file for its loading instead of re-fitting at the next running.

The Russian-English sentence pairs from the Tatoeba Project have been used as data for unit tests and demo script (see http://www.manythings.org/anki/).

Release files for seq2seq-lstm 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for seq2seq-lstm 0.1.6
File Size Uploaded
seq2seq-lstm-0.1.6.tar.gz 15.6 kB Details

Release files / seq2seq-lstm-0.1.6.tar.gz

Download URL seq2seq-lstm-0.1.6.tar.gz
Size 15.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8306d74474f160fb35bad046dd00a97f6019e7fb0ad12f53eae9554dfbc2ca30
BLAKE2b-256 checksum
How to use checksums
bd8729a7d393d953fc1f66d6af1edd13c19608046c818b68a060948372357ce5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.6.13

Release history Release notifications | RSS feed

This release

0.1.6 This release

1 release file

0.1.5

2 release files

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page