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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: loomchild-segment-2.0.4.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.tar.gz
Algorithm Hash digest
SHA256 7fb5244d57270d8f9b19b2407a90aaa3c749a8d5ef8d51fd2324bcefb169c0cb
MD5 13c672a487203df414b0912113633421
BLAKE2b-256 329b1de707599fbb33b062618cf706a8d8b6e1e69f06e123eaf56d38b78b70a9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: loomchild_segment-2.0.4-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-py3-none-any.whl
Algorithm Hash digest
SHA256 3dea21f244f00d912871526c1a7a93550d86f14e1187be5be243a29427bc1fff
MD5 45c49193a8be041caae8be75eab992a8
BLAKE2b-256 d2a956544ae232c99fa9a18d423efc0a8b0e88dc5c80621ee20c6a001610472e

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