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
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fb5244d57270d8f9b19b2407a90aaa3c749a8d5ef8d51fd2324bcefb169c0cb |
|
MD5 | 13c672a487203df414b0912113633421 |
|
BLAKE2b-256 | 329b1de707599fbb33b062618cf706a8d8b6e1e69f06e123eaf56d38b78b70a9 |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dea21f244f00d912871526c1a7a93550d86f14e1187be5be243a29427bc1fff |
|
MD5 | 45c49193a8be041caae8be75eab992a8 |
|
BLAKE2b-256 | d2a956544ae232c99fa9a18d423efc0a8b0e88dc5c80621ee20c6a001610472e |