This release is a pre-release and may not be stable for production use.
quebra_frases
quebra_frases splits text into words, sentences, paragraphs and chunks. Each splitter also has a form that returns the character offsets of each piece. The sentence splitter knows abbreviations, initials, unit symbols and ordinals, and it splits scripts that write no space between sentences.
Quickstart
pip install --pre quebra_frases
>>> from quebra_frases import word_tokenize, sentence_tokenize, chunk
>>> word_tokenize("O Pedro pagou 2,50 € às 14:30.")
['O', 'Pedro', 'pagou', '2,50', '€', 'às', '14:30', '.']
>>> sentence_tokenize("Mr. Smith paid 1.5 million. Did he mind?")
['Mr. Smith paid 1.5 million.', 'Did he mind?']
>>> chunk("turn on the light and the fan", ["light", "fan"])
['turn on the', 'light', 'and the', 'fan']
The package needs Python 3.11 or later, and its only dependency is regex. The --pre flag installs the latest alpha release.
Documentation
Start with Getting started. The documentation index lists every page in reading order, and the API reference lists every public function.
The performance page shows the time of each splitter by text length, and the inputs page shows what happens with empty text and with a value that is not a string.
The examples/ folder holds five scripts that you can run: word tokens, sentences and paragraphs, whitespace spans, chunking, and sample comparison.
License
Apache-2.0. See LICENSE.
Metadata
Release files for quebra-frases 0.3.8a9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| quebra_frases-0.3.8a9.tar.gz | 28.5 kB | Without provenance | Details for quebra_frases-0.3.8a9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| quebra_frases-0.3.8a9-py3-none-any.whl | Python 3 | none | any | Details for quebra_frases-0.3.8a9-py3-none-any.whl |
Total release size: 43.3 kB
Release files / quebra_frases-0.3.8a9.tar.gz
| Download URL | quebra_frases-0.3.8a9.tar.gz |
|---|---|
| Size | 28.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1729140155e0073dfeacab82e000734a70bee247c4a15dd038ae114920b80e11
|
|
BLAKE2b-256 checksum How to use checksums |
e8431e5afd9524d76eb81c1bc4d2532d9483000c02c44bf73c7d7a444adb5b8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / quebra_frases-0.3.8a9-py3-none-any.whl
| Download URL | quebra_frases-0.3.8a9-py3-none-any.whl |
|---|---|
| Size | 14.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
88c135c5d2446fc2ecd9a3b9f834e29a559fb523ae6906584f5f6acc6264f2dc
|
|
BLAKE2b-256 checksum How to use checksums |
a3c6c025c1e9281c62f65fe7587839223d5a52d4d18f3bbf8d644898642b61d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for quebra-frases 0.3.8a9
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.