spanishconjugator


Namespanishconjugator JSON
Version 2.3.7594 PyPI version JSON
download
home_pagehttps://github.com/Benedict-Carling/spanish-conjugator
SummaryA python library to conjugate spanish words with parameters tense, mood and pronoun
upload_time2024-04-18 17:14:28
maintainerNone
docs_urlNone
authorBenedict Carling
requires_pythonNone
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Spanish Conjugator 🇪🇸
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/Imperial-iGEM/DJANGO-Assembly-Methods/Django%20CI)
![GitHub repo size](https://img.shields.io/github/repo-size/Benedict-Carling/spanish-conjugator)
![PyPI - Downloads](https://img.shields.io/pypi/dm/spanishconjugator)
![GitHub top language](https://img.shields.io/github/languages/top/Benedict-Carling/spanish-conjugator)
![GitHub](https://img.shields.io/github/license/Benedict-Carling/spanish-conjugator)
![PyPI](https://img.shields.io/pypi/v/spanishconjugator)


A class Conjugator containing a function conjugate which conjugates spanish verbs by tense, mood and pronoun. 

## Installation
`pip install spanishconjugator`

## Example usage
Example python usage; the `conjugate` function of the `Conjugator` Class takes 4 parameters being root-verb, tense, mood, pronoun respectively

```python
from spanishconjugator import Conjugator
imperfect_conjugation = Conjugator().conjugate('hablar','imperfect','indicative','yo')
print(imperfect_conjugation)
>>> hablaba
```
## Tenses, Moods and Pronouns implemented

All pronouns are implemented
```yo, tu, usted, nosotros, vosotros, ustedes```

All moods currently implemented are
```indicative, conditional```

All tenses currently implemented are
```present, imperfect, preterite, future, present_perfect, past_anterior, future_perfect, conditional_simple```

Exaple usage of different moods/tenses with hablar and yo

### Indicative Present

```python
Conjugator().conjugate('hablar','present','indicative','yo')
>>> hablo
```

In case of indicative present, 4th param pronoun is optional.
```python
from spanishconjugator import Conjugator
present_indicative_conjugation = Conjugator().conjugate('hablar','present','indicative')
print(present_indicative_conjugation)
>>> {'el/ella/usted': 'habla', 'ellos/ellas/ustedes': 'hablan', 'tu': 'hablas', 'vosotros': 'habláis', 'yo': 'hablo', 'nosotros': 'hablamos'}
```

### Indicative Imperfect

```python
Conjugator().conjugate('hablar','imperfect','indicative','yo')
>>> hablaba
```
### Indicative Preterite

```python
Conjugator().conjugate('hablar','preterite','indicative','yo')
>>> hablé
```
### Indicative Future

```python
Conjugator().conjugate('hablar','future','indicative','yo')
>>> hablaré
```
### Indicative Present_Perfect

```python
Conjugator().conjugate('hablar','present_perfect','indicative','yo')
>>> he hablado
```
### Indicative Past_Anterior

```python
Conjugator().conjugate('hablar','past_anterior','indicative','yo')
>>> hube hablado
```
### Indicative Future_Perfect

```python
Conjugator().conjugate('hablar','future_perfect','indicative','yo')
>>> habré hablado
```
### Conditional Simple

```python
Conjugator().conjugate('hablar','simple_conditional','conditional','yo')
>>> hablaría
```
### Conditional Perfect

```python
Conjugator().conjugate('hablar','perfect','conditional','yo')
>>> habría hablado
```
### Imperative Afferative

```python
Conjugator().conjugate('hablar','affirmative','imperative','tu')
>>> habla
```
### Imperative Negative

```python
Conjugator().conjugate('hablar','negative','imperative','tu')
>>> hables
```
### Subjunctive Present

```python
Conjugator().conjugate('hablar','present','subjunctive','yo')
>>> hable
```
### Subjunctive Imperfect

```python
Conjugator().conjugate('hablar','imperfect','subjunctive','yo')
>>> hablara
```
### Subjunctive Imperfect_se

```python
Conjugator().conjugate('hablar','imperfect_se','subjunctive','yo')
>>> hablase
```
### Subjunctive Future

```python
Conjugator().conjugate('hablar','future','subjunctive','yo')
>>> hablare
```

## Developing
if you would like to help develop spanishconjugator, follow succeeding code

Whilst in command line create a folder in which you would like to work (name only reccommended)

`$ mkdir spanish_conjugator_enviroment`

change directory into the enviroment you have just made

`$ cd spanish_conjugator_enviroment`

install virtualenv

`$ pip install virtualenv`

create a virtual enviroment from path of python3

`$ virtualenv -p $(which python3) my_venv`

activate virtual enviroment

`$ source my_venv/bin/activate`

> tip: once you want to disactivate your virtual enviroment simply run `$ deactivate`

Clone Spanish-Conjugator

`$ git clone https://github.com/Benedict-Carling/spanish-conjugator.git`

Install developer dependencies for unit test e.g pytest and for other library tools

`pip install -e .[dev]`

## Developing - Testing

We have chosen to use the library pytest for our unit test
At this point in the developing guide you can check the code works by running it against out current unit tests located in the `/tests` folder

`$ pytest`

output should show the different tenses implemented should pass their unit tests as below.(27/08/2020)
![alt text](https://github.com/Benedict-Carling/spanish-conjugator/blob/master/images/pytest.png?raw=true)

## Developing - Submission

To submit code to this repositry please fork and submit a pull request 🚀

# Alternative Versions
Check out the Javascript npm version of the library if you are working in a node or browser enviroment

https://github.com/Benedict-Carling/spanish-conjugatorjs

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Benedict-Carling/spanish-conjugator",
    "name": "spanishconjugator",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Benedict Carling",
    "author_email": "bencarling1@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/d5/49/6b395d6881fb5c086561c6b31ae903a4b7fccf94d73adfa24c807da535f8/spanishconjugator-2.3.7594.tar.gz",
    "platform": null,
    "description": "# Spanish Conjugator \ud83c\uddea\ud83c\uddf8\n![GitHub Workflow Status](https://img.shields.io/github/workflow/status/Imperial-iGEM/DJANGO-Assembly-Methods/Django%20CI)\n![GitHub repo size](https://img.shields.io/github/repo-size/Benedict-Carling/spanish-conjugator)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/spanishconjugator)\n![GitHub top language](https://img.shields.io/github/languages/top/Benedict-Carling/spanish-conjugator)\n![GitHub](https://img.shields.io/github/license/Benedict-Carling/spanish-conjugator)\n![PyPI](https://img.shields.io/pypi/v/spanishconjugator)\n\n\nA class Conjugator containing a function conjugate which conjugates spanish verbs by tense, mood and pronoun. \n\n## Installation\n`pip install spanishconjugator`\n\n## Example usage\nExample python usage; the `conjugate` function of the `Conjugator` Class takes 4 parameters being root-verb, tense, mood, pronoun respectively\n\n```python\nfrom spanishconjugator import Conjugator\nimperfect_conjugation = Conjugator().conjugate('hablar','imperfect','indicative','yo')\nprint(imperfect_conjugation)\n>>> hablaba\n```\n## Tenses, Moods and Pronouns implemented\n\nAll pronouns are implemented\n```yo, tu, usted, nosotros, vosotros, ustedes```\n\nAll moods currently implemented are\n```indicative, conditional```\n\nAll tenses currently implemented are\n```present, imperfect, preterite, future, present_perfect, past_anterior, future_perfect, conditional_simple```\n\nExaple usage of different moods/tenses with hablar and yo\n\n### Indicative Present\n\n```python\nConjugator().conjugate('hablar','present','indicative','yo')\n>>> hablo\n```\n\nIn case of indicative present, 4th param pronoun is optional.\n```python\nfrom spanishconjugator import Conjugator\npresent_indicative_conjugation = Conjugator().conjugate('hablar','present','indicative')\nprint(present_indicative_conjugation)\n>>> {'el/ella/usted': 'habla', 'ellos/ellas/ustedes': 'hablan', 'tu': 'hablas', 'vosotros': 'habl\u00c3\u00a1is', 'yo': 'hablo', 'nosotros': 'hablamos'}\n```\n\n### Indicative Imperfect\n\n```python\nConjugator().conjugate('hablar','imperfect','indicative','yo')\n>>> hablaba\n```\n### Indicative Preterite\n\n```python\nConjugator().conjugate('hablar','preterite','indicative','yo')\n>>> habl\u00e9\n```\n### Indicative Future\n\n```python\nConjugator().conjugate('hablar','future','indicative','yo')\n>>> hablar\u00e9\n```\n### Indicative Present_Perfect\n\n```python\nConjugator().conjugate('hablar','present_perfect','indicative','yo')\n>>> he hablado\n```\n### Indicative Past_Anterior\n\n```python\nConjugator().conjugate('hablar','past_anterior','indicative','yo')\n>>> hube hablado\n```\n### Indicative Future_Perfect\n\n```python\nConjugator().conjugate('hablar','future_perfect','indicative','yo')\n>>> habr\u00e9 hablado\n```\n### Conditional Simple\n\n```python\nConjugator().conjugate('hablar','simple_conditional','conditional','yo')\n>>> hablar\u00eda\n```\n### Conditional Perfect\n\n```python\nConjugator().conjugate('hablar','perfect','conditional','yo')\n>>> habr\u00eda hablado\n```\n### Imperative Afferative\n\n```python\nConjugator().conjugate('hablar','affirmative','imperative','tu')\n>>> habla\n```\n### Imperative Negative\n\n```python\nConjugator().conjugate('hablar','negative','imperative','tu')\n>>> hables\n```\n### Subjunctive Present\n\n```python\nConjugator().conjugate('hablar','present','subjunctive','yo')\n>>> hable\n```\n### Subjunctive Imperfect\n\n```python\nConjugator().conjugate('hablar','imperfect','subjunctive','yo')\n>>> hablara\n```\n### Subjunctive Imperfect_se\n\n```python\nConjugator().conjugate('hablar','imperfect_se','subjunctive','yo')\n>>> hablase\n```\n### Subjunctive Future\n\n```python\nConjugator().conjugate('hablar','future','subjunctive','yo')\n>>> hablare\n```\n\n## Developing\nif you would like to help develop spanishconjugator, follow succeeding code\n\nWhilst in command line create a folder in which you would like to work (name only reccommended)\n\n`$ mkdir spanish_conjugator_enviroment`\n\nchange directory into the enviroment you have just made\n\n`$ cd spanish_conjugator_enviroment`\n\ninstall virtualenv\n\n`$ pip install virtualenv`\n\ncreate a virtual enviroment from path of python3\n\n`$ virtualenv -p $(which python3) my_venv`\n\nactivate virtual enviroment\n\n`$ source my_venv/bin/activate`\n\n> tip: once you want to disactivate your virtual enviroment simply run `$ deactivate`\n\nClone Spanish-Conjugator\n\n`$ git clone https://github.com/Benedict-Carling/spanish-conjugator.git`\n\nInstall developer dependencies for unit test e.g pytest and for other library tools\n\n`pip install -e .[dev]`\n\n## Developing - Testing\n\nWe have chosen to use the library pytest for our unit test\nAt this point in the developing guide you can check the code works by running it against out current unit tests located in the `/tests` folder\n\n`$ pytest`\n\noutput should show the different tenses implemented should pass their unit tests as below.(27/08/2020)\n![alt text](https://github.com/Benedict-Carling/spanish-conjugator/blob/master/images/pytest.png?raw=true)\n\n## Developing - Submission\n\nTo submit code to this repositry please fork and submit a pull request \ud83d\ude80\n\n# Alternative Versions\nCheck out the Javascript npm version of the library if you are working in a node or browser enviroment\n\nhttps://github.com/Benedict-Carling/spanish-conjugatorjs\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A python library to conjugate spanish words with parameters tense, mood and pronoun",
    "version": "2.3.7594",
    "project_urls": {
        "Homepage": "https://github.com/Benedict-Carling/spanish-conjugator"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "02528e8349d91d16d2b88651dec76cb565beae7922bfd09397e84bf80fbb0613",
                "md5": "d60fcb902c5642b283c25de15a82eff2",
                "sha256": "f499838a4e1a35584767ab8c6589bca827b8427a63e4563f0cfdb49a31d4aefb"
            },
            "downloads": -1,
            "filename": "spanishconjugator-2.3.7594-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d60fcb902c5642b283c25de15a82eff2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 19876,
            "upload_time": "2024-04-18T17:13:36",
            "upload_time_iso_8601": "2024-04-18T17:13:36.339549Z",
            "url": "https://files.pythonhosted.org/packages/02/52/8e8349d91d16d2b88651dec76cb565beae7922bfd09397e84bf80fbb0613/spanishconjugator-2.3.7594-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d5496b395d6881fb5c086561c6b31ae903a4b7fccf94d73adfa24c807da535f8",
                "md5": "00cea1cc0a8e69457e19a426bf0e1d4e",
                "sha256": "b543b32218f690c73a787467e0f5839206382dbf65f593e2373550892704272c"
            },
            "downloads": -1,
            "filename": "spanishconjugator-2.3.7594.tar.gz",
            "has_sig": false,
            "md5_digest": "00cea1cc0a8e69457e19a426bf0e1d4e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 13014,
            "upload_time": "2024-04-18T17:14:28",
            "upload_time_iso_8601": "2024-04-18T17:14:28.667538Z",
            "url": "https://files.pythonhosted.org/packages/d5/49/6b395d6881fb5c086561c6b31ae903a4b7fccf94d73adfa24c807da535f8/spanishconjugator-2.3.7594.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-18 17:14:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Benedict-Carling",
    "github_project": "spanish-conjugator",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "spanishconjugator"
}
        
Elapsed time: 0.30525s