Skip to main content

Python wrapper for Loomchild segmenter

Project description

loomchild-segment

A python module for interfacing with Java sentence splitter Loomchild. This package is aimed to be used in Bifixer and/or Bitextor

System dependencies to build and use this package are Maven and Java.

Installation

This package can be installed with pip from pypi:

pip install loomchild-segment

Usage

Splitting a text into sentences:

from loomchild.segment import LoomchildSegmenter

segmenter = LoomchildSegmenter(lang)
# segmenting a single line:
segments = segmenter.get_segmentation(input_line)
print("\n".join(segments))

# segmenting a document (i.e. multiple line breaks in the input)
segments = segmenter.get_document_segmentation(input_text)
print("\n".join(segments))

A command line tool is provided to work with base64 encoded documents.

cat b64encoded_input | py-segment -l $LANG > b64encoded_output

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

loomchild-segment-2.0.2.tar.gz (1.8 MB view details)

Uploaded Source

Built Distribution

loomchild_segment-2.0.2-py3-none-any.whl (1.8 MB view details)

Uploaded Python 3

File details

Details for the file loomchild-segment-2.0.2.tar.gz.

File metadata

  • Download URL: loomchild-segment-2.0.2.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.7.10

File hashes

Hashes for loomchild-segment-2.0.2.tar.gz
Algorithm Hash digest
SHA256 673cec9b3dc0f4edea3721ca1c7e2929349adaef04e2ab94140192908c50a044
MD5 d0e759cb790cd84ccfd2399a36be7575
BLAKE2b-256 d09ac81f3c8841b98953973dd58a153089333a4375d79f950deb61f5e6651035

See more details on using hashes here.

File details

Details for the file loomchild_segment-2.0.2-py3-none-any.whl.

File metadata

  • Download URL: loomchild_segment-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 1.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.7.10

File hashes

Hashes for loomchild_segment-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dcd0cf2cba5d4e0d4e482ec24854bef4d839e690c77129d952f211da462a67b6
MD5 cb90dc7d5b4cb3511e370b83b30fc951
BLAKE2b-256 511a89993e198358e8f588f4b0aa554228ec5c58871c1086d984cda4b0351329

See more details on using hashes here.

Supported by

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