COMBO-NLP
A library for Morphosyntactic Tagging and Dependency Parsing based on Universal Dependencies.
Installation
pip install combo-nlp
LAMBO segmenter (optional)
A segmenter is only needed when passing raw text strings to COMBO. If you provide pre-tokenized input (list[str] or list[list[str]]), no segmenter is required.
When you initialize COMBO with a language name (e.g. COMBO("Polish")), it automatically loads a LAMBO segmenter. If LAMBO is not installed, an ImportError is raised. LAMBO is hosted on a custom PyPI index and must be installed separately:
pip install --index-url https://pypi.clarin-pl.eu/ lambo
Usage
Full text input
from combo import COMBO
# Load by HuggingFace model ID:
nlp = COMBO.from_pretrained("clarin-pl/combo-nlp-xlm-roberta-base-polish-pdb-ud2.17")
result = nlp("Ala ma kota.")
# Or load by language name (with Lambo segmenter):
nlp = COMBO("Polish")
result = nlp("Ala ma kota.")
# Or use the Language enum:
from combo import Language
nlp = COMBO(Language.POLISH)
result = nlp("Ala ma kota.")
# Multiple sentences:
result = nlp(["Ala ma kota.", "Kot śpi na kanapie."])
# Access results:
for sentence in result:
for token in sentence:
print(token.form, token.upos, token.head, token.deprel, token.lemma)
Pre-tokenized input
from combo import COMBO
nlp = COMBO.from_pretrained("clarin-pl/combo-nlp-xlm-roberta-base-polish-pdb-ud2.17")
# Single sentence:
result = nlp(["Ala", "ma", "kota", "."], tokenized=True)
# Multiple sentences:
result = nlp([["Ala", "ma", "kota", "."], ["Kot", "śpi", "na", "kanapie", "."]], tokenized=True)
Metadata
Release files for combo-nlp 4.0.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| combo_nlp-4.0.13.tar.gz | 94.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| combo_nlp-4.0.13-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 198.7 kB
Release files / combo_nlp-4.0.13.tar.gz
| Download URL | combo_nlp-4.0.13.tar.gz |
|---|---|
| Size | 94.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a9b78ea78e608f5008a9c522bfe01d60b7a7948b9af030ba78d2e19ffa3cf398
|
|
BLAKE2b-256 checksum How to use checksums |
8e08696784683f814ae8b499388554790acc9ca5d07905c8f0d2c1465d150843
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.6
|
Release files / combo_nlp-4.0.13-py3-none-any.whl
| Download URL | combo_nlp-4.0.13-py3-none-any.whl |
|---|---|
| Size | 104.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
78042a4afb9575ce3df5f72a1146ba95f5070c68a2e5219ae3d5feb449d5850b
|
|
BLAKE2b-256 checksum How to use checksums |
eb8ba69000e11f67d74416335ca58b174d2f0b0a15c01504e5f58ad171800030
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.6
|