Skip to main content

Hakilo - For splitting a text into sentences, and sentences into words.

Hakilo (meaning 'axe' in Esperanto) chops a text into sentences for analysis.

Sentences usually end with a period, a question mark, or an exclamation mark, but not every period indicates the end of a sentence. For example:

    Mrs. C. Bisset is 1.6 meters tall.

The above sentence has four periods, but only the last ends the sentence.

If there is an end quote mark or an end bracket after a period, the sentence will include the end mark. For example:

    The tactical officer said, "Shields are down to 30 percent."

The last character of the above sentence is a quote mark.

When the program encounters a blank line, or any vertical space, it treats this as the end of a sentence.

Lines with a length of 0, and lines without any alphabetic characters, are excluded from output. Thus the line:

    - 2.7

will not be included in the output.

Requirements

Hakilo was developed and tested on Python 3.7 .

Github: https://github.com/Indrikoterio/hakilo-python

PyPi: https://pypi.org/project/hakilo/1.1.1/

Installation

Try this:

$ python3 -m pip install hakilo

Usage

Importing

import hakilo

read_file

This utility function reads in the entire file as a UTF-8 string.

the_text = hakilo.read_file("frankenstein.txt")

split_text

This function splits the text and returns a list of sentences.

sentences = hakilo.split_text(the_text)

split_sentence

This function splits the sentence into words and punctuation.

words = hakilo.split_sentence("You can do better.")

Developer

Hakilo was developed by Cleve (Klivo) Lendon.

Contact

To contact the developer, send email to indriko@yahoo.com . Preferred languages are English and Esperanto. Comments, suggestions and criticism are welcomed.

History

First release, October 2020.

Version 1.1.0 - Added split_sentence() - October 2020.

Version 1.1.1 - Fix bug in split_sentence() - October 2020.

License

Hakilo is free software. It is distributed free of charge, without conditions, and without guarantees. You may use, modify and distribute it as you wish. There is no need to ask for permission. If you use Hakilo's code in your own project, and publish it, I request only that you acknowledge the source.

Metadata

Release files for hakilo 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for hakilo 1.1.1
File Interpreter ABI Platform Actions
hakilo-1.1.1-py3-none-any.whl Python 3 none any Details for hakilo-1.1.1-py3-none-any.whl

Release files / hakilo-1.1.1-py3-none-any.whl

Download URL hakilo-1.1.1-py3-none-any.whl
Size 9.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4333bb0f49d68d03c129b40eb41ebcb3f44155a598cdc05e360208d5df96a295
BLAKE2b-256 checksum
How to use checksums
7034808c7ad90e9cfb87b9ba84eb5aa7695a81a9b02c5b72cb9ab01b94811cb4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5

Security for hakilo 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page