{ "info": { "author": "Tom McKeesick", "author_email": "tmck01@gmail.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 3" ], "description": "# punsy\n\nA rhyming pun generator for Python\n\n## Initial POC\n\n> The POC takes in a sentence, picks out the last word, finds a random rhyming match and inserts it in place.\n> E.g. `\"Napoleon Dynamite\" -> \"Napoleon VEGEMITE\"`\n\nYou build the docker image and run the POC with\n\n```bash\nmake poc\n```\n\nOr, if you wish, use `make shell` to build the image and enter a BASH shell. Then, you can use the `punsy/cmu.py` command with the following format:\n\n```text\n./punsy/cmu.py \n```\n\nAn example run:\n\n```text\n./punsy/cmu.py cmudict-0.7b.utf8 'Napoleon Dynamite' 4\n\n125700it [00:02, 56726.98it/s]\n2019-07-24 15:07:38,575 punsy.punsy INFO Pronunciation is ['D', 'AY1', 'N', 'AH0', 'M', 'AY2', 'T']\n2019-07-24 15:07:38,575 punsy.punsy INFO Fetching rhymes, applying offset=4: ['M', 'AY2', 'T']\n2019-07-24 15:07:38,575 punsy.punsy INFO Rhymes for ['DOLOMITE', 'DYNAMITE', 'EPSOMITE', 'HASHEMITE', 'VEGEMITE']\n2019-07-24 15:07:38,576 punsy.punsy INFO Napoleon VEGEMITE\n```\n\n#### Running interactively\n\n* Enter the docker container with\n\n```bash\nmake build shell\n```\n\nThen, launch the `ipython` command and use as follows:\n\n```python\nroot@fbcb68a6ce93:/home/punsy# ipython\n\nPython 3.7.3 (default, May 8 2019, 05:31:59)\nType 'copyright', 'credits' or 'license' for more information\nIPython 7.6.1 -- An enhanced Interactive Python. Type '?' for help.\n\nIn [1]: from punsy import cmu\n\nIn [2]: poc = cmu.POC('cmudict-0.7b.utf8')\n125700it [00:03, 37833.83it/s]\n\nIn [3]: poc.poc('NAPOLEON DYNAMITE', offset=2)\n2019-08-01 22:58:11,368 punsy.punsy INFO Pronunciation is ['D', 'AY1', 'N', 'AH0', 'M', 'AY2', 'T']\n2019-08-01 22:58:11,369 punsy.punsy INFO Fetching rhymes, applying offset=2: ['N', 'AH0', 'M', 'AY2', 'T']\n2019-08-01 22:58:11,369 punsy.punsy INFO Rhymes for ['DYNAMITE']\nOut[4]: 'NAPOLEON DYNAMITE'\n```\n\n### The Suffix trie\n\nYou can experiment with the suffix trie by running it directly with\n\n```bash\n./punsy/structs/suffix_trie.py\n```\n\nOR, the regular trie with\n\n```bash\n./punsy/structs/trie.py\n```\n\n### Hall of Fame\n\nAs time passes, this will hopefully fill with some legitimately funny examples! Until then, we have these :)\n\n| command | output |\n|---------|--------|\n| 'Adventure Time' | \"Adventure PART-TIME\" |\n| 'A Good Day To Die Hard' | \"A Good Day To Die AVANT-GARDE\" |\n| 'The Rolling Stones' | \"The Rolling CLONES\" |\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tmck-code/punsy", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "punsy", "package_url": "https://pypi.org/project/punsy/", "platform": "", "project_url": "https://pypi.org/project/punsy/", "project_urls": { "Homepage": "https://github.com/tmck-code/punsy" }, "release_url": "https://pypi.org/project/punsy/0.0.3/", "requires_dist": [ "tqdm" ], "requires_python": "", "summary": "A rhyming pun generator.", "version": "0.0.3" }, "last_serial": 5650626, "releases": { "0.0.3": [ { "comment_text": "", "digests": { "md5": "7a8c92f783b844908170f63224df05b5", "sha256": "5f0aa08169e6d180ffb0fa5bec205b6ebf845314ad94378a1add20cddeb9201c" }, "downloads": -1, "filename": "punsy-0.0.3.macosx-10.14-x86_64.tar.gz", "has_sig": false, "md5_digest": "7a8c92f783b844908170f63224df05b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11774, "upload_time": "2019-08-08T14:48:26", "url": "https://files.pythonhosted.org/packages/d4/74/2c96c1d872e9316630d4ef69e0962a4ae203f4336759772dffc42f2ff5b1/punsy-0.0.3.macosx-10.14-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "969eaf7522b56d18a41302f856caa523", "sha256": "aae4220273a86b28e74b5bbe61df9d45cb89bed9e849ab177cc81e4ccd0e9d36" }, "downloads": -1, "filename": "punsy-0.0.3-py3.7.egg", "has_sig": false, "md5_digest": "969eaf7522b56d18a41302f856caa523", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": null, "size": 864984, "upload_time": "2019-08-08T14:48:23", "url": "https://files.pythonhosted.org/packages/55/cb/3ccb6cc82e2d083c7a81f3381efdbd190c61205aa32c0927a1e8cacfbef1/punsy-0.0.3-py3.7.egg" }, { "comment_text": "", "digests": { "md5": "dccb01aedb3e81ede328603c27c25747", "sha256": "fdeaa500a2b2207a7a7cb16bc12eceac3c550e224744cb3c0cbf680adc63b006" }, "downloads": -1, "filename": "punsy-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "dccb01aedb3e81ede328603c27c25747", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 856945, "upload_time": "2019-08-08T14:48:09", "url": "https://files.pythonhosted.org/packages/38/8a/b20e1b6921cc0ddaa4e1bc6c1069234df97484d12ed11a6a0c433e685d95/punsy-0.0.3-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7a8c92f783b844908170f63224df05b5", "sha256": "5f0aa08169e6d180ffb0fa5bec205b6ebf845314ad94378a1add20cddeb9201c" }, "downloads": -1, "filename": "punsy-0.0.3.macosx-10.14-x86_64.tar.gz", "has_sig": false, "md5_digest": "7a8c92f783b844908170f63224df05b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11774, "upload_time": "2019-08-08T14:48:26", "url": "https://files.pythonhosted.org/packages/d4/74/2c96c1d872e9316630d4ef69e0962a4ae203f4336759772dffc42f2ff5b1/punsy-0.0.3.macosx-10.14-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "969eaf7522b56d18a41302f856caa523", "sha256": "aae4220273a86b28e74b5bbe61df9d45cb89bed9e849ab177cc81e4ccd0e9d36" }, "downloads": -1, "filename": "punsy-0.0.3-py3.7.egg", "has_sig": false, "md5_digest": "969eaf7522b56d18a41302f856caa523", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": null, "size": 864984, "upload_time": "2019-08-08T14:48:23", "url": "https://files.pythonhosted.org/packages/55/cb/3ccb6cc82e2d083c7a81f3381efdbd190c61205aa32c0927a1e8cacfbef1/punsy-0.0.3-py3.7.egg" }, { "comment_text": "", "digests": { "md5": "dccb01aedb3e81ede328603c27c25747", "sha256": "fdeaa500a2b2207a7a7cb16bc12eceac3c550e224744cb3c0cbf680adc63b006" }, "downloads": -1, "filename": "punsy-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "dccb01aedb3e81ede328603c27c25747", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 856945, "upload_time": "2019-08-08T14:48:09", "url": "https://files.pythonhosted.org/packages/38/8a/b20e1b6921cc0ddaa4e1bc6c1069234df97484d12ed11a6a0c433e685d95/punsy-0.0.3-py3-none-any.whl" } ] }