Skip to main content

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)

# 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


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.1.tar.gz (15.4 kB view details)

Uploaded Source

File details

Details for the file obeliks-1.1.1.tar.gz.

File metadata

  • Download URL: obeliks-1.1.1.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • 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.61.1 CPython/3.9.7

File hashes

Hashes for obeliks-1.1.1.tar.gz
Algorithm Hash digest
SHA256 c9e108263a101044a30f191aff2afcbdc933af2229bfd749ffb59945dbb28ebd
MD5 9863e4fbbd13b6a7ac0d5efa48991b70
BLAKE2b-256 9167e1e4bda55f78f3e203f3bbac48137fc9c16652544a63e3858c1c6a83be2f

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