Git Product home page Git Product logo

mlconjug3's Introduction

mlconjug3 PyPi Home Page
Package Maintenance Status Package Maintener OpenSSF Best Practices OpenSSF ScoreCard Build status on Windows, MacOs and Linux Pypi Python Package Index Status Anaconda Package Index Status Supported platforms Conda Code Coverage Status Code Vulnerability Status DOI Follow me on Mastodon

mlconjug3: The multi-lingual conjugator

A Command Line application and Python library to conjugate verbs in French, English, Spanish, Italian, Portuguese, and Romanian (with more languages soon to come) using Machine Learning techniques. 🧠

The mlconjug3 project is now a proud member of the ARS Linguistica organization. 🤝 ARS Linguistica is a community-driven, open source project that aims to develop free and accessible linguistic tools and resources for all. 🌍 With a focus on advancing linguistic research, documentation, and education, ARS Linguistica is dedicated to preserving and promoting linguistic diversity through the use of open source and open science. 💡

With mlconjug3, you can:

  • Conjugate any verb in one of the supported languages, even completely new or made-up verbs, with the help of a pre-trained Machine Learning model. 💪
  • Easily modify and retrain the models using any compatible classifiers from scikit-learn. 🔧
  • Integrate mlconjug3 in your own projects. 🧬

Using mlconjug3 in Academic Research

mlconjug3 is a valuable tool for linguistic researchers, as it provides accurate and up-to-date conjugation information for a wide range of languages. 🧪 With its ability to handle completely new or made-up verbs, mlconjug3 is perfect for exploring new linguistic concepts and theories. 🔍 It can also be used to compare and contrast conjugation patterns across different languages, helping researchers to identify and understand linguistic trends.

Integrating mlconjug3 in Applications

In addition to academic research, mlconjug3 can be integrated into a wide range of web and desktop applications. 💻 For language learning platforms, mlconjug3 provides an accurate and comprehensive source of conjugation information, helping students to quickly and easily master verb conjugation. 📚 For language translation tools, mlconjug3 can help to ensure that translations are grammatically correct, by providing accurate verb conjugation information in real-time. 💬

By using mlconjug3, you are not only getting a powerful and flexible tool for verb conjugation, but you are also supporting the goals and mission of ARS Linguistica. 🙌 Whether you are a linguistic researcher, language teacher, or simply someone who is passionate about preserving linguistic heritage, your support is crucial to the success of our organization.

Join us in our mission to make linguistic tools and resources accessible to all! 💪


Conjugation for the verb to be.


Supported Languages

  • French
  • English
  • Spanish
  • Italian
  • Portuguese
  • Romanian

Academic publications citing mlconjug3

BibTeX

If you want to cite mlconjug3 in an academic publication use this citation format:

@article{mlconjug3,
  title={mlconjug3},
  author={Sekou Diao},
  journal={GitHub. Note: https://github.com/Ars-Linguistica/mlconjug3 Cited by},
  year={2023}
}

Software projects using mlconjug3

  • EDS-NLP provides a set of spaCy components that are used to extract information from clinical notes written in French.
  • Translation flask API for the Helsinki NLP models available in the Huggingface Transformers library.
  • NLP Suite is a package of tools designed for non-specialists, for scholars with no knowledge or little knowledge of Natural Language Processing.
  • Runebook translates various references such as programming languages, frameworks, libraries, and APIs that software engineers refer to in development.
  • This project offers tools to visualize the gender bias in pre-trained language models to better understand the prejudices in the data.
  • This project uses language models to generate text that is well suited to the type of publication.
  • Dockerized microservice with REST API for conjugation of any verb in French and Spanish.
  • A tool to Manage and tansform HTML documents.
  • A Tux bot.
  • Tweets the words of the French language. Largely inspired by the @botducul (identical lexicon, but code in Python) and the @botsupervnr.
    Posts on @botduslip. Stores the position of the last tweeted word in a Redis database.
  • This project offers a tool to help learn differnt verbal forms.
  • A collection of common NLP tasks such as dataset parsing and explicit semantic extraction.
  • This project offers a model which recognizes covid-19 masks.
  • Need an excuse for why you can't show up in your Zoom lectures? Just generate one here!
  • Repository to store Natural Language Processing models.
  • This is a simple virtual assistant. With it, you can search the Internet, access websites, open programs, and more using just your voice.
    This virtual assistant supports the English and Portuguese languages and has many settings that you can adjust to your liking.
  • This python module responds to yes or no questions. It dishes out its advice at random.
    Disclaimer: Do not actually act on this advice ;)
  • Python+Flask web app that uses mlconjug to dynamically generate foreign language conjugation questions.
  • A dwarf-fortress adventure mode-inspired rogue-like Pygame Python3 game.
  • A WebApp to learn Spanish.
  • Application for German-French vocabulary with simple GUI.

Installation

To install mlconjug3, you have multiple options:

Using pip:

This is the preferred method to install mlconjug3, as it will always install the most recent stable release.

To install mlconjug3, run this command in your terminal:

$ pip install mlconjug3

If you don't have pip installed, this Python installation guide can guide you through the process.

Using pipx:

Recommended for users who want to avoid conflicts with other Python packages.
$ pipx install mlconjug3

Using conda:

You can also install mlconjug3 by using Anaconda or Miniconda instead of pip. To install Anaconda or Miniconda, please follow the installation instructions on their respective websites. After having installed Anaconda or Miniconda, run these commands in your terminal:

$ conda config --add channels conda-forge
$ conda config --set channel_priority strict
$ conda install mlconjug3

If you already have Anaconda or Miniconda available on your system, just type this in your terminal:

$ conda install -c conda-forge mlconjug3

You can find detailed instructions for installing mlconjug3 on the Anaconda eco-system here: https://github.com/conda-forge/mlconjug3-feedstock#installing-mlconjug3

Warning

If you intend to install mlconjug3 on a Apple Macbook with an Apple M1 or M2 processor or newer, it is advised that you install mlconjug3 by using the conda installation method as all dependencies will be pre-compiled.

From sources

The sources for mlconjug3 can be downloaded from the Github repo.

You can either clone the public repository:

$ git clone git://github.com/Ars-Linguistica/mlconjug3

Or download the tarball:

$ curl  -OL https://github.com/Ars-Linguistica/mlconjug3/tarball/master

Once you have a copy of the source, get in the source directory and you can install it with:

$ python setup.py install

Alternatively, you can use poetry to install the software:

$ pip install poetry

$ poetry install

Signing of Releases

Starting with version 3.10, all versions of the mlconjug3 package released on PyPi and GitHub will be signed using sigstore. This is to ensure the authenticity and integrity of the package, and to provide an added layer of security for our users.

Signing a software package is a way to ensure that the package has not been tampered with and that it comes from a trusted source. This is important because malicious actors may try to tamper with a package by adding malware or other unwanted code, or by pretending to be the author of the package.

By signing mlconjug3 releases using sigstore, users can verify that the package they are downloading is the one that was created and uploaded by the package's author, Sekou Diao ([email protected]), and that it has not been tampered with. This provides an additional layer of security for users and helps to ensure that they can trust the package they are using.

What is sigstore?

Sigstore is an open-source tool that allows developers to easily sign their software releases, making it easy for users to verify the authenticity of the package. The signature is cryptographically verified against the developer's public key, which is stored on a publicly accessible keyserver. This ensures that the package has not been tampered with and that it was indeed released by the developer who claims to have released it.

How to verify the signature of a release?

To verify the package, you can use the instructions provided below, which will show you how to check the package's signature and certificate using the python package sigstore, and also check for claims specific to GitHub Actions.

To verify a mlconjug3 release, the sigstore python module can be used. By default, sigstore verify will attempt to find a <filename>.sig and <filename>.crt in the same directory as the file being verified. For example, to verify the file mlconjug3-3.10.tar.gz, sigstore verify will look for mlconjug3-3.10.tar.gz.sig and mlconjug3-3.10.tar.gz.crt.

To verify the signature, use the following command:

$ python -m sigstore verify identity mlconjug3-3.10.tar.gz \
    --cert-identity '[email protected]' \
    --cert-oidc-issuer 'https://github.com/login/oauth'

Multiple files can be verified at once:

$ python -m sigstore verify identity mlconjug3-3.10.tar.gz mlconjug3-3.10.0-py3-none-any.whl \
    --cert-identity '[email protected]' \
    --cert-oidc-issuer 'https://github.com/login/oauth'

If the signature and certificate files are at different paths, they can be specified explicitly (but only for one file at a time):

$ python -m sigstore verify identity mlconjug3-3.10.tar.gz \
    --certificate some/other/path/mlconjug3-3.10.crt \
    --signature some/other/path/mlconjug3-3.10.sig \
    --cert-identity '[email protected]' \
    --cert-oidc-issuer 'https://github.com/login/oauth'

Verifying signatures from GitHub Actions:

$ python -m sigstore verify github mlconjug3-3.10.tar.gz \
    --certificate mlconjug3-3.10.tar.gz.crt \
    --signature mlconjug3-3.10.tar.gz.sig \
    --cert-identity https://github.com/diao.sekou.nlp/mlconjug3/.github/workflows/sign_and_publish.yml@refs/tags/v3.10.0

GitHub Actions specific claims can also be verified by adding flags such as --trigger, --sha, --name, --repository, and --ref.

Please note that these are examples and the exact file names and paths may vary depending on the version and distribution of mlconjug3 being verified. It is important to ensure that the correct signature and certificate files are being used for verification.

Credits

This package was created with the help of Verbiste and scikit-learn.

The logo was designed by Zuur.

mlconjug3's People

Contributors

advay168 avatar dependabot[bot] avatar ihgazni avatar sekoud avatar sekoudiaonlp avatar step-security-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mlconjug3's Issues

infinitive inserted before the conjugated verb

Running this piece of code:

import mlconjug
default_conjugator = mlconjug.Conjugator(language='en')
test_verb = default_conjugator.conjugate("eat")
all_conjugated_forms = test_verb.iterate()
print(all_conjugated_forms)

Returns this:

[('imperative', 'imperative present', '2s', 'eateat'), ('imperative', 'imperative present', '1p', 'eateat'), ('imperative', 'imperative present', '2p', 'eateat'), ('indicative', 'indicative past tense', '1s', 'eatate'), ('indicative', 'indicative past tense', '2s', 'eatate'), ('indicative', 'indicative past tense', '3s', 'eatate'), ('indicative', 'indicative past tense', '1p', 'eatate'), ('indicative', 'indicative past tense', '2p', 'eatate'), ('indicative', 'indicative past tense', '3p', 'eatate'), ('indicative', 'indicative present', '1s', 'eateat'), ('indicative', 'indicative present', '2s', 'eateat'), ('indicative', 'indicative present', '3s', 'eateats'), ('indicative', 'indicative present', '1p', 'eateat'), ('indicative', 'indicative present', '2p', 'eateat'), ('indicative', 'indicative present', '3p', 'eateat'), ('indicative', 'indicative present continuous', '1s 1s', 'eateating'), ('indicative', 'indicative present continuous', '2s 2s', 'eateating'), ('indicative', 'indicative present continuous', '3s 3s', 'eateating'), ('indicative', 'indicative present continuous', '1p 1p', 'eateating'), ('indicative', 'indicative present continuous', '2p 2p', 'eateating'), ('indicative', 'indicative present continuous', '3p 3p', 'eateating'), ('indicative', 'indicative present perfect', '1s', 'eateaten'), ('indicative', 'indicative present perfect', '2s', 'eateaten'), ('indicative', 'indicative present perfect', '3s', 'eateaten'), ('indicative', 'indicative present perfect', '1p', 'eateaten'), ('indicative', 'indicative present perfect', '2p', 'eateaten'), ('indicative', 'indicative present perfect', '3p', 'eateaten'), ('infinitive', 'infinitive present', 'eat', 'eateat')]

I haven't found any other verb where this happens.

Issues with certain English verbs ending in "-ize" / "-ise"

Describe the bug
Not sure if I should open another issue for this (let me know if so), but apparently some English verbs ending in "ize" / "ise" are throwing off the model. E.g.:

  • utilize / utilise
[('indicative', 'indicative present', '1s', 'utilght'),
 ('indicative', 'indicative present', '2s', 'utilght'),
 ('indicative', 'indicative present', '3s', 'utilghts'),
 ('indicative', 'indicative present', '1p', 'utilght'),
 ('indicative', 'indicative present', '2p', 'utilght'),
 ('indicative', 'indicative present', '3p', 'utilght'),
 ('indicative', 'indicative past tense', '1s', 'utilt'),
 ('indicative', 'indicative past tense', '2s', 'utilt'),
 ('indicative', 'indicative past tense', '3s', 'utilt'),
 ('indicative', 'indicative past tense', '1p', 'utilt'),
 ('indicative', 'indicative past tense', '2p', 'utilt'),
 ('indicative', 'indicative past tense', '3p', 'utilt'),
 ('indicative', 'indicative present continuous', '1s', 'utilghting'),
 ('indicative', 'indicative present continuous', '2s', 'utilghting'),
 ('indicative', 'indicative present continuous', '3s', 'utilghting'),
 ('indicative', 'indicative present continuous', '1p', 'utilghting'),
 ('indicative', 'indicative present continuous', '2p', 'utilghting'),
 ('indicative', 'indicative present continuous', '3p', 'utilghting'),
 ('indicative', 'indicative present perfect', '1s', 'utilt'),
 ('indicative', 'indicative present perfect', '2s', 'utilt'),
 ('indicative', 'indicative present perfect', '3s', 'utilt'),
 ('indicative', 'indicative present perfect', '1p', 'utilt'),
 ('indicative', 'indicative present perfect', '2p', 'utilt'),
 ('indicative', 'indicative present perfect', '3p', 'utilt'),
 ('infinitive', 'infinitive present', 'to utilght'),
 ('imperative', 'imperative present', '2s', 'utilght'),
 ('imperative', 'imperative present', '1p', 'utilght'),
 ('imperative', 'imperative present', '2p', 'utilght')]
  • prioritize / prioritise
[('indicative', 'indicative present', '1s', 'prioritght'),
 ('indicative', 'indicative present', '2s', 'prioritght'),
 ('indicative', 'indicative present', '3s', 'prioritghts'),
 ('indicative', 'indicative present', '1p', 'prioritght'),
 ('indicative', 'indicative present', '2p', 'prioritght'),
 ('indicative', 'indicative present', '3p', 'prioritght'),
 ('indicative', 'indicative past tense', '1s', 'prioritt'),
 ('indicative', 'indicative past tense', '2s', 'prioritt'),
 ('indicative', 'indicative past tense', '3s', 'prioritt'),
 ('indicative', 'indicative past tense', '1p', 'prioritt'),
 ('indicative', 'indicative past tense', '2p', 'prioritt'),
 ('indicative', 'indicative past tense', '3p', 'prioritt'),
 ('indicative', 'indicative present continuous', '1s', 'prioritghting'),
 ('indicative', 'indicative present continuous', '2s', 'prioritghting'),
 ('indicative', 'indicative present continuous', '3s', 'prioritghting'),
 ('indicative', 'indicative present continuous', '1p', 'prioritghting'),
 ('indicative', 'indicative present continuous', '2p', 'prioritghting'),
 ('indicative', 'indicative present continuous', '3p', 'prioritghting'),
 ('indicative', 'indicative present perfect', '1s', 'prioritt'),
 ('indicative', 'indicative present perfect', '2s', 'prioritt'),
 ('indicative', 'indicative present perfect', '3s', 'prioritt'),
 ('indicative', 'indicative present perfect', '1p', 'prioritt'),
 ('indicative', 'indicative present perfect', '2p', 'prioritt'),
 ('indicative', 'indicative present perfect', '3p', 'prioritt'),
 ('infinitive', 'infinitive present', 'to prioritght'),
 ('imperative', 'imperative present', '2s', 'prioritght'),
 ('imperative', 'imperative present', '1p', 'prioritght'),
 ('imperative', 'imperative present', '2p', 'prioritght')]
  • randomize / randomise
[('indicative', 'indicative present', '1s', 'randomght'),
 ('indicative', 'indicative present', '2s', 'randomght'),
 ('indicative', 'indicative present', '3s', 'randomghts'),
 ('indicative', 'indicative present', '1p', 'randomght'),
 ('indicative', 'indicative present', '2p', 'randomght'),
 ('indicative', 'indicative present', '3p', 'randomght'),
 ('indicative', 'indicative past tense', '1s', 'randomt'),
 ('indicative', 'indicative past tense', '2s', 'randomt'),
 ('indicative', 'indicative past tense', '3s', 'randomt'),
 ('indicative', 'indicative past tense', '1p', 'randomt'),
 ('indicative', 'indicative past tense', '2p', 'randomt'),
 ('indicative', 'indicative past tense', '3p', 'randomt'),
 ('indicative', 'indicative present continuous', '1s', 'randomghting'),
 ('indicative', 'indicative present continuous', '2s', 'randomghting'),
 ('indicative', 'indicative present continuous', '3s', 'randomghting'),
 ('indicative', 'indicative present continuous', '1p', 'randomghting'),
 ('indicative', 'indicative present continuous', '2p', 'randomghting'),
 ('indicative', 'indicative present continuous', '3p', 'randomghting'),
 ('indicative', 'indicative present perfect', '1s', 'randomt'),
 ('indicative', 'indicative present perfect', '2s', 'randomt'),
 ('indicative', 'indicative present perfect', '3s', 'randomt'),
 ('indicative', 'indicative present perfect', '1p', 'randomt'),
 ('indicative', 'indicative present perfect', '2p', 'randomt'),
 ('indicative', 'indicative present perfect', '3p', 'randomt'),
 ('infinitive', 'infinitive present', 'to randomght'),
 ('imperative', 'imperative present', '2s', 'randomght'),
 ('imperative', 'imperative present', '1p', 'randomght'),
 ('imperative', 'imperative present', '2p', 'randomght')]
  • vocalize / vocalise
[('indicative', 'indicative present', '1s', 'vocalght'),
 ('indicative', 'indicative present', '2s', 'vocalght'),
 ('indicative', 'indicative present', '3s', 'vocalghts'),
 ('indicative', 'indicative present', '1p', 'vocalght'),
 ('indicative', 'indicative present', '2p', 'vocalght'),
 ('indicative', 'indicative present', '3p', 'vocalght'),
 ('indicative', 'indicative past tense', '1s', 'vocalt'),
 ('indicative', 'indicative past tense', '2s', 'vocalt'),
 ('indicative', 'indicative past tense', '3s', 'vocalt'),
 ('indicative', 'indicative past tense', '1p', 'vocalt'),
 ('indicative', 'indicative past tense', '2p', 'vocalt'),
 ('indicative', 'indicative past tense', '3p', 'vocalt'),
 ('indicative', 'indicative present continuous', '1s', 'vocalghting'),
 ('indicative', 'indicative present continuous', '2s', 'vocalghting'),
 ('indicative', 'indicative present continuous', '3s', 'vocalghting'),
 ('indicative', 'indicative present continuous', '1p', 'vocalghting'),
 ('indicative', 'indicative present continuous', '2p', 'vocalghting'),
 ('indicative', 'indicative present continuous', '3p', 'vocalghting'),
 ('indicative', 'indicative present perfect', '1s', 'vocalt'),
 ('indicative', 'indicative present perfect', '2s', 'vocalt'),
 ('indicative', 'indicative present perfect', '3s', 'vocalt'),
 ('indicative', 'indicative present perfect', '1p', 'vocalt'),
 ('indicative', 'indicative present perfect', '2p', 'vocalt'),
 ('indicative', 'indicative present perfect', '3p', 'vocalt'),
 ('infinitive', 'infinitive present', 'to vocalght'),
 ('imperative', 'imperative present', '2s', 'vocalght'),
 ('imperative', 'imperative present', '1p', 'vocalght'),
 ('imperative', 'imperative present', '2p', 'vocalght')]
  • westernize / westernise
[('indicative', 'indicative present', '1s', 'westernght'),
 ('indicative', 'indicative present', '2s', 'westernght'),
 ('indicative', 'indicative present', '3s', 'westernghts'),
 ('indicative', 'indicative present', '1p', 'westernght'),
 ('indicative', 'indicative present', '2p', 'westernght'),
 ('indicative', 'indicative present', '3p', 'westernght'),
 ('indicative', 'indicative past tense', '1s', 'westernt'),
 ('indicative', 'indicative past tense', '2s', 'westernt'),
 ('indicative', 'indicative past tense', '3s', 'westernt'),
 ('indicative', 'indicative past tense', '1p', 'westernt'),
 ('indicative', 'indicative past tense', '2p', 'westernt'),
 ('indicative', 'indicative past tense', '3p', 'westernt'),
 ('indicative', 'indicative present continuous', '1s', 'westernghting'),
 ('indicative', 'indicative present continuous', '2s', 'westernghting'),
 ('indicative', 'indicative present continuous', '3s', 'westernghting'),
 ('indicative', 'indicative present continuous', '1p', 'westernghting'),
 ('indicative', 'indicative present continuous', '2p', 'westernghting'),
 ('indicative', 'indicative present continuous', '3p', 'westernghting'),
 ('indicative', 'indicative present perfect', '1s', 'westernt'),
 ('indicative', 'indicative present perfect', '2s', 'westernt'),
 ('indicative', 'indicative present perfect', '3s', 'westernt'),
 ('indicative', 'indicative present perfect', '1p', 'westernt'),
 ('indicative', 'indicative present perfect', '2p', 'westernt'),
 ('indicative', 'indicative present perfect', '3p', 'westernt'),
 ('infinitive', 'infinitive present', 'to westernght'),
 ('imperative', 'imperative present', '2s', 'westernght'),
 ('imperative', 'imperative present', '1p', 'westernght'),
 ('imperative', 'imperative present', '2p', 'westernght')]

However, some others like "idealize", "itemize", "legalize", "sanitize", "customize", etc., are correctly conjugated. I guess the model is not generalizing correctly on the verbs listed above? (btw, "generalize" works ;)

To Reproduce

import mlconjug3

conjugator = mlconjug3.Conjugator(language='en')
print(conjugator.conjugate("utilize").iterate())  # or any other verb from above

Expected behavior
The listed verbs are conjugated correctly.

Desktop (please complete the following information):
Google Colab.

Custom handling of defective verbs

Is your feature request related to a problem? Please describe.
I see you've stumbled across and fixed issues related to defective verbs in the past (such as #52) and are investigating how to handle these verbs. Now I wonder if this library offers a simple way to ignore these defective verb special cases, and just show their conjugations as if they were not defective.

This might sound like an odd request, but let me explain why anyone would need this. Defective verbs are not permanently defective. A verb that was once considered defective might a few decades later be considered normal simply because native speakers decided to conjugate the once defective forms and use them.

I'll use as examples the verbs computar, gerir, or even banir in Portuguese. The first two verbs were once not conjugated in the first person of the indicative present, yet nowadays they are used normally, especially computar (and mlconjug3 recognizes this). The last example, banir, is still considered by many conjugation sources as defective in the first person indicative present, but I can assure you that eu bano is used all the time by Portuguese online communities, and thus, banir might no longer be considered defective in the near future.

I believe this library doesn't want to be dated, which admittedly is a tough task when it comes to keeping up with living languages, however I think there could be a simple way to deal with this issue (if there isn't one already).

Describe the solution you'd like
There could be an optional parameter that tells the conjugator API to ignore defective verbs and fill the previously unknown defective conjugations with its best guess, just as it already does with verbs that do not exist.

Describe alternatives you've considered
In the case of banir, for example, if someone wanted to have all of its possible conjugations, they would surprised that mlconjug3 doesn't think this verb has a 1st, 2nd nor 3rd person singular conjugations. However, I could swap the first consonant of the verb and ask mlconjug3 to conjugate danir (which doesn't exist in Portuguese) instead, and return its conjugations after manually replacing the Ds with Bs.

Additional context
Some test case examples (using the CLI for brevity):

$ mlconjug3 banir -l pt

Result snippet:
image

$ mlconjug3 danir -l pt

Result snippet:
image

I hope this made sense. If anybody needs more details, feel free to ask me anything.

Empty "Gerundio" and "Infinitivo" records for Spanish reflexive verbs

Describe the bug
There are empty "Gerundio" and "Infinitivo" records in the output for Spanish reflexive verbs (like: levantarse, peinarse, ponerse, quitarse, etc.)

To Reproduce
mlconjug3 preguntarse -l es

        "Infinitivo": {
            "Infinitivo Infinitivo": {}
        },
        "Gerundio": {
            "Gerundio Gerondio": {}
        },

Expected behavior

        "Infinitivo": {
            "Infinitivo Infinitivo": {
                "": "preguntar"
            }
        },
        "Gerundio": {
            "Gerundio Gerondio": {
                "": "preguntándose"
            }
        },

Installed packages:

Python 3.9.7
black==21.10b0
click==8.0.3
colorama==0.4.4
Cython==0.29.24
defusedxml==0.7.1
joblib==1.1.0
mlconjug3==3.8.2
mypy-extensions==0.4.3
numpy==1.21.4
pathspec==0.9.0
platformdirs==2.4.0
progressbar2==3.53.1
python-utils==2.5.6
regex==2021.11.10
scikit-learn==1.0
scipy==1.7.2
six==1.16.0
threadpoolctl==3.0.0
tomli==1.2.2
typing-extensions==3.10.0.2

Add other forms for French imperative

It seems like the current French model only includes the second person plural for the imperative:

e.g.

verb = conjugator.conjugate("parler")
verb['Imperatif']['Imperatif Présent']
OrderedDict([('', 'parlez')])

However, as you will see here, French verbs can be conjugated in three ways in the imperative:

présent
(tu) parle !
(nous) parlons !
(vous) parlez !

Is it possible to add these other two forms (second person singular and first person plural)?

Missing Spanish imperative affirmatives

I discovered some missing Spanish conjugation results for the second-person singular imperative form of some -ir and -er verbs; in my testing for ~3250 verbs I found missing results for:

  • Regular verbs equivaler, prevaler and valer: should be tu equivale and tu prevale
  • Irregular verbs salir and sobresalir: should be tu sal and tu sobresal

To test, run:

import mlconjug3

default_conjugator = mlconjug3.Conjugator("es")
print(default_conjugator.conjugate("salir").conjug_info['Imperativo']['Imperativo Afirmativo'])

Note that for each verb the dictionary contains ('2s', None)

Some Spanish verbs not conjugating correctly

Describe the bug
So far I've found two Spanish verbs which don't conjugate correctly: parecer (which returns None for conjugation except for 3s) and esparcir (which is incorrect in the present subjunctive).

To Reproduce
Steps to reproduce the behavior:

import mlconjug3
es = mlconjug3.Conjugate(language='es')
conj_parecer = es.conjugate("parecer")
for conj in conj_parecer.iterate():
    print(conj)
conj_esparcir = es.conjugate("esparcir")
print(conj_esparcir.conjug_info['Subjuntivo']['Subjuntivo presente'])

Expected behavior
Parecer should outputs conjugations for conjugations besides the singular third person; esparcir conjugations in the subjunctive present should have the letter z instead of a c (e.g. esparca should be esparza).

Incorrect Conjugation

  • MLConjug version: 3.7.11
  • Python version: 3.7.4
  • Operating System: Lubuntu v16.4

If I run this code:
default_conjugator = mlconjug3.Conjugator(language='en')
print(default_conjugator.conjugate('swing').conjug_info['indicative']['indicative present']['3s']

Python outputs this:
clings

Not swings, but clings.

several Spanish conjugation need to add Spanish word 'haber'

First of all, thanks for your great work

I am learning Spanish, and my main dictionary is wordreference.com
I compare the conjugation of mlconjug3 to wordreference, I think there are several mode tense they are different.

Take an example

The Indicativo pretérito perfecto of Spanish word 'armar'

wordreference mlconjug3
yo he armado armado
has armado armado
él, ella, usted ha armado armado
nosotros, nosotras hemos armado armado
vosotros, vosotras habéis armado armado
ellos, ellas, ustedes han armado armado

wordreference is right, some Spanish conjugation need to add Spanish word 'haber' , so mlconjug3 need to change the conjugation

The similar problem, other mode tense mlconjug3 has, as following
image

Upstream: Installation broken on MacOS with Apple Silicon

Describe the bug

  • Installing with pip fails as described in lutzroeder/netron#627
  • Installing from source is possible but the dependencies numpy, scipy and scikit-learn cannot be built on Apple Silicon, therefore the library cannot run.

Current workaround as described in lutzroeder/netron#627 (comment) is to install the above dependencies with a Miniforge installer.


Relevant upstream issues:

numpy/numpy#18143
scipy/scipy#13409
scikit-learn/scikit-learn#19137

Some conjugated forms are missing from some Spanish verbs.

Describe the bug
Some conjugated forms are missing from some Spanish verbs.

To Reproduce
Steps to reproduce the behavior:

import mlconjug3

default_conjugator = mlconjug3.Conjugator("es")
print(default_conjugator.conjugate("salir").conjug_info["Indicativo"]["Indicativo Presente"])

Expected behavior
The 6 conjugated forms of the "Indicativo Presente" should be generated but only "": "salimos" is generated:

Desktop (please complete the following information):

  • OS: [Ubuntu 20.04]
  • Version [mlconjug3 v3.7.5]

Example Python usage results in import error

Describe the bug
The example usage shows an import of the conjugator module. This import errors with a ModuleNotFoundError.

To Reproduce

>>> import mlconjug3
>>> mlconjug3.__version__
'3.10.3'
>>> from mlconjug3.conjugator import Conjugator
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'mlconjug3.conjugator'

Expected behavior
The import succeeds, or the documentation shows the correct import.

Desktop (please complete the following information):

  • OS: macOS, macbook pro M1

Incorrect gerunds in Spanish

I was taking a look at this issue from the original mlconjug repository but it looks like Spanish gerunds aren't being conjugated correctly in the latest versions of mlconjug3.

Running the same example as in the original issue:

import mlconjug3

default_conjugator = mlconjug3.Conjugator("es")
conjug_info = default_conjugator.conjugate("correr").conjug_info
gerund = conjug_info["Gerundio"]
print(gerund)

Prints:

OrderedDict([('Gerundio Gerondio', OrderedDict([('', 'corrido')]))])

Is there something I'm missing here? I tried installing mlconjug3 both with pip and setup.py (and even tried building v3.7.1) and all returned the same results.

Thanks!

convert mlmodel

how to convert mlmodel and use in ios(swift)?

Initialize Conjugator
model = mlconjug3.Model(vectorizer, feature_reductor, classifier)
conjugator = mlconjug3.Conjugator(lang, model)

Training and prediction
conjugator.model.train(dataset.train_input, dataset.train_labels)
predicted = conjugator.model.predict(dataset.test_input)

print('Saving CoreML model')
coreml_model = coremltools.converters.sklearn.convert(conjugator.model, "input", "output")

got an error with this:
from sklearn.preprocessing import Imputer

sklearn 0.23.0

Error on example script

When I made a test with the example file I have this error :
C:\Python38\lib\site-packages\sklearn\base.py:310: UserWarning: Trying to unpickle estimator CountVectorizer from version 0.23.2 when using version 0.24.1. This might lead to breaking code or invalid results. Use at your own risk.
warnings.warn(
C:\Python38\lib\site-packages\sklearn\base.py:310: UserWarning: Trying to unpickle estimator LinearSVC from version 0.23.2 when using version 0.24.1. This might lead to breaking code or invalid results. Use at your own risk.
warnings.warn(
C:\Python38\lib\site-packages\sklearn\base.py:310: UserWarning: Trying to unpickle estimator SelectFromModel from version 0.23.2 when using version 0.24.1. This might lead to breaking code or invalid results. Use at your own risk.
warnings.warn(
C:\Python38\lib\site-packages\sklearn\base.py:310: UserWarning: Trying to unpickle estimator SGDClassifier from version 0.23.2 when using version 0.24.1. This might lead to breaking code or invalid results. Use at your own risk.
warnings.warn(
C:\Python38\lib\site-packages\sklearn\base.py:310: UserWarning: Trying to unpickle estimator Pipeline from version 0.23.2 when using version 0.24.1. This might lead to breaking code or invalid results. Use at your own risk.
warnings.warn(
Traceback (most recent call last):
File "e:/Desktop/Test mlconjug.py", line 9, in
test3 = default_conjugator.conjugate("facebooker").conjug_info['Indicatif']['Passé Simple']['1p']
File "C:\Python38\lib\site-packages\mlconjug3\mlconjug.py", line 173, in conjugate
prediction = self.model.predict([verb])[0]
File "C:\Python38\lib\site-packages\mlconjug3\mlconjug.py", line 352, in predict
return self.pipeline.predict(verbs)
File "C:\Python38\lib\site-packages\sklearn\utils\metaestimators.py", line 120, in
out = lambda *args, **kwargs: self.fn(obj, *args, **kwargs)
File "C:\Python38\lib\site-packages\sklearn\pipeline.py", line 418, in predict
Xt = transform.transform(Xt)
File "C:\Python38\lib\site-packages\sklearn\feature_selection_base.py", line 88, in transform
mask = self.get_support()
File "C:\Python38\lib\site-packages\sklearn\feature_selection_base.py", line 52, in get_support
mask = self._get_support_mask()
File "C:\Python38\lib\site-packages\sklearn\feature_selection_from_model.py", line 189, in _get_support_mask
estimator=estimator, getter=self.importance_getter,
AttributeError: 'SelectFromModel' object has no attribute 'importance_getter'

Hope it will be clear
Thanks for your help.

Wrong conjugation for "ficar"

First of all, thanks for the great lib!

Describe the bug

"Indicativo pretérito perfeito simples" gives "fir)" for "nós". ["Indicativo", "Indicativo pretérito perfeito simples", "nós", "fir)"]

To Reproduce
Steps to reproduce the behavior:

    conjugator = Conjugator(language = 'pt')
    conjugatedVerb = conjugator.conjugate('ficar')
    conjugatedVerb.iterate()

Expected behavior
Correct form is returned - "ficámos"

Odd Output - Portuguese

Describe the bug
The "1p" of "Indicativo pretérito perfeito simples" always produces odd output with -AR verbs. For example, with the word "pegar", it outputs "peg)". Same thing with "falar" or any other -AR verb. Alternatively, the word might produce a null. "trabalhar" produces null in the same spot ("1p" of "Indicativo pretérito perfeito simples"). This bug only affects -AR verbs (-ER and -IR output seems normal). I tested 837 -AR verbs, and every single one of them displayed this issue.

The same behavior occurs in both custom code (i.e., when mlconjug is imported) and when using the command line tool.

To Reproduce

  1. Run mlconjug pegar -l pt
  2. Run mlconjug trabalhar -l pt
  3. Run mlconjug comer -l pt
  4. Run mlconjug partir -l pt

Expected behavior
Pegar --> 1p, Indicativo pretérito perfeito simples = pegamos
Trabalhar --> trabalhamos
Comer --> comemos
Partir --> partimos

Continuing issues with Portuguese -AR verb conjugation data

Describe the bug
I would like to reopen the issue that I posted a couple years ago. I'm coming back to this project after stepping away from programming for a bit. There seems to still be an issue (as reported previously by myself and @zelenij) with 1st person plural conjugation of the "Indicativo pretérito perfeito simples" tense. For example, with the word "falar", it outputs "fal)". Another type of output can be seen in "chegar", where it outputs "cheg". From what I can see so far, this bug only affects -AR verbs. -ER and -IR output seems normal, but maybe more testing is needed. I tested 809 verbs, and found that 209 of them produce this type of error.

Here are the results of my testing:

Show log Infinitive: ficar, Result: fir)
Infinitive: chegar, Result: cheg
Infinitive: falar, Result: fal)
Infinitive: levar, Result: lev)
Infinitive: começar, Result: come
Infinitive: olhar, Result: olh)
Infinitive: achar, Result: ach)
Infinitive: tomar, Result: tom)
Infinitive: andar, Result: and)
Infinitive: criar, Result: cri)
Infinitive: usar, Result: usr)
Infinitive: ganhar, Result: ganh
Infinitive: pagar, Result: pag)
Infinitive: colocar, Result: colo
Infinitive: tirar, Result: tir)
Infinitive: explicar, Result: expli
Infinitive: parar, Result: par)
Infinitive: lançar, Result: lan
Infinitive: mudar, Result: mud)
Infinitive: provocar, Result: provo
Infinitive: aceitar, Result: aceit
Infinitive: marcar, Result: mar)
Infinitive: publicar, Result: publi
Infinitive: tocar, Result: tor)
Infinitive: matar, Result: mBr)
Infinitive: indicar, Result: indi
Infinitive: destacar, Result: desta
Infinitive: entregar, Result: entreg
Infinitive: casar, Result: cas)
Infinitive: julgar, Result: julg
Infinitive: virar, Result: vir)
Infinitive: significar, Result: signifi
Infinitive: obrigar, Result: obrig
Infinitive: aplicar, Result: apli
Infinitive: verificar, Result: verifi
Infinitive: buscar, Result: bus)
Infinitive: gerar, Result: ger)
Infinitive: fixar, Result: fix)
Infinitive: alcançar, Result: alcan
Infinitive: morar, Result: mor)
Infinitive: avançar, Result: avan
Infinitive: amar, Result: amr)
Infinitive: dedicar, Result: dedi
Infinitive: identificar, Result: identifi
Infinitive: pesar, Result: pes)
Infinitive: notar, Result: not)
Infinitive: citar, Result: cit)
Infinitive: juntar, Result: junt
Infinitive: salvar, Result: salv
Infinitive: durar, Result: dur)
Infinitive: puxar, Result: pux)
Infinitive: votar, Result: vot)
Infinitive: justificar, Result: justifi
Infinitive: atacar, Result: ata)
Infinitive: lutar, Result: lut)
Infinitive: divulgar, Result: divulg
Infinitive: praticar, Result: prati
Infinitive: carregar, Result: carreg
Infinitive: trocar, Result: tro)
Infinitive: ameaçar, Result: amea
Infinitive: libertar, Result: libert
Infinitive: visar, Result: vis)
Infinitive: criticar, Result: criti
Infinitive: gastar, Result: gast
Infinitive: soltar, Result: solt
Infinitive: limpar, Result: limp
Infinitive: empregar, Result: empreg
Infinitive: arrancar, Result: arran
Infinitive: deslocar, Result: deslo
Infinitive: brincar, Result: brin
Infinitive: reforçar, Result: refor
Infinitive: implicar, Result: impli
Infinitive: dançar, Result: dan
Infinitive: errar, Result: err)
Infinitive: despertar, Result: despert
Infinitive: largar, Result: larg
Infinitive: comunicar, Result: comuni
Infinitive: investigar, Result: investig
Infinitive: segurar, Result: segur
Infinitive: optar, Result: opt)
Infinitive: prejudicar, Result: prejudi
Infinitive: armar, Result: arm)
Infinitive: apagar, Result: apag
Infinitive: alegar, Result: aleg
Infinitive: modificar, Result: modifi
Infinitive: classificar, Result: classifi
Infinitive: lavar, Result: lav)
Infinitive: convocar, Result: convo
Infinitive: assentar, Result: assent
Infinitive: forçar, Result: for
Infinitive: fabricar, Result: fabri
Infinitive: prolongar, Result: prolong
Infinitive: fumar, Result: fum)
Infinitive: rolar, Result: rol)
Infinitive: expulsar, Result: expuls
Infinitive: sujeitar, Result: sujeit
Infinitive: rodar, Result: rod)
Infinitive: arriscar, Result: arris
Infinitive: alargar, Result: alarg
Infinitive: somar, Result: som)
Infinitive: encarregar, Result: encarreg
Infinitive: adiar, Result: adi)
Infinitive: cercar, Result: cer)
Infinitive: traçar, Result: tra
Infinitive: lidar, Result: lid)
Infinitive: expressar, Result: express
Infinitive: guiar, Result: gui)
Infinitive: abraçar, Result: abra
Infinitive: abrigar, Result: abrig
Infinitive: enxergar, Result: enxerg
Infinitive: suspeitar, Result: suspeit
Infinitive: brigar, Result: brig
Infinitive: pular, Result: pul)
Infinitive: reivindicar, Result: reivindi
Infinitive: embarcar, Result: embar
Infinitive: complicar, Result: compli
Infinitive: desembarcar, Result: desembar
Infinitive: especificar, Result: especifi
Infinitive: navegar, Result: naveg
Infinitive: mobilizar, Result: mobiliz
Infinitive: alugar, Result: alug
Infinitive: curar, Result: cur)
Infinitive: desligar, Result: deslig
Infinitive: chocar, Result: cho)
Infinitive: realçar, Result: real
Infinitive: intensificar, Result: intensifi
Infinitive: balançar, Result: balan
Infinitive: ditar, Result: dit)
Infinitive: calar, Result: cal)
Infinitive: botar, Result: bot)
Infinitive: pregar, Result: preg
Infinitive: indagar, Result: indag
Infinitive: gozar, Result: goz)
Infinitive: girar, Result: gir)
Infinitive: rezar, Result: rez)
Infinitive: rasgar, Result: rasg
Infinitive: jurar, Result: jur)
Infinitive: ousar, Result: ous)
Infinitive: disfarçar, Result: disfar
Infinitive: fitar, Result: fit)
Infinitive: esmagar, Result: esmag
Infinitive: recomeçar, Result: recome
Infinitive: interrogar, Result: interrog
Infinitive: caçar, Result: car
Infinitive: pisar, Result: pis)
Infinitive: almoçar, Result: almo
Infinitive: fartar, Result: fart
Infinitive: secar, Result: ser)
Infinitive: esfregar, Result: esfreg
Infinitive: tapar, Result: tap)
Infinitive: multiplicar, Result: multipli
Infinitive: sufocar, Result: sufo
Infinitive: alongar, Result: along
Infinitive: dotar, Result: dot)
Infinitive: resmungar, Result: resmung
Infinitive: picar, Result: pir)
Infinitive: estragar, Result: estrag
Infinitive: dispersar, Result: dispers
Infinitive: velar, Result: vel)
Infinitive: fiar, Result: fir)
Infinitive: replicar, Result: repli
Infinitive: enxugar, Result: enxu
Infinitive: roçar, Result: ror
Infinitive: vingar, Result: ving
Infinitive: evocar, Result: evo)
Infinitive: debruçar, Result: debru
Infinitive: atar, Result: atr)
Infinitive: colar, Result: col)
Infinitive: furar, Result: fur)
Infinitive: edificar, Result: edifi
Infinitive: vagar, Result: vag)
Infinitive: cascar, Result: cas)
Infinitive: esforçar, Result: esfor
Infinitive: escorregar, Result: escorreg
Infinitive: irar, Result: irr)
Infinitive: suar, Result: sur)
Infinitive: nadar, Result: nad)
Infinitive: soluçar, Result: solu
Infinitive: pescar, Result: pes)
Infinitive: invocar, Result: invo
Infinitive: afogar, Result: afog
Infinitive: coçar, Result: cor
Infinitive: adequar, Result: adeq
Infinitive: focar, Result: for)
Infinitive: notificar, Result: notifi
Infinitive: advogar, Result: advog
Infinitive: clicar, Result: cli)
Infinitive: aliar, Result: ali)
Infinitive: qualificar, Result: qualifi
Infinitive: vetar, Result: vet)
Infinitive: danificar, Result: danifi
Infinitive: diagnosticar, Result: diagnosti
Infinitive: cotar, Result: cot)
Infinitive: agregar, Result: agreg
Infinitive: posar, Result: pos)
Infinitive: descarregar, Result: descarreg
Infinitive: machucar, Result: machu
Infinitive: diversificar, Result: diversifi
Infinitive: sacar, Result: sar)
Infinitive: revogar, Result: revog
Infinitive: prorrogar, Result: prorrog
Infinitive: desperdiçar, Result: desperdi
Infinitive: vazar, Result: vaz)
Infinitive: certificar, Result: certifi
Infinitive: engraçar, Result: engra
Infinitive: vedar, Result: ved)
Infinitive: simplificar, Result: simplifi
Infinitive: sofisticar, Result: sofisti
Infinitive: vincar, Result: vin)

To Reproduce
Conjugate the verb "falar" or "chegar"

Expected behavior
Chegar --> 1p, Indicativo pretérito perfeito simples = chegamos
Falar --> 1p, Indicativo pretérito perfeito simples = falamos

Portuguese conjugation data file has some issues

Describe the bug
It seems to me that the file mlconjug3/data/conjug_manager/conjugation-pt.json has a few invalid forms. For example, when I conjugate falar through the library, I get:

Indicativo pretérito perfeito simples: falar

nós "fal)" - yes, including the closing parenthesis, and not "falámos". And looking in the file, I indeed see ")" appearing in a few places. This looks very odd to me.

To Reproduce

Conjugate the Portuguese verb falar in Indicativo pretérito perfeito simples

Expected behavior

nós falámos

On closer inspection, I don't see a single instance of the suffix "ámos" for any verb in the file for "Indicativo pretérito perfeito simples". This doesn't look right to me. Sample conjugation: https://conjugador.reverso.net/conjugacion-portugues-verbo-comprar.html

ModuleNotFoundError: No module named 'mlconjug.mlconjug3'

Describe the bug
I am getting the error "ModuleNotFoundError: No module named 'mlconjug.mlconjug3'"
after installing this package with pip and trying to import it.

To Reproduce
Steps to reproduce the behavior:

  1. Install mlconjug3 with py -3.8 -m pip install mlconjug3
  2. Import mlconjug3 with import mlconjug
  3. Run the script
  4. See error

Expected behavior
For the module to import succesfully with no error.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10
  • Python 3.8

Additional context
The original mlconjug, not mlconjug3, works perfectly fine (it's what I have been using). Once I learned that there was an updated mlconjug3 module, i wanted to get it since it was shown to be made specifically to work with python 3 (verses mlconjug being made for python 2). It's suprising that the old mlconjug works.

Issues with French verb 'falloir'

Description

mlconjug3 fails for the verb 'falloir'. This is likely due to the unusual nature of this verb (conjugations only exist for third person singular).

To Reproduce:
Command line:

mlconjug3 falloir

ERROR         cli.py  189: An error occurred: object of type 'NoneType' has no len()
Conjugations not displayed. Please check the input verbs and language.

In program context:

from mlconjug3 import Conjugator
conjugator = Conjugator()
verb = conjugator.conjugate("falloir")
print(verb.iterate())

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ubuntu/.local/lib/python3.11/site-packages/mlconjug3/verbs/verbs.py", line 256, in iterate
    return [item for item in self]
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/.local/lib/python3.11/site-packages/mlconjug3/verbs/verbs.py", line 256, in <listcomp>
    return [item for item in self]
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/.local/lib/python3.11/site-packages/mlconjug3/verbs/verbs.py", line 233, in __iter__
    for pers, form in persons.items():
                      ^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'items'

Expected behavior
Conjugation table as seen here: https://www.wordreference.com/conj/frverbs.aspx?v=falloir

Additional context
'Falloir' is highly unusual as conjugations are only accepted for third person singular across all tenses and moods, and there is no conjugation for the imperative. See https://www.wordreference.com/conj/frverbs.aspx?v=falloir .

Initial Update

The bot created this issue to inform you that pyup.io has been set up on this repo.
Once you have closed it, the bot will open pull requests for updates as soon as they are available.

Addition of Dutch

Is it possible to add Dutch as a language to conjugate verbs aswell with ML? What kind of sources are needed to add Dutch to mlconjug3? What should the structure be like of the training data, and is JSON or XML prefered? Here some tense names:

"Voltooid deelwoord",
"Onvoltooid tegenwoordige tijd (ott)",
"Tegenwoordige tijd, bijzinsvolgorde",
"Voltooid tegenwoordige tijd (vtt)",
"Onvoltooid verleden tijd (ovt)",
"Verleden tijd, bijzinsvolgorde",
"Voltooid verleden tijd (vvt)",
"Onvoltooid tegenwoordige toekomende tijd (ottt)",
"Voltooid tegenwoordige toekomende tijd (vttt)",
"Onvoltooid verleden toekomende tijd (ovtt)",
"Voltooid verleden toekomende tijd (vvtt)",
"Gebiedende wijs",
"Aanvoegende wijs"

"Past participle",
"present simple tense (ott)",
"present tense, subordinate clause order",
"present perfect tense (vtt)",
"past simple (past)",
"past tense, subordinate order",
"past perfect (vvt)",
"present future perfect tense (ottt)",
"present future perfect (vttt)",
"simple past future tense (novtt)",
"past future perfect (vvtt)",
"Imperative",
"Subjunctive"

Maybe you need these keys:

infinitive
past_participle

present_simple_tense_ott_1s
present_simple_tense_ott_2s
present_simple_tense_ott_3s
present_simple_tense_ott_1p
present_simple_tense_ott_2p
present_simple_tense_ott_3p

present_tense_subordinate_clause_order_1s
present_tense_subordinate_clause_order_2s
present_tense_subordinate_clause_order_3s
present_tense_subordinate_clause_order_1p
present_tense_subordinate_clause_order_2p
present_tense_subordinate_clause_order_3p

present_perfect_tense_vtt_1s
present_perfect_tense_vtt_2s
present_perfect_tense_vtt_3s
present_perfect_tense_vtt_1p
present_perfect_tense_vtt_2p
present_perfect_tense_vtt_3p

past_simple_ovt_1s
past_simple_ovt_2s
past_simple_ovt_3s
past_simple_ovt_1p
past_simple_ovt_2p
past_simple_ovt_3p

past_tense_subordinate_order_1s
past_tense_subordinate_order_2s
past_tense_subordinate_order_3s
past_tense_subordinate_order_1p
past_tense_subordinate_order_2p
past_tense_subordinate_order_3p

past_perfect_vvt_1s
past_perfect_vvt_2s
past_perfect_vvt_3s
past_perfect_vvt_1p
past_perfect_vvt_2p
past_perfect_vvt_3p

present_future_perfect_tense_ottt_1s
present_future_perfect_tense_ottt_2s
present_future_perfect_tense_ottt_3s
present_future_perfect_tense_ottt_1p
present_future_perfect_tense_ottt_2p
present_future_perfect_tense_ottt_3p

present_future_perfect_vttt_1s
present_future_perfect_vttt_2s
present_future_perfect_vttt_3s
present_future_perfect_vttt_1p
present_future_perfect_vttt_2p
present_future_perfect_vttt_3p

simple_past_future_tense_ovtt_1s
simple_past_future_tense_ovtt_2s
simple_past_future_tense_ovtt_3s
simple_past_future_tense_ovtt_1p
simple_past_future_tense_ovtt_2p
simple_past_future_tense_ovtt_3p

past_future_perfect_vvtt_1s
past_future_perfect_vvtt_2s
past_future_perfect_vvtt_3s
past_future_perfect_vvtt_1p
past_future_perfect_vvtt_2p
past_future_perfect_vvtt_3p

imperative
subjunctive

Also I saw this: "More information on Verbiste at https://perso.b2b2c.ca/~sarrazip/dev/conjug_manager.html", but that page is not found.

Repeated person keys in present continuous

Describe the bug
The Present continuous tense in English has double person keys. Not sure if that is intended, but the keys are of the form '1p 1p', '2s 2s'. The other tenses seem fine. I would expect the person keys to be the same in all the tenses.

To Reproduce
mlconjug3.Conjugator(language='en').conjugate("be").conjug_info['indicative']['indicative present continuous']
Outputs:

OrderedDict([('1s 1s', 'being'),
             ('2s 2s', 'being'),
             ('3s 3s', 'being'),
             ('1p 1p', 'being'),
             ('2p 2p', 'being'),
             ('3p 3p', 'being')])

Instead of:

OrderedDict([('1s', 'being'),
             ('2s', 'being'),
             ('3s', 'being'),
             ('1p', 'being'),
             ('2p', 'being'),
             ('3p', 'being')])

Such as in:
mlconjug3.Conjugator(language='en').conjugate("be").conjug_info['indicative']['indicative present']

OrderedDict([('1s', 'am'),
             ('2s', 'are'),
             ('3s', 'is'),
             ('1p', 'are'),
             ('2p', 'are'),
             ('3p', 'are')])

Add official support for PyPy 3.7 and 3.8

  • mlconjug3's version: 3.8.x
  • Python version:
PyPy3.8 PyPy3.7
  • Operating System:
Linux 64 MacOs 64 Windows 64
### Description

Add official support for PyPy 3.7 and 3.8

What I Did

Added PyPY_3.7 to the build matrix of the github workflow.

Several popular verbs doesn't conjugate

Describe the bug
Hi, for some popular verbs conjugator doesn't work, i.e. nulls in all verb's forms.
These are the verbs:

pasar
suceder
resultar
abolir
nevar
helar
granizar
amanecer
gotear
rociar
oscurecer
tronar

# nulls in Imperativo and Imperativo non:
acontecer
soler   
{
    "pasar": {
        "Indicativo": {
            "Indicativo Presente": {},
            "Indicativo Pretérito imperfecto": {
                "1s": null,
                "2s": "pasí",
                "3s": "pasías",
                "1p": null,
                "2p": "pasió",
                "3p": "pasíamos"
            },
            "Indicativo Pretérito perfecto compuesto": {},
            "Indicativo Pretérito pluscuamperfecto": {
                "1s": "pasido",
                "2s": "pasido",
                "3s": "pasido",
                "1p": "pasido",
                "2p": "pasido",
                "3p": "pasido"
            },
            "Indicativo Futuro": {},
            "Indicativo Futuro perfecto": {},
            "Indicativo presente": {
                "1s": null,
                "2s": null,
                "3s": "pasa",
                "1p": null,
                "2p": null,
                "3p": null
            },
            "Indicativo pretérito perfecto compuesto": {
                "1s": null,
                "2s": null,
                "3s": "pasado",
                "1p": null,
                "2p": null,
                "3p": null
            },
            "Indicativo pretérito imperfecto": {
                "1s": null,
                "2s": null,
                "3s": "pasaba",
                "1p": null,
                "2p": null,
                "3p": null
            },
            "Indicativo pretérito pluscuamperfecto": {
                "1s": null,
                "2s": null,
                "3s": "pasado",
                "1p": null,
                "2p": null,
                "3p": null
            },
            "Indicativo pretérito perfecto simple": {
                "1s": null,
                "2s": null,
                "3s": "pasó",
                "1p": null,
                "2p": null,
                "3p": null
            },
            "Indicativo pretérito anterior": {
                "1s": null,
                "2s": null,
                "3s": "pasado",
                "1p": null,
                "2p": null,
                "3p": null
            },
            "Indicativo futuro": {
                "1s": null,
                "2s": null,
                "3s": "pasará",
                "1p": null,
                "2p": null,
                "3p": null
            },
            "Indicativo futuro perfecto": {
                "1s": null,
                "2s": null,
                "3s": "pasado",
                "1p": null,
                "2p": null,
                "3p": null
            }
        },
        "Subjuntivo": {
            "Subjuntivo Presente": {},
            "Subjuntivo Pretérito imperfecto 1": {
                "1s": null,
                "2s": "pasiese",
                "3s": "pasieras",
                "1p": null,
                "2p": "pasiese",
                "3p": "pasiéramos"
            },
            "Subjuntivo Pretérito perfecto": {},
            "Subjuntivo Pretérito pluscuamperfecto 1": {
                "1s": "pasido",
                "2s": "pasido",
                "3s": "pasido",
                "1p": "pasido",
                "2p": "pasido",
                "3p": "pasido"
            },
            "Subjuntivo Futuro": {
                "1s": "pasiré",
                "2s": "pasiría",
                "3s": "pasieres",
                "1p": "pasirá",
                "2p": "pasiría",
                "3p": "pasiéremos"
            },
            "Subjuntivo Futuro perfecto": {
                "1s": "pasido",
                "2s": "pasido",
                "3s": "pasido",
                "1p": "pasido",
                "2p": "pasido",
                "3p": "pasido"
            },
            "Subjuntivo presente": {
                "1s": null,
                "2s": null,
                "3s": "pase",
                "1p": null,
                "2p": null,
                "3p": null
            },
            "Subjuntivo pretérito perfecto": {
                "1s": null,
                "2s": null,
                "3s": "pasado",
                "1p": null,
                "2p": null,
                "3p": null
            },
            "Subjuntivo pretérito imperfecto 1": {
                "1s": null,
                "2s": null,
                "3s": "pasara",
                "1p": null,
                "2p": null,
                "3p": null
            },
            "Subjuntivo pretérito pluscuamperfecto 1": {
                "1s": null,
                "2s": null,
                "3s": "pasado",
                "1p": null,
                "2p": null,
                "3p": null
            },
            "Subjuntivo pretérito imperfecto 2": {
                "1s": null,
                "2s": null,
                "3s": "pasase",
                "1p": null,
                "2p": null,
                "3p": null
            },
            "Subjuntivo pretérito pluscuamperfecto 2": {
                "1s": null,
                "2s": null,
                "3s": "pasado",
                "1p": null,
                "2p": null,
                "3p": null
            },
            "Subjuntivo futuro": {
                "1s": null,
                "2s": null,
                "3s": "pasare",
                "1p": null,
                "2p": null,
                "3p": null
            },
            "Subjuntivo futuro perfecto": {
                "1s": null,
                "2s": null,
                "3s": "pasado",
                "1p": null,
                "2p": null,
                "3p": null
            }
        },
        "Imperativo": {
            "Imperativo Afirmativo": {
                "2s": null,
                "3s": "pase",
                "1p": null,
                "2p": null,
                "3p": null
            },
            "Imperativo non": {
                "2s no": null,
                "3s no": "pase",
                "1p no": null,
                "2p no": null,
                "3p no": null
            }
        },
        "Condicional": {
            "Condicional Condicional": {
                "1s": null,
                "2s": null,
                "3s": "pasaría",
                "1p": null,
                "2p": null,
                "3p": null
            },
            "Condicional perfecto": {
                "1s": null,
                "2s": null,
                "3s": "pasado",
                "1p": null,
                "2p": null,
                "3p": null
            }
        },
        "Infinitivo": {
            "Infinitivo Infinitivo": {
                "": "pasar"
            }
        },
        "Gerundio": {
            "Gerundio Gerondio": {
                "": "pasando"
            }
        },
        "Participo": {
            "Participo Participo": "paso"
        }
    }
}

To Reproduce

mlconjug3 pasar -l es 

Expected behavior
conjugated forms of the verb

Desktop (please complete the following information):
black==21.10b0
click==8.0.3
colorama==0.4.4
Cython==0.29.24
defusedxml==0.7.1
joblib==1.1.0
mlconjug3==3.8.2
mypy-extensions==0.4.3
numpy==1.21.4
pathspec==0.9.0
platformdirs==2.4.0
progressbar2==3.55.0
python-utils==2.5.6
regex==2021.11.10
scikit-learn==1.0.1
scipy==1.7.3
six==1.16.0
threadpoolctl==3.0.0
tomli==1.2.2
typing_extensions==4.0.0

Incorrect conjugations of 'harbor'

The conjugations of the English verb 'harbor' are incorrect with the 'r' dropped in all forms and an 'e' added to some erroneously.

Oddly enough, the conjugations for the British English spelling, harbour, are correct, and the conjugations for the US-English color are correct.

import mlconjug3
default_conjugator = mlconjug3.Conjugator("en")
print(default_conjugator.conjugate("harbor").conjug_info)

Returns:

OrderedDict([
    ('indicative', OrderedDict([
        ('indicative present', OrderedDict([
            ('1s', 'harboe'),
            ('2s', 'harboe'),
            ('3s', 'harboes'),
            ('1p', 'harboe'),
            ('2p', 'harboe'),
            ('3p', 'harboe')])),
        ('indicative past tense', OrderedDict([
            ('1s', 'harboed'),
            ('2s', 'harboed'),
            ('3s', 'harboed'),
            ('1p', 'harboed'),
            ('2p', 'harboed'),
            ('3p', 'harboed')])),
        ('indicative present continuous', OrderedDict([
            ('1s 1s', 'harboing'),
            ('2s 2s', 'harboing'),
            ('3s 3s', 'harboing'),
            ('1p 1p', 'harboing'),
            ('2p 2p', 'harboing'),
            ('3p 3p', 'harboing')])),
        ('indicative present perfect', OrderedDict([
            ('1s', 'harboed'),
            ('2s', 'harboed'),
            ('3s', 'harboed'),
            ('1p', 'harboed'),
            ('2p', 'harboed'),
            ('3p', 'harboed')]))])),
    ('infinitive', OrderedDict([
        ('infinitive present', 'to harboe')])),
        ('imperative', OrderedDict([
            ('imperative present', OrderedDict([
                ('2s', 'harboe'),
                ('1p', 'harboe'),
                ('2p', 'harboe')]))]))])

(formatted for easy reading).

Tested on mlconjug 3.7.5

Feature Request: Unpin exact versions of dependencies

Is your feature request related to a problem? Please describe.
mlconjug3's dependencies use an exact version pin in requirements.txt. This makes it incompatible with other packages that use more recent versions of dependencies. For example, mlconjug3 is incompatible with instructor on the dependency rich due to mlconjug3 requiring rich==13.2.0 and instructor using ^13.7.0. (c.f. https://github.com/jxnl/instructor/blob/e8280bdfe9f20de9844324351659127528031cf0/pyproject.toml#L17).

Describe the solution you'd like
Allow the dependencies to have the pinned versions or newer.

Describe alternatives you've considered
My current solution is that I forked mlconjug3 and dropped the version pinning entirely.

Unable to render

Describe the bug
mlconjug3 is unable to render the answer in Italian. Other languages work fine.

To Reproduce
Steps to reproduce the behavior:

$ mlconjug3 -l it andare
2023-02-11 23:46:52,696   ERROR         cli.py  144: An error occurred: unable to render int; a string or other renderable object is required
Conjugations not displayed. Please check the input verbs and language.

Expected behavior
Display the answer.

Screenshots
N/A

Desktop (please complete the following information):

  • macOS 13.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.