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
Built Distribution
File details
Details for the file loomchild-segment-2.0.4.2.tar.gz
.
File metadata
- Download URL: loomchild-segment-2.0.4.2.tar.gz
- Upload date:
- Size: 2.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1072e46d5b67213a0ba7b7dc34696314d519a8cca324351339bb8932f326ac5a |
|
MD5 | bd9d19440032aa54b009af15334c23ab |
|
BLAKE2b-256 | 2d37678ae76034b5e6ecbb0e4ba3c05529efe1f87430f6a71383654105a04b24 |
File details
Details for the file loomchild_segment-2.0.4.2-py3-none-any.whl
.
File metadata
- Download URL: loomchild_segment-2.0.4.2-py3-none-any.whl
- Upload date:
- Size: 2.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8fd559325cf829592a92c96b331adef51d209a1a7101688ab3edecb88557bb6 |
|
MD5 | 48ecc92f4a1b3036e5551795d31de160 |
|
BLAKE2b-256 | c083708a3616bfe5b1d70c89a1768f5f9e98fd942a91881289804b27cddd69a4 |