LIMA python bindings
Introducing LIMA
LIMA is a multilingual linguistic analyzer developed by the CEA LIST, LASTI laboratory (French acronym for Text and Image Semantic Analysis Laboratory). LIMA is Free Software, available under the MIT license.
LIMA has state of the art performance for more than 60 languages thanks to its recent deep learning (neural network) based modules. But it includes also a very powerful rules based mechanism called ModEx allowing to quickly extract information (entities, relations, events…) in new domains where annotated data does not exist.
For more information, detailed installation instructions and documentation, please refer to the LIMA documentation.
Installation
LIMA python bindings are available under Linux (x86_64), Windows (x64) and macOS (Apple Silicon).
With Python >= 3.9 (>= 3.10 on Windows and macOS) and an upgraded pip, which picks the right one of the wheels of each release:
| Wheel | Qt | Python | Systems |
|---|---|---|---|
manylinux_2_34 |
6.12 | 3.10 to 3.15 | Linux, glibc >= 2.34 (Ubuntu 22.04+, Debian 12+, RHEL 9+...) |
manylinux_2_28 |
6.9 | 3.9 to 3.13 | Linux, glibc >= 2.28 (older systems, and Python 3.9) |
win_amd64 |
6.12 | 3.10 and later | Windows 10/11 x64 |
macosx_15_0_arm64 |
6.12 | 3.10 and later | macOS >= 15 on Apple Silicon |
# Upgrading pip is fundamental in order to obtain the correct LIMA version
$ pip install --upgrade pip
$ pip install aymara
$ lima_models -i eng
# Either simply use the lima command to produce an analysis of a file in CoNLLU format:
$ lima <path to the file to analyse>
# Or use the python API:
$ python
>>> import aymara.lima
>>> nlp = aymara.lima.Lima("ud-eng")
>>> doc = nlp('Hello, World!')
>>> print(doc[0].lemma)
hello
>>> print(repr(doc))
1 Hello hello INTJ _ _ 0 root _ Pos=0|Len=5
2 , , PUNCT _ _ 1 punct _ Pos=5|Len=1
3 World World PROPN _ Number:Sing 1 vocative _ Pos=7|Len=5
4 ! ! PUNCT _ _ 1 punct _ Pos=12|Len=1
lima_models -i eng installs the default English model, which
aymara.lima.Lima("ud-eng") then uses (lima_models -a lists the languages
and models available). Check the language models documentation for more information about using these models.
Running
$ lima <utf-8 text file to analyze>
# OR
$ python
>>> import aymara.lima
>>> l = aymara.lima.Lima("ud-eng")
>>> r = l.analyzeText("The author wrote a novel.", lang="ud-eng")
>>> print(r)
# sent_id = 1
# text = The author wrote a novel.
1 The the DET _ Definite=Def|PronType=Art 2 det _ Len=3|Pos=1
2 author author NOUN _ Number=Sing 3 nsubj _ Len=6|Pos=5
3 wrote write VERB _ Mood=Ind|Tense=Past|VerbForm=Fin 0 root _ Len=5|Pos=12
4 a a DET _ Definite=Ind|PronType=Art 5 det _ Len=1|Pos=18
5 novel novel NOUN _ Number=Sing 3 obj _ Len=5|Pos=20|SpaceAfter=No
6 . . PUNCT _ _ 3 punct _ Len=1|Pos=25
>>>
Note that some error messages could be displayed during the Lima object instantiation. If you get a valid result, you can ignore them. Most of them are debug messages that will be removed in a later version.
Create a Lima analyzer once and reuse it: initialization loads the models,
and an analyzer with a neural pipeline (deepud) uses about 3 GB of memory. Up
to aymara 0.7.1, this memory is not freed when the analyzer is deleted, so
avoid creating several in one process. From the next version, deleting the last
analyzer of a language frees its models.
For French, use ud-fra (after lima_models -i fra). The deepud pipeline of
ud-eng and ud-fra also recognizes named entities (persons, locations,
organizations, dates, amounts...), available as doc.ents:
>>> nlp = aymara.lima.Lima("ud-fra")
>>> doc = nlp("Jean Dupont a visité Paris le 12 janvier 2021.")
>>> [(ent.text, ent.label) for ent in doc.ents]
The legacy rule-based languages eng, fre and por and their pipelines
(main...) are deprecated and no longer distributed: these names now select
ud-eng, ud-fra and ud-por and the deepud pipeline, with a
DeprecationWarning.
Python bindings API documentation
The Lima python API documentation is part of the LIMA documentation, along with a user guide for Python.
Configuration and customization
To configure finely LIMA for your needs, follow the same instructions as for the native C++ tools, described in Configuring LIMA.
PySide LIMA python bindings build and deploy instructions
Building the wheel
The CI (.github/workflows/build-qt6.yml) builds the four wheels. The Linux
ones on the LIMA images of the same configuration (built by aymara/lima's own
build-qt6.yml):
manylinux_2_28, Qt 6.9.3, built with Python 3.9 (cp39-abi3), tested on Python 3.9 and 3.13;manylinux_2_34, Qt 6.12.0, built with Python 3.10 (cp310-abi3), tested on Python 3.10 and 3.15.
The Windows and macOS ones against the LIMA packages of aymara/lima's
build-win.yml and build-macos.yml (its continuous prerelease), with
scripts/build-wheel-windows.ps1 and scripts/build-wheel-macos.sh:
win_amd64, Qt 6.12.0, built with Python 3.10 (cp310-abi3), tested on Python 3.10 and 3.13;macosx_15_0_arm64, Qt 6.12.0, built with Python 3.10 (cp310-abi3), tested on Python 3.10 and 3.13.
The wheels of the master branch are published in the
continuous prerelease.
To build the manylinux_2_28 wheel locally, with Docker:
./gbuild-manylinux_2_28.sh
Releasing
The version is in aymara/version.py (and the [tool.bumpver] section of
pyproject.toml), and is changed with bumpver:
- Give the new version its section in
CHANGES.md(merged on master): its first section is the release notes. - On an up-to-date master,
bumpver update --minor(or--patch,--major;--dryto see the changes first) updates the version, commits, tags it (e.g.0.8.0; releases up to 0.7.1 were taggedv0.7.1) and pushes. - The tag makes the CI build and test the four wheels and publish them to PyPI
and as a GitHub release. The tag must match
aymara/version.py.
Developer Notes
To see the wheels accepted on current system:
>>> from packaging.tags import sys_tags
>>> [str(t) for t in sys_tags()]
See:
- https://cibuildwheel.readthedocs.io/en/stable/
- https://wiki.qt.io/Qt_for_Python
- https://www.qt.io/blog/2018/05/31/write-python-bindings
License notes
Some part of this API are largely inspired by the spaCy one and some text of the documentation are reproduced from the spaCy documentation. spaCy is also released under the MIT license. We thus reproduce its copyright notice below:
The MIT License (MIT)
Copyright (C) 2016-2022 ExplosionAI GmbH, 2016 spaCy GmbH, 2015 Matthew Honnibal
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Metadata
Release files for aymara 0.8.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| aymara-0.8.1-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details for aymara-0.8.1-cp310-abi3-win_amd64.whl |
| aymara-0.8.1-cp310-abi3-manylinux_2_34_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.34+ x86-64 | Details for aymara-0.8.1-cp310-abi3-manylinux_2_34_x86_64.whl |
| aymara-0.8.1-cp310-abi3-macosx_15_0_arm64.whl | CPython 3.10 | abi3 | macOS 15.0+ ARM64 | Details for aymara-0.8.1-cp310-abi3-macosx_15_0_arm64.whl |
| aymara-0.8.1-cp39-abi3-manylinux_2_28_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.28+ x86-64 | Details for aymara-0.8.1-cp39-abi3-manylinux_2_28_x86_64.whl |
Total release size: 591.2 MB
Release files / aymara-0.8.1-cp310-abi3-win_amd64.whl
| Download URL | aymara-0.8.1-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 111.0 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
59b5d74bf513db1bcb6e98a700c1405359fd773e60804994fcff16ab3ddf45f9
|
|
BLAKE2b-256 checksum How to use checksums |
26f325c32a36b84f630aff0439bdb87e2817a1f3637442ac4adf65253ac02e42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logRelease files / aymara-0.8.1-cp310-abi3-manylinux_2_34_x86_64.whl
| Download URL | aymara-0.8.1-cp310-abi3-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 202.8 MB |
| Tags | CPython 3.10 Linux glibc 2.34+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
4f7b4398d92d63461a9682f3ad6bd3a8d14681bdc5ea55e12b440afcd09718de
|
|
BLAKE2b-256 checksum How to use checksums |
1e1ba55a5e27ac9a292834a9c3dca671aee4b6a21162e9bedd2065727f4e76ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logRelease files / aymara-0.8.1-cp310-abi3-macosx_15_0_arm64.whl
| Download URL | aymara-0.8.1-cp310-abi3-macosx_15_0_arm64.whl |
|---|---|
| Size | 76.1 MB |
| Tags | CPython 3.10 abi3 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
ef5f2ea6c8f92836d27b71b37497e0ddeb20735f2d7803f39852c516529807d7
|
|
BLAKE2b-256 checksum How to use checksums |
6e2dabd51496f18e79d093044a50eb29db9dd92dc5e6d639e557f819ed12371a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logRelease files / aymara-0.8.1-cp39-abi3-manylinux_2_28_x86_64.whl
| Download URL | aymara-0.8.1-cp39-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 201.3 MB |
| Tags | CPython 3.9 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
e83d1f7b1d0075c49f4ff8c854e45474e31353d27bcfe15819ae8fbff90f5308
|
|
BLAKE2b-256 checksum How to use checksums |
ca632560b6821672b23d45d95c6306b29a092840c588431213944db3b22747cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logSecurity for aymara 0.8.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 4 files in this release have been uploaded with provenance metadata.
Attestation for aymara-0.8.1-cp310-abi3-win_amd64.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.