cevado

cevado

Unidecode implementation for Elixir

I just published unidecode package to hex:

https://github.com/fcevado/unidecode

Unidecode was initially a perl module to transliterate unicode characters to ascii, then it became a widespread library throughout several languages(python, java, ruby, c#, rust). Everyone that already integrated with old systems know that it’s necessary pain.

I published a implementation with a simple approach, that only includes latin code charts. My idea is to gradually add all charts. Right know I’m on documenting/testing step. Basically its a very small application(needs to be added to extra_applications) that expose a simple api, Unidecode.unidecode/1 and Unidecode.decode/1, both do the same thing, receives a string and transliterate the chars that it knows. Why 2 functions that do the same? Perl and Python implementations exposes only unidecode/1 that supposedly is imported everywhere you need it(since rarely you will have a conflit with a function called unidecode). I added decode/1 just in case you dont want to import the function and want to call it refering to the module.

I want to ask that anyone that needs something like that, please take a look at the library, send suggestions on changes to improve it, I published on 0.0.1 and very raw material like that, to see what fits better the community need. :smiley:

Most Liked

cevado

cevado

Hi @tallakt, actually it doesn’t. Convert encodings is a different task from transliteration. Let’s say I have the greek word Λάμ(β)δα, just converting encodings I would loose this data, transliteration looks for a way to represent this data meaningfully. So taking Λάμ(β)δα as an example a transliterated version should be Lam(b)da. In some sort of way it’s kinda a romanization, but avoiding special caracters in the latin script. So the character ç would be just c.

Where Next?

Popular in Announcing Top

zorbash
I created Kitto a framework for dashboards inspired by Dashing. The distributed characteristics of Elixir and the low memory footprint...
New
Qqwy
Hello everyone, I wrote a small library today called MapDiff. It returns a map listing the (smallest amount of) changes to get from map...
New
tmbb
I’ve published the first version of my Makeup library. It’s a syntax highlighter for Elixir in the spirit of Pygments, Currently it highl...
New
pkrawat1
Hey guyz We at @aviabird are working on a payment library in elixir/phoenix. We are targeting March 2018 to add 56 Gateways to it. Have...
New
Qqwy
TypeCheck: Fast and flexible runtime type-checking for your Elixir projects. Core ideas Type- and function specifications are const...
336 14713 100
New
kip
Image is an image processing library for Elixir. It is based upon the fabulous vix library that provides a libvips wrapper for Elixir. I...
622 19515 194
New
restlessronin
The repo is at GitHub - cyberchitta/openai_ex: Community maintained Elixir library for OpenAI API · GitHub. Docs are at OpenaiEx User Gu...
152 10739 134
New

Other popular topics Top

rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

We're in Beta

About us Mission Statement