Metadata-Version: 2.1
Name: seq2seq-lstm
Version: 0.1.5
Summary: Sequence-to-sequence classifier based on LSTM with the simple sklearn-like interface
Home-page: https://github.com/bond005/seq2seq
Author: Ivan Bondarenko
Author-email: bond005@yandex.ru
License: Apache License Version 2.0
Keywords: seq2seq,sequence-to-sequence,lstm,nlp,keras,scikit-learn
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Text Processing
Classifier: Topic :: Text Processing :: Linguistic
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Requires-Dist: h5py (>=2.10.0)
Requires-Dist: tensorflow (>=2.2.1)
Requires-Dist: numpy (>=1.18.5)
Requires-Dist: scikit-learn (>=0.23.2)


seq2seq-lstm
============

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
<https://blog.keras.io/a-ten-minute-introduction-to-sequence-to-sequence-learning-in-keras.html>`_

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:

.. code::

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

You can also run the tests:

.. code::

    python setup.py test

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

.. code::

    pip install seq2seq-lstm

or (using ``sudo``):

.. code::

    sudo pip install seq2seq-lstm

Usage
~~~~~

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

.. code::

    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

.. code::

    python demo/seq2seq_lstm_demo.py

or (with saving model after its training):

.. code::

    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/ <http://www.manythings.org/anki/>`_).



