Metadata-Version: 2.1
Name: momblish
Version: 0.0.1
Summary: Generate nonsense words in any language by corpus analysis
Home-page: https://github.com/CypherpunkArmory/mumblish
Author: Stephen Prater
Author-email: me@stephenprater.com
License: mit
Platform: any
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Provides-Extra: testing
Requires-Dist: pytest ; extra == 'testing'
Requires-Dist: pytest-cov ; extra == 'testing'

========
momblish
========

Momblish is a library for generating fake words in any phoenetic.

http://mentalfloss.com/article/69880/7-fake-words-ended-dictionary

It is named after a "fake" word put into the OED on accident.


Momblish uses trigram analysis to generate (mostly) pronounacble gibberish - so
it can be used for any language that can be n-gram analyzed.

Description
===========

To use moblish, import it -

.. code:: python

    from momblish import Momblish

    m = Momblish.english()


Currently - only the english corpus is available.


Each time you load the English momblish it will perform an analysis on
`/usr/share/dict` and use that data to generate nonsense words.

To avoid this computation overhead, you can save the pre-analyzed corpus
as a file and read it in on demand.

.. code:: python

    from mombmlish import Momblish
    from momblish.corpus import Corpus

    m = Momblish.english()
    m.corpus.save('/tmp/corpus.json')

    c = Corpus.load('/tmp/corpus.json')
    n = Momblish(c)

To get Momblish to generate words for you call `word` on a Momblish instance.

`sentence` will make a generator you can feed to your program to make word lists
of varying length.

.. code:: python
    m.word()                     #= > 'PONESSAL'
    m.word(10)                   #= > 'MIDONIHYLA'
    w = m.sentence()             #= > <generator object Momblish.sentence at 0x10513dc78>
    next(w)                      #= > 'TICK'
    next(w)                      #= > 'DRIXY'
    next(w)                      #= > 'UNREA'
    m.sentence(3, word_length=5) #= > ['LEDGE', 'DEAKA', 'HONGI']

Note
====

This project has been set up using PyScaffold 3.1. For details and usage
information on PyScaffold see https://pyscaffold.org/.


