# -*- coding: utf-8 -*-
from setuptools import setup

package_dir = \
{'': 'src'}

packages = \
['py_shakespeare']

package_data = \
{'': ['*']}

install_requires = \
['bs4>=0.0.1,<0.0.2',
 'lxml>=4.7.1,<5.0.0',
 'nltk>=3.6.5,<4.0.0',
 'pandas>=1.3.5,<2.0.0',
 'requests>=2.26.0,<3.0.0',
 'simplejson>=3.17.6,<4.0.0',
 'textstat>=0.7.2,<0.8.0']

setup_kwargs = {
    'name': 'py-shakespeare',
    'version': '0.1.0',
    'description': 'Python package to obtain Shakespeare script and monologue',
    'long_description': '# py_shakespeare\n\n`py_shakespeare` is a Python package to obtain Shakespeare script and monologue.\n\n## Installation\n\n```bash\n$ pip install py_shakespeare\n```\n\n## Usage\n\n### Classes\n\n#### shake_play\n\n`shake_play(min_num_character=20, play_complexity, play_length)`\n> Base class to obtain the list of Shakespeare play based on minimum number of character, length of the play, and complexity of the play. This class will obtain data from DraCor API and merge the data to genre of Shakespeare play that was obtained by scraping "www.opensourceshakespeare.org" website.\n\n#### shake_monologue\n\n`shake_monologue(gender=\'ALL\', min_line=30, include_all=True, play_list)`\n> Base class to obtain a list of monologues from Shakespeare plays based on gender of the monologues speaker, minimum line of monologue, and list of plays which monologues want to be obtained. This class will obtain data from both DraCor and The Folger Shakespeare API to help user choose monologue based on several inputs.\n\n### How to use\n\n### Import all classes\n\n```python\n>>> from py_shakespeare import py_shakespeare\n```\n\n### shake_play\n\n  - Initialize shake play based on minimum number of character, play complexity (optional), and play length (optional)\n    ```python\n    >>> pl = py_shakespeare.shake_play(min_num_character=30, play_complexity = "Medium", play_length = "Medium")\n    ```\n    \n  - Get the summarized table. \n    ```python\n    >>> pl.get_summary()\n    ```\n    This function returned a table with following variables:\n        * title: title of the play\n        * popularity: relative popularity (from the number of Wikipedia links referring to this play) to other plays with similar minimum number of character\n        * genre: genre of the play (based on Open Source Shakespeare website)\n        * num_character: number of character/cast in this play\n        * play_length: relative length of the play to other plays with similar minimum number of character. Obtained by using number of words variable divided by rate of speech in a drama (170 words per minute)\n        * play_complexity: relative complexity of the play to other plays with similar minimum number of character. Obtained by using average degree of dialogue between each character in the play\n        \n  - Get detailed table\n    ```python\n    >>> pl.get_complete()\n    ```\n    This function returned a table with same variables of summary table plus below variables:\n        * num_male_character: number of male character/cast in this play\n        * num_female_character: number of female character/cast in this play\n        * num_unknown_character: number of unknown gender character/cast in this play\n        * num_scene: number of scene/segment in this play\n        * play_length_hr: length of the play in hours. Obtained by using number of words variable divided by rate of speech in a drama (170 words per minute)\n\n  - Download selected script in xml format. The file will be downloaded to the device.\n    ```python\n    >>> pl.get_script(row = 2)\n    ```\n \n### shake_monologue\n\n  - Initialize a table of monologues from Shakespeare plays based on gender of character, minimum line, and list of plays. **WARNING**: if choose `include_all = True` the run time for the function will be quite long\n    ```python\n    >>> ml = py_shakespeare.shake_monologue(gender = "ALL", min_line = 40, include_all = False, play_list = ["Rom", "Ham"])\n    ```\n    \n  - Get the summarized table\n    ```python\n    >>> ml.get_summary()\n    ```\n    This function returned a table with following variables:\n        * play: title of the play\n        * name: name of the character\n        * gender: gender of the character\n        * degree: how many other characters this character interacted with\n        * monologue_link: Link to the monologue\n        * line_num: number of lines of the monologue\n    \n  - Get the complexity score of the monologue. Complexity score is calculated using [Flesch Kincaid Grade readibility score](https://readable.com/readability/flesch-reading-ease-flesch-kincaid-grade-level/).\n    ```python\n    >>> ml.get_complexity()\n    ```\n    This function returned a summary table with 2 additional variables:\n        * complexity_score: Flesch Kincaid Grade readibility score\n        * complexity_category: Complexity category based on the readibility score\n        \n  - Download selected monologue script in txt format. The file will be downloaded to the device.\n    ```python\n    >>> ml.get_script(row = 2)\n    ```\n    \n  - Folger ID as input of `play_list`. If `include_all = False`, an array of `play_list` should be passed in the function parameter. Below is the list of Folger ID:\n  \n    | Folger ID | Play                       |\n    |-----------|----------------------------|\n    | AWW       | All’s Well That Ends Well  |\n    | Ant       | Antony and Cleopatra       |\n    | AYL       | As You Like It             |\n    | Err       | The Comedy of Errors       |\n    | Cor       | Coriolanus                 |\n    | Cym       | Cymbeline                  |\n    | Ham       | Hamlet                     |\n    | 1H4       | Henry IV, Part 1           |\n    | 2H4       | Henry IV, Part 2           |\n    | H5        | Henry V                    |\n    | 1H6       | Henry VI, Part 1           |\n    | 2H6       | Henry VI, Part 2           |\n    | 3H6       | Henry VI, Part 3           |\n    | H8        | Henry VIII                 |\n    | JC        | Julius Caesar              |\n    | Jn        | King John                  |\n    | Lr        | King Lear                  |\n    | LLL       | Love’s Labor’s Lost        |\n    | Mac       | Macbeth                    |\n    | MM        | Measure for Measure        |\n    | MV        | The Merchant of Venice     |\n    | Wiv       | The Merry Wives of Windsor |\n    | MND       | A Midsummer Night’s Dream  |\n    | Ado       | Much Ado About Nothing     |\n    | Oth       | Othello                    |\n    | Per       | Pericles                   |\n    | R2        | Richard II                 |\n    | R3        | Richard III                |\n    | Rom       | Romeo and Juliet           |\n    | Shr       | The Taming of the Shrew    |\n    | Tmp       | The Tempest                |\n    | Tim       | Timon of Athens            |\n    | Tit       | Titus Andronicus           |\n    | Tro       | Troilus and Cressida       |\n    | TN        | Twelfth Night              |\n    | TGV       | Two Gentlemen of Verona    |\n    | TNK       | Two Noble Kinsmen          |\n    | WT        | The Winter’s Tale          |\n\n\n## Contributing\n\nInterested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.\n\n## License\n\n`py_shakespeare` was created by Hamidah Alatas. It is licensed under the terms of the MIT license.\n\n## Credits\n\n`py_shakespeare` was created with [`cookiecutter`](https://cookiecutter.readthedocs.io/en/latest/) and the `py-pkgs-cookiecutter` [template](https://github.com/py-pkgs/py-pkgs-cookiecutter).\n\n`py_shakespeare` used DraCor API. Fischer, Frank, et al. (2019). Programmable Corpora: Introducing DraCor, an Infrastructure for the Research on European Drama. In Proceedings of DH2019: "Complexities", Utrecht University, doi:10.5281/zenodo.4284002.\n\n`py_shakespeare` used The Folger Shakespeare API. Folger Shakespeare Library. (n.d.) Shakespeare’s Plays, Sonnets and Poems from The Folger Shakespeare API. Retrieved from https://shakespeare.folger.edu\n\n\n\n',
    'author': 'Hamidah Alatas',
    'author_email': None,
    'maintainer': None,
    'maintainer_email': None,
    'url': None,
    'package_dir': package_dir,
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'python_requires': '>=3.9,<4.0',
}


setup(**setup_kwargs)
