Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

corrects English spelling mistakes and normalize. (e.g., "cooooooooooooooollllllllllllll" to "cool")

Project Description

pytypo

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.2 (2016-04-15)

Add many cases

0.1 (2016-04-14)

First release.

Release History

Release History

This version
History Node

0.2.0

History Node

0.2

History Node

0.1.1

History Node

0.1

History Node

0.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pytypo-0.2.0.tar.gz (61.2 kB) Copy SHA256 Checksum SHA256 Source Apr 15, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting