{ "info": { "author": "Josh Harkema", "author_email": "josh@joshharkema.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 3" ], "description": "# Augmented Criticism Lab Toolkit and Connectors\n\nThis set of tools is designed for interfacing with the Augmented Criticism Lab's API, \n[https://acriticismlab.org](https://api.acriticismlab.org). The toolkit can be installed with pip:\n\n```\npip install Augmented-Criticism-Lab-Toolkit\n```\n\n## Using the Connectors\n\nConnectors are used to pull data from the database over the API. Here are some examples:\n\n```python\nfrom connectors.poem import Poem\n\n# To get a list of all poems:\nall_poems = Poem().all()\n\n# To get a specific poem by database id:\nsingle_poem = Poem().by_id(1)\n\nfrom connectors.book import Book\n\n# To get a list of all books:\nall_books = Book().all()\n\n# To get a specific book by database id:\nsingle_book = Book().by_id(1)\n```\n\nThe included connectors are book, poem, and section. Each connector works on the same principle.\n\n## Using the Tools\n\n### API based tools:\n\n```python\nfrom tools.api import Tools\n# Lemmatize text:\nlemmas = Tools().lemmatize(\"text to lemmatize\")\n\n# Part of speech tags:\ntags = Tools().pos_tag(\"text to tag\")\n\n# Frequency distribution:\nfreqdist = Tools().frequency_distribution(\"text to get distribution for\")\n\n# Topic model:\nmodel = Tools().topic_model(\"text to model\")\n```\n\n**Note:** Topic models take about a minute to run.\n\n### Python based tools:\n\n**Rhyme Scheme Analyzer:**\n\n```python\nfrom tools.rhyme import Rhyme\nfrom tools.rhyme import classify_sonnet\n\n# Initialize a Rhyme object with the text you want to analyze.\n# The text must be separated into lines, you can define a delimiter\n# the default is '\\\\n'. This returns a list of rhyme pairs:\n# ['A','B','B','A','C','D','D','C','E','F','E','F','G,'G']\nrhyme = Rhyme(\"text\\n broken\\n into lines\", delimiter='\\n').find_rhyme_scheme()\n\n# To classify the rhyme scheme (only works for sonnets) run:\n# Returns a tuple such that (each number represents a probability\n# the sonnet of the type listed):\n#(Petrarchan 1, Petrarchan 2, Petrarchan 3, Shakespearean, Spenserian)\nsonnet_type = classify_sonnet(rhyme)\n```\n\n**Syllable Counter:**\n\n```python\nfrom tools.syllable import SyllableCounter\n\n# Initialize a counter:\nsyllable_counter = SyllableCounter()\n\n# Run a line of poetry through the counter:\nsyllable_count_for_line = syllable_counter.count_syllables_by_line(\"line of text\")\n```\n\nIt is also possible to run the syllable counter on a poem from the ACL database directly:\n\n```python\nfrom tools.syllable import SyllableCounter\nfrom connectors.poem import Poem\n\n# Initialize a counter:\nsyllable_counter = SyllableCounter()\n\n# Get a poem:\npoem = Poem().by_id(1)\n\n# Get counts for the poem:\ncounts = syllable_counter.count_syllables_poem(poem)\n```\n\n**Extend the OUTLIERS:** (i.e. words that don't give correct syllable counts)\n\nCreate a csv file formatted as:\n\n```\nWORD, NUMBER_OF_SYLLABES\n\n# Example\napple, 2\norange, 2\n```\n\nYou then load the csv file:\n\n```python\nfrom tools.syllable import SyllableCounter\n\n# Initialize a SyllableCounter.\nsyllable_counter = SyllableCounter()\n\n# Load the custom outliers file into the counter.\nsyllable_counter.load_custom_outliers('PATH_TO_FILE')\n```\n\n\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://git.joshharkema.com/jharkema/augemented-criticism-lab-tools", "keywords": "", "license": "https://creativecommons.org/licenses/by/2.0/ca/", "maintainer": "", "maintainer_email": "", "name": "Augmented-Criticism-Lab-Toolkit", "package_url": "https://pypi.org/project/Augmented-Criticism-Lab-Toolkit/", "platform": "", "project_url": "https://pypi.org/project/Augmented-Criticism-Lab-Toolkit/", "project_urls": { "Homepage": "https://git.joshharkema.com/jharkema/augemented-criticism-lab-tools" }, "release_url": "https://pypi.org/project/Augmented-Criticism-Lab-Toolkit/1.1.9/", "requires_dist": [ "requests", "cmudict", "pronouncing" ], "requires_python": "", "summary": "A set of tools for connecting to the Augmented Criticism Lab", "version": "1.1.9" }, "last_serial": 4573421, "releases": { "1.1.1": [ { "comment_text": "", "digests": { "md5": "c518e7daa9fbe93476127c6a33d469d5", "sha256": "c0dffc58de4868e8e64f7dc81707b246e6cf066d753e6c7e3a4517e4701c8820" }, "downloads": -1, "filename": "Augmented_Criticism_Lab_Toolkit-1.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "c518e7daa9fbe93476127c6a33d469d5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14635, "upload_time": "2018-12-05T15:20:49", "url": "https://files.pythonhosted.org/packages/53/ed/90389246b5c95b65ceeecc9cb36d1c10ac9c26c97f477931e81b942acb1e/Augmented_Criticism_Lab_Toolkit-1.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "450312267d7df110d7c25dbf3ddc7989", "sha256": "ca949ffa4c107b90e848b5eb3562dea541cebdd685c7e57d28da6962c3399027" }, "downloads": -1, "filename": "Augmented Criticism Lab Toolkit-1.1.1.tar.gz", "has_sig": false, "md5_digest": "450312267d7df110d7c25dbf3ddc7989", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11173, "upload_time": "2018-12-05T15:20:50", "url": "https://files.pythonhosted.org/packages/ab/06/feba86d7ca7445d9e46dbaf5d237c303b30bcd55909f29f236e6e1b19f66/Augmented%20Criticism%20Lab%20Toolkit-1.1.1.tar.gz" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "fe66e542e03d3bf27f89315d09a3a3a7", "sha256": "8685a2608c33c70f4320eb231f36a4b15994fabb7cd5f312c366125ca811b9cf" }, "downloads": -1, "filename": "Augmented_Criticism_Lab_Toolkit-1.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "fe66e542e03d3bf27f89315d09a3a3a7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 15607, "upload_time": "2018-12-05T15:50:06", "url": "https://files.pythonhosted.org/packages/43/ca/11965d4cfe4ea865e27258032e544e7a9e3949f744911bd4d67869617bef/Augmented_Criticism_Lab_Toolkit-1.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d774ddfb942b62481941ab9212e8dd27", "sha256": "92e7e07c2652f9a2dacee0147f33c37b37ff1259c9e70c3f372d31b5bd663266" }, "downloads": -1, "filename": "Augmented Criticism Lab Toolkit-1.1.2.tar.gz", "has_sig": false, "md5_digest": "d774ddfb942b62481941ab9212e8dd27", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12352, "upload_time": "2018-12-05T15:50:07", "url": "https://files.pythonhosted.org/packages/28/84/0678df00a7b21f267d13f780fb7ca8a4275006875399e0a4e0d971cda1bd/Augmented%20Criticism%20Lab%20Toolkit-1.1.2.tar.gz" } ], "1.1.3": [ { "comment_text": "", "digests": { "md5": "13e8eb5591958e0abe910084c91a7498", "sha256": "0ad447fad937b91309c9119d4833f56dff34a281663844df9b68711c7912cebd" }, "downloads": -1, "filename": "Augmented_Criticism_Lab_Toolkit-1.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "13e8eb5591958e0abe910084c91a7498", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16145, "upload_time": "2018-12-05T16:00:32", "url": "https://files.pythonhosted.org/packages/49/e4/59320bb10fb82d57edf1fcea7e3901d05caf52bdc6947f56e09f77f1d5a4/Augmented_Criticism_Lab_Toolkit-1.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3923dea51f67b14fbf44a3f60e38e071", "sha256": "d7b59177667e6309269cb32bc8fbe2b8cca2f152d609cdfaa42cae627a9f5d15" }, "downloads": -1, "filename": "Augmented Criticism Lab Toolkit-1.1.3.tar.gz", "has_sig": false, "md5_digest": "3923dea51f67b14fbf44a3f60e38e071", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12383, "upload_time": "2018-12-05T16:00:34", "url": "https://files.pythonhosted.org/packages/71/81/f6dc0e11b9e9f03bd13aa3b3765c2596692227b9fa7f113cff7cfdbc9ed3/Augmented%20Criticism%20Lab%20Toolkit-1.1.3.tar.gz" } ], "1.1.4": [ { "comment_text": "", "digests": { "md5": "33e42eb2d749929da1ab072d411307d5", "sha256": "b3e130e0df202e3d4414bd20f4618338c0b49c64e0446b0b465f506d62350c5c" }, "downloads": -1, "filename": "Augmented_Criticism_Lab_Toolkit-1.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "33e42eb2d749929da1ab072d411307d5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16529, "upload_time": "2018-12-05T16:29:13", "url": "https://files.pythonhosted.org/packages/cf/bd/ba7d57e3f74299fa5812937177ed5fbcb7d515a4b744be06b2ac3f361a3c/Augmented_Criticism_Lab_Toolkit-1.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "df4fa37235df25f108f1307bca818d0e", "sha256": "915bd0b591647683f5b699696662e8e2adf7909dbdd9985c4723fbd6c8c0348b" }, "downloads": -1, "filename": "Augmented Criticism Lab Toolkit-1.1.4.tar.gz", "has_sig": false, "md5_digest": "df4fa37235df25f108f1307bca818d0e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12822, "upload_time": "2018-12-05T16:29:15", "url": "https://files.pythonhosted.org/packages/54/0a/788b230bbff8589ecab2dffce475bb4decaec8c27c771c399c6416de1e9b/Augmented%20Criticism%20Lab%20Toolkit-1.1.4.tar.gz" } ], "1.1.5": [ { "comment_text": "", "digests": { "md5": "ea1aeede14de24a95626747a7f2aff91", "sha256": "83c24db4d527ea210153aab53089633cd47e163549898d37f5fa4c1e2f82ef59" }, "downloads": -1, "filename": "Augmented_Criticism_Lab_Toolkit-1.1.5-py3-none-any.whl", "has_sig": false, "md5_digest": "ea1aeede14de24a95626747a7f2aff91", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17047, "upload_time": "2018-12-05T18:19:05", "url": "https://files.pythonhosted.org/packages/e0/22/be7c5b44915ec2dd5cc75d3e9912376682a8bc1eb4aa278857ec6bd0284d/Augmented_Criticism_Lab_Toolkit-1.1.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bf7877762d17636b66ebdd8c0a943ed8", "sha256": "97ae5866e3a65e1a8719db9f9a7ac10fc3cee89a5e98558ba5417732289dd1ba" }, "downloads": -1, "filename": "Augmented Criticism Lab Toolkit-1.1.5.tar.gz", "has_sig": false, "md5_digest": "bf7877762d17636b66ebdd8c0a943ed8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13294, "upload_time": "2018-12-05T18:19:07", "url": "https://files.pythonhosted.org/packages/4f/bf/12a7278a9df5124ffd57a87f18dafe34841375fc047f50a10c8d36e18cb7/Augmented%20Criticism%20Lab%20Toolkit-1.1.5.tar.gz" } ], "1.1.6": [ { "comment_text": "", "digests": { "md5": "0ed249e5fb8209e3f57190c6c6eba873", "sha256": "46724def5bd0459b4252ff854c9620d61da6eb148a2056f7f7ba0ae1d638fddc" }, "downloads": -1, "filename": "Augmented_Criticism_Lab_Toolkit-1.1.6-py3-none-any.whl", "has_sig": false, "md5_digest": "0ed249e5fb8209e3f57190c6c6eba873", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19008, "upload_time": "2018-12-05T19:47:53", "url": "https://files.pythonhosted.org/packages/37/65/7fb527bacad0d3bc1e30ba77580942fe855f449f03696d465f1d78c9cdd6/Augmented_Criticism_Lab_Toolkit-1.1.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7ffb50d92263eac156d0328cdd551420", "sha256": "619e11a4462816879250674498aea965cd0ad1ddabc75dec9628d1a00e019288" }, "downloads": -1, "filename": "Augmented Criticism Lab Toolkit-1.1.6.tar.gz", "has_sig": false, "md5_digest": "7ffb50d92263eac156d0328cdd551420", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14046, "upload_time": "2018-12-05T19:47:55", "url": "https://files.pythonhosted.org/packages/39/9a/e328ac965bdd75047c30a8426295a15a77f5ac8c25e4149e8dec1488fd10/Augmented%20Criticism%20Lab%20Toolkit-1.1.6.tar.gz" } ], "1.1.7": [ { "comment_text": "", "digests": { "md5": "84cf7c92b4bbec464e66046caa638334", "sha256": "de1eff6a9fa8acf29172b5b2279d644ec11b0c25a43bdd1e9283ec771c0dd024" }, "downloads": -1, "filename": "Augmented_Criticism_Lab_Toolkit-1.1.7-py3-none-any.whl", "has_sig": false, "md5_digest": "84cf7c92b4bbec464e66046caa638334", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 18987, "upload_time": "2018-12-05T20:12:16", "url": "https://files.pythonhosted.org/packages/05/a4/3843d7f2712761b716bd7e1d6a1491f4c2f0e26ba418a0ae2f9410c16265/Augmented_Criticism_Lab_Toolkit-1.1.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2796b85b9bd3848356af9920025262f3", "sha256": "4e25a2d47e135cd159fd710232f6f4b8c687f71452e3578af9fe66f82905bd77" }, "downloads": -1, "filename": "Augmented Criticism Lab Toolkit-1.1.7.tar.gz", "has_sig": false, "md5_digest": "2796b85b9bd3848356af9920025262f3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14029, "upload_time": "2018-12-05T20:12:18", "url": "https://files.pythonhosted.org/packages/7b/ae/d19923bc74252158f912e062ed88b53377c4028d0901506945cb80fd6b37/Augmented%20Criticism%20Lab%20Toolkit-1.1.7.tar.gz" } ], "1.1.9": [ { "comment_text": "", "digests": { "md5": "42c1ae3c7f811de74c332c51db951230", "sha256": "c337c7db4deeb34c44df8c3fe778ca954881384158914218180ab6bb644e757c" }, "downloads": -1, "filename": "Augmented_Criticism_Lab_Toolkit-1.1.9-py3-none-any.whl", "has_sig": false, "md5_digest": "42c1ae3c7f811de74c332c51db951230", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19026, "upload_time": "2018-12-07T21:33:07", "url": "https://files.pythonhosted.org/packages/9f/28/8c808b537743bd90ef7aa73623e905471041dbb71181b4d2fe4922035161/Augmented_Criticism_Lab_Toolkit-1.1.9-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "95fca497ce1a47765a22bb9e6ca0d38d", "sha256": "c04736e208f3b93ced312d29ff9eca742d6c6884886c67bb7a33b8909dbd0c9c" }, "downloads": -1, "filename": "Augmented Criticism Lab Toolkit-1.1.9.tar.gz", "has_sig": false, "md5_digest": "95fca497ce1a47765a22bb9e6ca0d38d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14072, "upload_time": "2018-12-07T21:33:08", "url": "https://files.pythonhosted.org/packages/c6/88/cf60bff228af052b35d1dee4aad69757c822c3186cee93a31c0b59ca08ad/Augmented%20Criticism%20Lab%20Toolkit-1.1.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "42c1ae3c7f811de74c332c51db951230", "sha256": "c337c7db4deeb34c44df8c3fe778ca954881384158914218180ab6bb644e757c" }, "downloads": -1, "filename": "Augmented_Criticism_Lab_Toolkit-1.1.9-py3-none-any.whl", "has_sig": false, "md5_digest": "42c1ae3c7f811de74c332c51db951230", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19026, "upload_time": "2018-12-07T21:33:07", "url": "https://files.pythonhosted.org/packages/9f/28/8c808b537743bd90ef7aa73623e905471041dbb71181b4d2fe4922035161/Augmented_Criticism_Lab_Toolkit-1.1.9-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "95fca497ce1a47765a22bb9e6ca0d38d", "sha256": "c04736e208f3b93ced312d29ff9eca742d6c6884886c67bb7a33b8909dbd0c9c" }, "downloads": -1, "filename": "Augmented Criticism Lab Toolkit-1.1.9.tar.gz", "has_sig": false, "md5_digest": "95fca497ce1a47765a22bb9e6ca0d38d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14072, "upload_time": "2018-12-07T21:33:08", "url": "https://files.pythonhosted.org/packages/c6/88/cf60bff228af052b35d1dee4aad69757c822c3186cee93a31c0b59ca08ad/Augmented%20Criticism%20Lab%20Toolkit-1.1.9.tar.gz" } ] }