Skip to main content

pytypo

travis-ci.org coveralls.io downloads pyversion latest version license

pytypo corrects English spelling mistakes. That feature is based on TYPO CORPUS (http://luululu.com/tweet/)

And this module normalizes also lengthened English expression having repeating letters. (e.g., this module converts “cooooooooooooooollllllllllllll” to “cool”)

That feature is based on the following paper: Samuel Brody and Nicholas Diakopoulos. Cooooooooooooooollllllllllllll!!!!!!!!!!!!!! using word lengthening to detect sentiment in microblogs. In EMNLP2011, pp. 562-570, 2011. http://aclweb.org/anthology//D/D11/D11-1052.pdf

Contributions are welcome!

Installation

$ pip install pytypo

Usage

Import pytypo

>>> import pytypo

correct sentence

>>> pytypo.correct_sentence('you are coooolll!!!')
you are cool!
  • correct_sentence(str)

correct word

>>> pytypo.correct('okayyyyy')
okay
  • correct(str)

Shorten repeated substring until threshould without dictionary

>>> pytypo.cut_repeat('mamisaaaaaan', 1)
mamisan
>>> pytypo.cut_repeat('okayyyyy', 2)
okayy
  • cut_repeat(str, threshould)

    • Note that this method don’t use a lengthened expression normalize table (e.g., cooll -> cool). If you want to normalize such expression, use correct() or correct_sentence() method.

License

  • This module is licensed under MIT License.

CHANGES

0.1 (2016-04-14)

First release.

Metadata

Release files for pytypo 0.1.1

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

Source distribution (sdist)

Source distribution for pytypo 0.1.1
File Size Uploaded
pytypo-0.1.1.tar.gz 55.2 kB Details

Release files / pytypo-0.1.1.tar.gz

Download URL pytypo-0.1.1.tar.gz
Size 55.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5107f3851b25059017f4d89e6d70052d82bc51fd7d668272f81a2a09416fd447
BLAKE2b-256 checksum
How to use checksums
efb7afbcc8382608e3231796aa60c8c329db6db1445599d422d7a264186ce595
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.3.0

1 release file

0.2

1 release file

0.2.0

1 release file

This release

0.1.1 This release

1 release file

0.1

0.1.0

1 release file

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