From 8b1ffe2f3c479f6bf544fd0ec2cdc5aadc65f207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20de=20Chalendar?= Date: Sat, 4 May 2024 10:53:59 +0200 Subject: [PATCH] Update README to use latest lima-python --- README.md | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index f4211425f..1403186e9 100644 --- a/README.md +++ b/README.md @@ -8,24 +8,31 @@ LIMA python bindings are currently available **under Linux only** (x86_64). Under Linux with python >= 3.7 and < 4, and **upgraded pip**: +At time of writing, the current version cannot be installed using pip because +the generated Python Wheel is larger than the limit. We are waiting for a +validation of our demand for a higher limit. That's why instructions below +ask you to download yourself the wheel and install it from your filesystem. + ```bash # Upgrading pip is fundamental in order to obtain the correct LIMA version $ pip install --upgrade pip -$ pip install aymara==0.4.1 +$ wget https://github.com/aymara/lima-python/releases/download/continuous/aymara-0.5.0b6-cp37-abi3-manylinux_2_28_x86_64.whl +$ pip install ./aymara-0.5.0b6-cp37-abi3-manylinux_2_28_x86_64.whl $ lima_models.py -l eng +# Either simply use the lima command to produce an analysis of a file in CoNLLU format: +$ lima +# Or use the python API: $ python >>> import aymara.lima >>> nlp = aymara.lima.Lima("ud-eng") ->>> sentences = nlp('Hello, World!') ->>> print(sentences[0][0].lemma) +>>> doc = nlp('Hello, World!') +>>> print(doc[0].lemma) hello ->>> print(sentences.conll()) -# sent_id = 1 -# text = Hello, World! -1 Hello hello INTJ _ _ 0 root _ Len=5|Pos=1|SpaceAfter=No -2 , , PUNCT _ _ 1 punct _ Len=1|Pos=6 -3 World World PROPN _ Number=Sing 1 vocative _ Len=5|Pos=8|SpaceAfter=No -4 ! ! PUNCT _ _ 1 punct _ Len=1|Pos=13 +>>> 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 ``` # Introducing LIMA