Git Product home page Git Product logo

unidecode's Introduction

unidecode.el

Functions for transliterating Unicode text to ASCII:

  • (unidecode STRING)
  • (unidecode-region BEG END)
  • (unidecode-sanitize STRING)
  • (unidecode-sanitize-region BEG END)

This package was derived from the Unidecode module for Python, which was in turn derived from the Text::Unidecode package for Perl.

Example use

(require 'unidecode)

(unidecode "Déjà vu")
;=> "Deja vu"
(unidecode "北亰")
;=> "Bei Jing "
(unidecode-sanitize "Déjà vu, all over again")
;=> "deja-vu-all-over-again"

How this package was made

This package uses a number of data files (see the data directory), which were converted from the corresponding files in the Python Unidecode module.

The scripts used to perform this conversion are tools/unidecode-convert.el and tools/unidecode_convert.py.

To perform the conversion yourself, load unidecode-convert.el and run the unidecode-convert command (e.g. M-x unidecode-convert RET). When prompted, enter the path to Unidecode’s source directory as the first argument, and where you want the files to be saved as the second argument. It uses the Python script to convert the Unidecode files to JSON, then uses Emacs’s json package to load them, and finally prints them as read-able Lisp data as stored in the data directory.

License

This project is free software, available under the terms of the GPL, version 2 or later. See COPYING for details.

unidecode's People

Contributors

johnmastro avatar lassik avatar purcell avatar sindikat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.