Skip to content

Getting started

This page takes you from nothing to a first analysis. Pick the path that suits you; both produce CoNLL-U output.

Current versions

LIMA 3.0.0 (tag v3.0.0, Docker image aymara/lima-ubuntu22.04:3.0.0), the Python package aymara 0.8.1, built from the current LIMA code (deeplima backend only, without the legacy pipelines), and the v0.3.0 models, which both install by default.

The quickest way to try LIMA, under Linux x86_64, Windows x64 or macOS on Apple Silicon (Python ≥ 3.9 on Linux, ≥ 3.10 elsewhere):

# A recent pip is required to get the right wheel
pip install --upgrade pip
pip install aymara==0.8.1

Install the English models, then analyze a text from Python:

lima_models -i eng
>>> 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    _       _               3       discourse       _       Pos=0|Len=5
2       ,       ,       PUNCT   _       _               1       punct   _       Pos=5|Len=1
3       World   World   PROPN   _       Number:Sing     0       root    _       Pos=7|Len=5
4       !       !       PUNCT   _       _               3       punct   _       Pos=12|Len=1

The package also installs a lima command that analyzes files:

lima my-text.txt

Continue with Using LIMA from Python.

The latest Docker image contains LIMA built from the master branch; use the 3.0.0 tag instead of latest to get the LIMA 3.0.0 release:

docker pull aymara/lima-ubuntu22.04:latest
docker run -it --rm -v "$PWD":/data aymara/lima-ubuntu22.04:latest bash

Inside the container, install the models of a treebank and analyze a file:

lima_models.py -i eng
analyzeText -l eng-UD_English-MERGE -p deepud /data/my-text.txt

lima_models.py -i eng installs the default English model, eng-UD_English-MERGE, and prints the identifier to use. Continue with Language models and the command line.

What next?