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)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

combo_nlp-4.0.12.tar.gz (91.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

combo_nlp-4.0.12-py3-none-any.whl (101.9 kB view details)

Uploaded Python 3

File details

Details for the file combo_nlp-4.0.12.tar.gz.

File metadata

  • Download URL: combo_nlp-4.0.12.tar.gz
  • Upload date:
  • Size: 91.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.10

File hashes

Hashes for combo_nlp-4.0.12.tar.gz
Algorithm Hash digest
SHA256 894e9a96e7d5e9ee562ea77115f82a283350eaa1886c9e38c5dfdce6c3a37427
MD5 1e41fc335fa83cb1406b0cb93422548a
BLAKE2b-256 61f0ac1f9d571460bf8f06cc37069d716e53b6d37622758814d2d59bbaed1561

See more details on using hashes here.

File details

Details for the file combo_nlp-4.0.12-py3-none-any.whl.

File metadata

  • Download URL: combo_nlp-4.0.12-py3-none-any.whl
  • Upload date:
  • Size: 101.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.10

File hashes

Hashes for combo_nlp-4.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 6d5cfe37dddd947ccb352c32bb00a3da89599a27002676c221046941b248b7af
MD5 89647b70e4565d828b5d81643f692d44
BLAKE2b-256 7f9f69f8def929f3c880fb3951a8f588796e27dcdc47e288c3cadcda26e70112

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

4.0.12 This release

2 files

4.0.11

2 files

4.0.10

2 files

4.0.9

2 files

4.0.8

2 files

4.0.7

2 files

4.0.6

2 files

4.0.5

2 files

4.0.4

2 files

4.0.3

2 files

4.0.2

2 files

4.0.1

2 files

4.0.0.post1

2 files

4.0.0

2 files

3.1.1

1 file

3.0.4

1 file

3.0.3

1 file

3.0.1

1 file

3.0.0

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page