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.segmenter 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.4.1.tar.gz (2.4 MB view details)

Uploaded Source

Built Distribution

loomchild_segment-2.0.4.1-py3-none-any.whl (2.4 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: loomchild-segment-2.0.4.1.tar.gz
  • Upload date:
  • Size: 2.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for loomchild-segment-2.0.4.1.tar.gz
Algorithm Hash digest
SHA256 c44aeda42ddb7b4fbcd04d49732ae22ce51747b3924f62578ccd699a16f08eae
MD5 41905493dd1b51d9dc3f183b861d92e3
BLAKE2b-256 75fad1883e22a62fff103088fe3ae87be4806fcbb51211c61ed68abbc740af87

See more details on using hashes here.

File details

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

File metadata

  • Download URL: loomchild_segment-2.0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for loomchild_segment-2.0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fb243487f7ff87ebebb03a6ceb3721c29543e310e707a349a7ba7caff71b05c8
MD5 751fc4b67a57e503c3fdcde331b4d8fb
BLAKE2b-256 8bbbd5d2dba525811e784c5d86b2606f1967c98067279cb2107782fcd1a85c99

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