Skip to content

Commit 66f1ac3

Browse files
committed
seq2seq models documentation cleaned up
1 parent 14ae535 commit 66f1ac3

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

docs/codes.rst

+6
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ Module `shorttext.classifiers.topic.SkLearnClassification`
4040
Supervised Classification using Word Embedding
4141
----------------------------------------------
4242

43+
Module `shorttext.generators.seq2seq.s2skeras`
44+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45+
46+
.. automodule:: shorttext.generators.seq2seq.s2skeras
47+
:members:
4348

4449

4550
Module `shorttext.classifiers.embed.sumvec.VarNNSumEmbedVecClassification`
@@ -125,4 +130,5 @@ Module `shorttext.spell`
125130

126131

127132

133+
128134
Home: :doc:`index`

docs/tutorial_charbaseseq2seq.rst

+12
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ To use it, create an instance of the class :class:`shorttext.generators.Sentence
1616

1717
The above code is the same as :doc:`tutorial_charbaseonehot` .
1818

19+
.. automodule:: shorttext.generators.charbase.char2vec
20+
:members: initSentenceToCharVecEncoder
21+
22+
1923
Training
2024
--------
2125

@@ -30,6 +34,10 @@ And then train this neural network model:
3034

3135
This model takes several hours to train on a laptop.
3236

37+
38+
.. autoclass:: shorttext.generators.seq2seq.charbaseS2S.CharBasedSeq2SeqGenerator
39+
:members:
40+
3341
Decoding
3442
--------
3543

@@ -51,6 +59,10 @@ And can be loaded by:
5159

5260
>>> seq2seqer2 = shorttext.generators.seq2seq.charbaseS2S.loadCharBasedSeq2SeqGenerator('/path/to/norvigtxt_iter5model.bin')
5361

62+
.. automodule:: shorttext.generators.seq2seq.charbaseS2S
63+
:members: loadCharBasedSeq2SeqGenerator
64+
65+
5466
Reference
5567
---------
5668

shorttext/generators/seq2seq/charbaseS2S.py

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
charbases2s_suffices = kerasseq2seq_suffices + ['_dictionary.dict', '_charbases2s.json']
1313

1414

15-
# @cio.compactio({'classifier': 'charbases2s'}, 'charbases2s', charbases2s_suffices)
1615
class CharBasedSeq2SeqGenerator(cio.CompactIOMachine):
1716
""" Class implementing character-based sequence-to-sequence (seq2seq) learning model.
1817

shorttext/generators/seq2seq/s2skeras.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
kerasseq2seq_suffices = ['.h5', '.json', '_s2s_hyperparam.json', '_encoder.h5', '_encoder.json', '_decoder.h5', '_decoder.json']
1414

15-
# @cio.compactio({'classifier': 'kerasseq2seq'}, 'kerasseq2seq', kerasseq2seq_suffices)
15+
1616
class Seq2SeqWithKeras(cio.CompactIOMachine):
1717
""" Class implementing sequence-to-sequence (seq2seq) learning with keras.
1818

0 commit comments

Comments
 (0)