Skip to main content

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)

Source distribution for combo-nlp 4.0.13
File Size Uploaded
combo_nlp-4.0.13.tar.gz 94.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for combo-nlp 4.0.13
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

4.0.13 This release

2 release files

4.0.12

2 release files

4.0.11

2 release files

4.0.10

2 release files

4.0.9

2 release files

4.0.8

2 release files

4.0.7

2 release files

4.0.6

2 release files

4.0.5

2 release files

4.0.4

2 release files

4.0.3

2 release files

4.0.2

2 release files

4.0.1

2 release files

4.0.0

2 release files

3.1.1

1 release file

3.0.4

1 release file

3.0.3

1 release file

3.0.1

1 release file

3.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page