Lamon (LAtin MOrphological tools, pronounced /leɪmən/) is a simple POS tagger & lemmatizer for Latin written in C++ and Lamonpy is a Python package of Lamon. You can easily obtain lemma and tag of each word in given text using Lamonpy.
Getting Started
You can install Lamonpy easily using pip. (https://pypi.org/project/lamonpy/)
$ pip install --upgrade pip $ pip install lamonpy
The supported OS and Python versions are:
Linux (x86-64) with Python >= 3.5
macOS >= 10.13 with Python >= 3.5
Windows 7 or later (x86, x86-64) with Python >= 3.5
Other OS with Python >= 3.5: Compilation from source code required (with c++11 compatible compiler)
Here is a simple example using Lamonpy to analyze Latin texts.
from lamonpy import Lamon
lamon = Lamon()
score, tagged = lamon.tag('In principio creavit Deus caelum et terram.')[0]
print(tagged)
# `tagged` is a list of tuples `(start_pos, end_pos, lemma, tag)`
# [(0, 2, 'in', 'r--------'),
# (3, 12, 'principium', 'n-s---nb-'),
# (13, 20, 'creo', 'v3sria---'),
# (21, 25, 'deus', 'n-s---mn-'),
# (26, 32, 'caelus', 'n-s---ma-'),
# (33, 35, 'et', 'c--------'),
# (36, 42, 'terra', 'n-s---fa-'),
# (42, 43, '.', '---------')]
Tagging Model and Its Accuracy
Lamon’s tagging model is based on BiLSTM network trained with Perseus Latin Dependency Treebanks (4,000 sentences) and self-trained with raw Latin corpora (440,000 sentences) collected by Latina Vivense.
Since there is no available standard for evaluating Latin taggers, we built own test set named vivens of 900 sentences. The result of evaluation is shown below:
vivens (900 sents) |
Perseus (4000 sents) |
|||||
|---|---|---|---|---|---|---|
lemma |
tag |
both |
lemma |
tag |
both |
|
Lamon |
94.6 |
83.0 |
81.1 |
89.4 |
80.2 |
76.6 |
Lamon (large) |
94.2 |
83.3 |
81.3 |
89.7 |
81.9 |
78.3 |
Lamon (uv.) |
94.4 |
82.6 |
80.7 |
87.7 |
77.9 |
73.8 |
Backoff |
88.1 |
92.4 |
||||
123 POS |
58.1 |
54.8 |
83.8 |
79.6 |
||
CRF POS |
69.1 |
63.4 |
77.3 |
72.9 |
Lamon : base size (embedding_size:80, hidden_size:160)
Lamon (large) : large size (embedding_size:160, hidden_size:320)
Lamon (uv.) : large size without Perseus’ dataset
Backoff : cltk.lemmatize.latin.backoff.BackoffLatinLemmatizer
CRF POS : cltk.tag.pos.POSTag.tag_crf
For calculating both score of 123 POS and CRF POS, Backoff’s results are used.
Since Lamon and all cltk’s tagger are trained with Perseus’ dataset, the scores for Perseus are not significant for confirming the actual accuracy of each model. Rather, it shows that 123 POS and CRF POS are overfitting to Perseus’s dataset.
Because the size of the vivens dataset is small, the results of this evaluation can be inaccurate. We plan to acquire larger dataset for evaluation and publish the dataset to make more accurate evaluation.
Demo
Larger Models
Due to the package size limit of pypi, the distributed wheel package contains base model only. We provide larger models by Google-drive links.
Large model : https://drive.google.com/file/d/1u8LdvD-zKtrj7kDRs6CjQw74ZG6aT8jS/view?usp=sharing
Large model (unsupervised) : https://drive.google.com/file/d/1nw8LO_1o0O894gXzgQ7Hx5Fyikvy1w2u/view?usp=sharing
You can use these models by passing the model path to Lamon.__init__ as arguments.
from lamonpy import Lamon lamon = Lamon(dict_path='dict.large.bin', tagger_path='tagger.large.bin')
License
Lamonpy is licensed under the terms of MIT License, meaning you can use it for any reasonable purpose and remain in complete ownership of all the documentation you produce.
History
- 0.2.0 (2020-10-16)
[NUM] token for Roman numeral was added.
The accuracy was slightly increased by introducing joint lemma-tag layer.
- 0.1.0 (2020-09-26)
the first version of lamonpy
Metadata
Release files for lamonpy 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lamonpy-0.2.0.tar.gz | 43.6 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| lamonpy-0.2.0-cp38-cp38-win_amd64.whl | CPython 3.8 | CPython 3.8 | Windows x86-64 | Details |
| lamonpy-0.2.0-cp38-cp38-win32.whl | CPython 3.8 | CPython 3.8 | Windows x86-32 | Details |
| lamonpy-0.2.0-cp38-cp38-manylinux2010_x86_64.whl | CPython 3.8 | CPython 3.8 | Linux glibc 2.12+ x86-64 | Details |
| lamonpy-0.2.0-cp38-cp38-macosx_10_14_x86_64.whl | CPython 3.8 | CPython 3.8 | macOS 10.14+ x86-64 | Details |
| lamonpy-0.2.0-cp37-cp37m-win_amd64.whl | CPython 3.7 | CPython 3.7 pymalloc | Windows x86-64 | Details |
| lamonpy-0.2.0-cp37-cp37m-win32.whl | CPython 3.7 | CPython 3.7 pymalloc | Windows x86-32 | Details |
| lamonpy-0.2.0-cp37-cp37m-manylinux2010_x86_64.whl | CPython 3.7 | CPython 3.7 pymalloc | Linux glibc 2.12+ x86-64 | Details |
| lamonpy-0.2.0-cp37-cp37m-macosx_10_14_x86_64.whl | CPython 3.7 | CPython 3.7 pymalloc | macOS 10.14+ x86-64 | Details |
| lamonpy-0.2.0-cp36-cp36m-win_amd64.whl | CPython 3.6 | CPython 3.6 pymalloc | Windows x86-64 | Details |
| lamonpy-0.2.0-cp36-cp36m-win32.whl | CPython 3.6 | CPython 3.6 pymalloc | Windows x86-32 | Details |
| lamonpy-0.2.0-cp36-cp36m-manylinux2010_x86_64.whl | CPython 3.6 | CPython 3.6 pymalloc | Linux glibc 2.12+ x86-64 | Details |
| lamonpy-0.2.0-cp36-cp36m-macosx_10_14_x86_64.whl | CPython 3.6 | CPython 3.6 pymalloc | macOS 10.14+ x86-64 | Details |
| lamonpy-0.2.0-cp35-cp35m-win_amd64.whl | CPython 3.5 | CPython 3.5 pymalloc | Windows x86-64 | Details |
| lamonpy-0.2.0-cp35-cp35m-win32.whl | CPython 3.5 | CPython 3.5 pymalloc | Windows x86-32 | Details |
| lamonpy-0.2.0-cp35-cp35m-manylinux2010_x86_64.whl | CPython 3.5 | CPython 3.5 pymalloc | Linux glibc 2.12+ x86-64 | Details |
| lamonpy-0.2.0-cp35-cp35m-macosx_10_14_x86_64.whl | CPython 3.5 | CPython 3.5 pymalloc | macOS 10.14+ x86-64 | Details |
Total release size: 750.7 MB
Release files / lamonpy-0.2.0.tar.gz
| Download URL | lamonpy-0.2.0.tar.gz |
|---|---|
| Size | 43.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d82b1cb2ffde6750972e4ee10bc7b037a2bed89d170970ca8bb5f21f7a94c0e
|
|
BLAKE2b-256 checksum How to use checksums |
9504d88e9cc14f6a22d3a560d74b79186bef6762283c2ccd1ed07321c11e9386
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.5.10
|
Release files / lamonpy-0.2.0-cp38-cp38-win_amd64.whl
| Download URL | lamonpy-0.2.0-cp38-cp38-win_amd64.whl |
|---|---|
| Size | 44.6 MB |
| Tags | CPython 3.8 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
229609ce97f00798551e4dd5ea5435fa155ae1c91a1edf4b9ae7c15d6237da07
|
|
BLAKE2b-256 checksum How to use checksums |
0edb07ed601b97d1b5d17d9236bab2fe407307224e214494369a7fde46038a69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
|
Release files / lamonpy-0.2.0-cp38-cp38-win32.whl
| Download URL | lamonpy-0.2.0-cp38-cp38-win32.whl |
|---|---|
| Size | 44.2 MB |
| Tags | CPython 3.8 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
57bf4600b7626b315a0c78f0b77d8bb723ae8eccd0472a709fce0436f7fe9819
|
|
BLAKE2b-256 checksum How to use checksums |
db6e06ca474925ab895646f371151c160aff2c94da39d397794742a07be3dca4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
|
Release files / lamonpy-0.2.0-cp38-cp38-manylinux2010_x86_64.whl
| Download URL | lamonpy-0.2.0-cp38-cp38-manylinux2010_x86_64.whl |
|---|---|
| Size | 44.1 MB |
| Tags | CPython 3.8 Linux glibc 2.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
aa1f130d49008add80faa7533c6504e7b9cdbf0b5198d9f9bba1c42d7914fc9c
|
|
BLAKE2b-256 checksum How to use checksums |
72092edd23e91209d2e08b12676ca7dc55e38e9dbcb821737b3ff2990828729b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
|
Release files / lamonpy-0.2.0-cp38-cp38-macosx_10_14_x86_64.whl
| Download URL | lamonpy-0.2.0-cp38-cp38-macosx_10_14_x86_64.whl |
|---|---|
| Size | 43.9 MB |
| Tags | CPython 3.8 macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
c94b5dce1135a7ee7a8bfe4c304ecaadde2baa8640bb725add30cf0d3b065724
|
|
BLAKE2b-256 checksum How to use checksums |
c64de090116c5b876bc2cfd52e852c9f33af42b3331ca1cd8f3cf05171a1825d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
|
Release files / lamonpy-0.2.0-cp37-cp37m-win_amd64.whl
| Download URL | lamonpy-0.2.0-cp37-cp37m-win_amd64.whl |
|---|---|
| Size | 44.6 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Windows x86-64 |
|
SHA-256 checksum How to use checksums |
6fb274bd5d98f83d41493e8be6a21f2acbb1f82b3b11d1805106b816ea75a06e
|
|
BLAKE2b-256 checksum How to use checksums |
9f87f4de3c2b51a9098b2501c268a2ff2a71886de4025344fa3022c5a60ec433
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.9
|
Release files / lamonpy-0.2.0-cp37-cp37m-win32.whl
| Download URL | lamonpy-0.2.0-cp37-cp37m-win32.whl |
|---|---|
| Size | 44.2 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Windows x86-32 |
|
SHA-256 checksum How to use checksums |
a64dad13a6627de1d9c56309f2979f4a8fe859248cb0988f2f9d2d6f497dc636
|
|
BLAKE2b-256 checksum How to use checksums |
abb7c62d645983aa6401d0fddb3965c2cc77bcea46a4ec54267247bd749fbe5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.9
|
Release files / lamonpy-0.2.0-cp37-cp37m-manylinux2010_x86_64.whl
| Download URL | lamonpy-0.2.0-cp37-cp37m-manylinux2010_x86_64.whl |
|---|---|
| Size | 44.1 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
ec98e0a4ef5a72e4645e90467133a320f22b33b4e5fb586ca46d3b4e73bb8eda
|
|
BLAKE2b-256 checksum How to use checksums |
fb56bd6bde972a0d03760aeaa396a57d003bd6963ab328338540a5805e687caf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
|
Release files / lamonpy-0.2.0-cp37-cp37m-macosx_10_14_x86_64.whl
| Download URL | lamonpy-0.2.0-cp37-cp37m-macosx_10_14_x86_64.whl |
|---|---|
| Size | 43.9 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
4e51917d69bd7c8aad204a3ddee94917cf3ae6464789f0da6a3ce8b7b7ac1681
|
|
BLAKE2b-256 checksum How to use checksums |
32b15f8e64f921ed7ae5ce0e48dfb5f52aa3712c00fb1b84c2f6ad8dbaca4ebd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.9
|
Release files / lamonpy-0.2.0-cp36-cp36m-win_amd64.whl
| Download URL | lamonpy-0.2.0-cp36-cp36m-win_amd64.whl |
|---|---|
| Size | 44.6 MB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Windows x86-64 |
|
SHA-256 checksum How to use checksums |
ac9d22b61c46f833423593324e895d9b534c9308b717fcd7ae7c080273fadd98
|
|
BLAKE2b-256 checksum How to use checksums |
e3d2ee09becb5b1a9603eefb949e521e3659631a168276cb8cecd888061ff7fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.8
|
Release files / lamonpy-0.2.0-cp36-cp36m-win32.whl
| Download URL | lamonpy-0.2.0-cp36-cp36m-win32.whl |
|---|---|
| Size | 44.2 MB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Windows x86-32 |
|
SHA-256 checksum How to use checksums |
85f026be66b6d0afd0e13a84d079e811d750aa1cf2a5af031987f43e5a72e4e9
|
|
BLAKE2b-256 checksum How to use checksums |
d80065bef4c5b264288ee06b25098593e62dcfc258357e8e9a1b4dba6df55c6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.8
|
Release files / lamonpy-0.2.0-cp36-cp36m-manylinux2010_x86_64.whl
| Download URL | lamonpy-0.2.0-cp36-cp36m-manylinux2010_x86_64.whl |
|---|---|
| Size | 44.1 MB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
b25538e96e31dd7be9ef6bb49a862a29e58679e0aa7653e88e9b9ae3ae2afa6c
|
|
BLAKE2b-256 checksum How to use checksums |
79892b428dd3682b4d9f044b85bca5e524b200ec0885b889c4a53e2bc322900b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
|
Release files / lamonpy-0.2.0-cp36-cp36m-macosx_10_14_x86_64.whl
| Download URL | lamonpy-0.2.0-cp36-cp36m-macosx_10_14_x86_64.whl |
|---|---|
| Size | 43.9 MB |
| Tags | CPython 3.6 CPython 3.6 pymalloc macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
62bbd2d55f227e7a9a62fa35246c5900f5926c3db75ea23f560eee2047294004
|
|
BLAKE2b-256 checksum How to use checksums |
83547056319348d57da41ca648a262a27c8e6a58a420fedf8dd13a5999bcabdf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.12
|
Release files / lamonpy-0.2.0-cp35-cp35m-win_amd64.whl
| Download URL | lamonpy-0.2.0-cp35-cp35m-win_amd64.whl |
|---|---|
| Size | 44.6 MB |
| Tags | CPython 3.5 CPython 3.5 pymalloc Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b93e962428ac09a5b1fc3e5569346d6bfd94e063828cfb8e54f8aae53baee006
|
|
BLAKE2b-256 checksum How to use checksums |
19f2b0cdf8b25e219a8a72204f19dcf5be46e2736bcb3be2c5e257469b95fa7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.5.4
|
Release files / lamonpy-0.2.0-cp35-cp35m-win32.whl
| Download URL | lamonpy-0.2.0-cp35-cp35m-win32.whl |
|---|---|
| Size | 44.2 MB |
| Tags | CPython 3.5 CPython 3.5 pymalloc Windows x86-32 |
|
SHA-256 checksum How to use checksums |
f212248ef5860965dfe0608d875ccc3b2f99876f81503955ce4de8fc038b383b
|
|
BLAKE2b-256 checksum How to use checksums |
5d0a007310cc83aae436ef9e63501bc9803c4837a072cf1974a0d260a09df948
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.5.4
|
Release files / lamonpy-0.2.0-cp35-cp35m-manylinux2010_x86_64.whl
| Download URL | lamonpy-0.2.0-cp35-cp35m-manylinux2010_x86_64.whl |
|---|---|
| Size | 44.1 MB |
| Tags | CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
51d5e9192fc8042a5fd4dbcbe94b5052dd7ad0be243c2ee6440cc2dbd0161834
|
|
BLAKE2b-256 checksum How to use checksums |
dfa4fb049a37be0b4c9c622aa725b7271ce48c2220e06ee6c1170ed1ac2c4e91
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
|
Release files / lamonpy-0.2.0-cp35-cp35m-macosx_10_14_x86_64.whl
| Download URL | lamonpy-0.2.0-cp35-cp35m-macosx_10_14_x86_64.whl |
|---|---|
| Size | 43.9 MB |
| Tags | CPython 3.5 CPython 3.5 pymalloc macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
415cf956804c2a220c62f91a6e2b330925ad7985b1e0fc72f10d5c414c802d86
|
|
BLAKE2b-256 checksum How to use checksums |
190b150ef811ff50b834ccd8a78ea15f9c4dedaececb59ea0d7725637a30ca8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/28.8.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.5.10
|