Punctuation restoration library
Project description
Punctuation restoration
Adds punctuation and capitalization for a given text.
Works on Danish, German and English.
Models hosted on huggingface! <3
Installation
pip install punctfix
Usage
Its quite simple to use!
>>> from punctfix import PunctFixer
>>> model = PunctFixer(language="da")
>>> example_text = "mit navn det er rasmus og jeg kommer fra firmaet alvenir det er mig som har trænet denne lækre model"
>>> print(model.punctuate(example_text))
'Mit navn det er Rasmus og jeg kommer fra firmaet Alvenir. Det er mig som har trænet denne lækre model.'
>>> example_text = "en dag bliver vi sku glade for, at vi nu kan sætte punktummer og kommaer i en sætning det fungerer da meget godt ikke"
>>> print(fixer.punctuate(example_text))
'En dag bliver vi sku glade for, at vi nu kan sætte punktummer og kommaer i en sætning. Det fungerer da meget godt, ikke?'
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
punctfix-0.0.1.tar.gz
(7.0 kB
view details)
File details
Details for the file punctfix-0.0.1.tar.gz
.
File metadata
- Download URL: punctfix-0.0.1.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/29.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/1.4.0 colorama/0.4.4 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2796bdcbf3b6fd82da4f6c45a04585feaa4100aa6be74bc9f4117569db678e5 |
|
MD5 | 5ea286fe522a5b3b395bca1bff2f5b57 |
|
BLAKE2b-256 | dc4c4337380d88aad0d8e36200902d22eb64893dc0819bfc14e953b241a472c4 |