Sentence splitting & tokenization
Project description
Obeliks - sentence splitting & tokenization
Instalation
Install from PyPI:
pip install obeliks
Usage
Command line:
obeliks -h
Command line parameters:
-if <name*> read input from one or more files
-sif read input from list of files, specified via stdin
-o <name> write output to file <name>
-tei produce XML-TEI output
-c produce CoNLL-U output
-d pass "newdoc id" to output (implies -c)
Usage examples:
obeliks "To je stavek." "Tudi to je stavek."
echo -e "To je stavek.\nTudi to je stavek." | obeliks
obeliks "To je stavek." "Tudi to je stavek." -o output.txt
echo -e "To je stavek.\nTudi to je stavek." | obeliks > output.txt
obeliks -if text*.txt
cat text*.txt | obeliks
As a Python module:
import obeliks
text = 'Pozdravljen, svet!'
# Store results to string
output = obeliks.run(text, conllu=True)
# Write result to file
obeliks.run(text, out_file='tei.txt', tei=True)
# Write to stdout
obeliks.run(text, to_stdout=True, conllu=True)
# Return object
object = obeliks.run(text, object_output=True)
# Read input from file(s)
output = obeliks.run(in_file='in.txt', conllu=True)
output = obeliks.run(in_files=['in1.txt', 'in2.txt'], tei=True)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
obeliks-1.1.3.tar.gz
(15.2 kB
view details)
Built Distribution
obeliks-1.1.3-py3-none-any.whl
(18.3 kB
view details)
File details
Details for the file obeliks-1.1.3.tar.gz
.
File metadata
- Download URL: obeliks-1.1.3.tar.gz
- Upload date:
- Size: 15.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 079362c3b67ed14ed209a517ea46877f23f45f33bb0df6b527e8cdcbc143da6f |
|
MD5 | 1e8ef59a604a37bff3d49b4cc1b9fa87 |
|
BLAKE2b-256 | fafb5793ee7753c3c992edcd833427d216c8f98fabfd6d9a8ccf9c144764001a |
File details
Details for the file obeliks-1.1.3-py3-none-any.whl
.
File metadata
- Download URL: obeliks-1.1.3-py3-none-any.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90ee5d8f9e30fe144b6c691005b913a1ddb2e4e1b8b32130aa80c57ae59f1fdb |
|
MD5 | c75b2aa737cd08af12dd3de3ece61042 |
|
BLAKE2b-256 | eb2361cf00f49fa2426d0dfc5af2a22171d7c88c67b537ecda50812c52869eed |