Satzmetzer
Split German text to sentence! Uses TRIE-Regex to filter ordinal numbers (23.04., 2.5. ...), roman numbers, (II., XI. ...) 15,000 abbreviations (z.B., Abk. ...) , about 7,500 second-level domains (.com.br, ac.at ...), 1500 file name extensions (hallo.docx, tabelle.xlsx ...)
Before writing this class, I had tested about 20 classes, modules, functions, and methods to split German text to sentences. I wasn't happy with any of the results, so I wrote this class here! It doesn't use any AI, just old school Regex!
It is very simple to use! Here is everything you need to know:
textzumsplitten ='''Hallo, ich bin ein Text. Zerhack mich bitte! Ich halte es nicht mehr aus. Wenn du mich bis zum 23.04. nicht zerhackst, rufe ich Papst Hackerpeter X. an und schicke ihm das Dokument erhatmichnichtzerhackt.docx, er wird z. B. sehr böse auf dich sein! Darauf kannst du einen lassen!'''
from satzmetzger import Satzmetzger
losgehts = Satzmetzger()
textfertig = losgehts.zerhack_den_text(textzumsplitten, debug=False)
for indi, zerhacktersatz in enumerate(textfertig):
print(indi, end='\t\t')
print(zerhacktersatz)
#Output:
#0 Hallo, ich bin ein Text.
#1 Zerhack mich bitte!
#2 Ich halte es nicht mehr aus.
#3 Wenn du mich bis zum 23.04. nicht zerhackst, rufe ich Papst Hackerpeter X. an und schicke ihm das Dokument erhatmichnichtzerhackt.docx, er wird z. B. sehr böse auf dich sein!
#4 Darauf kannst du einen lassen!
Metadata
Release files for satzmetzger 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| satzmetzger-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for satzmetzger-0.0.1-py3-none-any.whl |
Release files / satzmetzger-0.0.1-py3-none-any.whl
| Download URL | satzmetzger-0.0.1-py3-none-any.whl |
|---|---|
| Size | 85.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d3d88cb7239bdb968e7f9cfb8e7aee99326cb2f3227294096db7d28d14ac5222
|
|
BLAKE2b-256 checksum How to use checksums |
e824efcecd840ad19b857a3bcf546447a89ec6dfd396c10b472a6e90a85e546b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
|
Security for satzmetzger 0.0.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.