Skip to main content

Ortix Latvian sentence segmentation runtime.

Project description

ortix-seg

Runtime package for Ortix Latvian sentence segmentation models.

pip install ortix-seg
from ortix.seg import SentenceSegmenter

segmenter = SentenceSegmenter.from_pretrained("Baltrix-AI/ortix-seg-lv-base")
spans = segmenter.segment("Pirmais teikums. Otrais teikums.")
# spans == [
#     SentenceSpan(start=0, end=16, text="Pirmais teikums."),
#     SentenceSpan(start=16, end=32, text=" Otrais teikums."),
# ]

for span in spans:
    print(span.text)

Ortix sentence-segmentation model repositories include sentence_segmentation_config.json, which stores the calibrated threshold, sliding-window settings, and post-processing defaults used at inference time.

The threshold can be adjusted when a project needs a different precision/recall tradeoff:

segmenter = SentenceSegmenter.from_pretrained(
    "Baltrix-AI/ortix-seg-lv-base",
    threshold=0.65,
)

Advanced post-processing switches can be overridden from Python:

segmenter = SentenceSegmenter.from_pretrained(
    "Baltrix-AI/ortix-seg-lv-base",
    postprocessing_overrides={
        "suppress_latvian_abbreviation_continuations": False,
    },
)

The command line exposes the threshold override:

ortix-seg --model Baltrix-AI/ortix-seg-lv-base --threshold 0.65 input.txt

Project details


Download files

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

Source Distribution

ortix_seg-0.1.0.tar.gz (18.3 kB view details)

Uploaded Source

Built Distribution

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

ortix_seg-0.1.0-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

Details for the file ortix_seg-0.1.0.tar.gz.

File metadata

  • Download URL: ortix_seg-0.1.0.tar.gz
  • Upload date:
  • Size: 18.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ortix_seg-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8620ba335cfc4e3a1dd00817aa40bf7727d5ef75adff731cf543a658b1b846f6
MD5 a7020186b197c83af8aed1b9656cdb92
BLAKE2b-256 36498465cc2d730856b169913cc50af1e2a429f565ba901984ea83b2bc025dbf

See more details on using hashes here.

Provenance

The following attestation bundles were made for ortix_seg-0.1.0.tar.gz:

Publisher: publish.yml on Baltrix-AI/ortix-runtime

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ortix_seg-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ortix_seg-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ortix_seg-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 789af30973aa1de25861272b9d5b9331ea18c9ae760be2014e6290296d8823a6
MD5 46cc756a29db9997c10b442ccf5e3d7a
BLAKE2b-256 53af51bb4ab165dea7b1be96406e8656d74b90d6485f4064ab0d447406f16946

See more details on using hashes here.

Provenance

The following attestation bundles were made for ortix_seg-0.1.0-py3-none-any.whl:

Publisher: publish.yml on Baltrix-AI/ortix-runtime

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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