forked from monkeython/loremipsum
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added documentation. * Added stats to text generators methods in Generator * Added generator methods in Generator, for multiple text generations * Added stats-less text generators fuctions to module
- Loading branch information
1 parent
753b354
commit 0039200
Showing
11 changed files
with
378 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
*.pyc | ||
*.pyo | ||
*.egg-info | ||
build | ||
*.DS_Store | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
AUTHORS | ||
======= | ||
Luca De Vitis <luca at monkeython dot org> | ||
James Hales <jhales dot perth at gmail dot com> (original code author) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,3 @@ Build | |
Install | ||
======= | ||
|
||
Deploy | ||
====== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,22 @@ | ||
Overview | ||
======== | ||
|
||
You may import the :py:class:`Generator` class to instantiate your generator | ||
with a sample text and a dictionary: | ||
with your own sample text and a dictionary: | ||
|
||
>>> from loremipsum import Generator | ||
>>> | ||
>>> sample = file('data/sample.txt').read() | ||
>>> dictionary = file('data/dictionary.txt').read().split() | ||
>>> | ||
>>> g = Generator(sample, dictionary) | ||
>>> g.generate_sentence(True) | ||
... | ||
>>> g.generate_sentence() #doctest: +ELLIPSIS | ||
(...) | ||
>>> | ||
|
||
or just import any of :py:func:`generate_sentences`, | ||
:py:func:`generate_paragraphs`, :py:func:`generate_words` which interface to a | ||
module wide :py:class:`Generator` instance. | ||
or just import :py:func:`get_sentences` or :py:func:`get_paragraphs` | ||
which interface to a module wide :py:class:`Generator` instance. | ||
|
||
>>> from loremipsum import generate_paragraphs, generate_sentences | ||
>>> from loremipsum import get_paragraphs, get_sentences | ||
>>> | ||
>>> generate_sentences(5) | ||
>>> get_sentences(5) #doctest: +ELLIPSIS | ||
['...', '...', '...', '...', '...'] | ||
>>> generate_paragraphs(3) | ||
>>> get_paragraphs(3) #doctest: +ELLIPSIS | ||
['...', '...', '...'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.