cevado

cevado

Unidecode implementation for Elixir

I just published unidecode package to hex:


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 Libraries Top

mindok
What is ContEx? A pure Elixir server-side data plotting/charting library outputting SVG. It has nice barcharts in particular and works g...
New
mcrumm
If you would like to migrate away from node/npm/webpack while still using sass, the dart_sass package provides a installer and runner for...
New
tmbb
I’ve been working on two packages (not on hex.pm yet) to build admin interfaces for phoenix apps: bureaucrat - which contains a bunch ...
New
achempion
Hi, I would like to tell about my initiative to further maintain and develop Waffle project which is the fork of Arc library. The progre...
New
michalmuskala
Hello everybody. I have just released Jason - a new JSON library. You might be wondering, why do we need a new library? The primary foc...
New
benlime
I created a new library GitHub - benvp/ex_cva: Class Variance Authority for Elixir which aims to make it very easy to define different va...
New
mbuhot
EctoJob A transactional job queue built with Ecto, PostgreSQL and GenStage Available on Hex.pm: ecto_job | Hex Docs: API Reference — ec...
New
zorbash
I created Kitto a framework for dashboards inspired by Dashing. [demo] The distributed characteristics of Elixir and the low memory foo...
New
Crowdhailer
Experimenting with this code. OK.try do user <- fetch_user(1) cart <- fetch_cart(1) order = checkout(cart, user) save_or...
New
KallDrexx
For a good number of months I've been working on creating a very basic RTMP live video streaming server. Now that I have a very, very ba...
New

Other popular topics Top

romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New
AstonJ
by Lance Halvorsen Elixir and Phoenix are generating tremendous excitement as an unbeatable platform for building modern web application...
460 27162 124
New

Sub Categories:

We're in Beta

About us Mission Statement