pid / speakingurl

Generate a slug – transliteration with a lot of options
http://pid.github.io/speakingurl/
BSD 3-Clause "New" or "Revised" License
1.12k stars 84 forks source link

burmese language support #44

Closed putstrln closed 9 years ago

putstrln commented 9 years ago

Let me know if something's missing. Thanks!

putstrln commented 9 years ago

Can I know how speakingurl handles cases where the transliteration changes as more diatrics are added? I am assuming I don't have to write every possible combos for each alphabet. The dotted circle represents the space for an alphabet. Given:

 'က': 'k',      // alphabet
 'ေ': 'e',     // diatric
 'ာ': 'aa',   // diatric
 'ော': 'aw'  // two diatric

Correct Results:

 'က' + 'ေ' = 'ကေ' => 'ke',
 'က' + 'ာ' = 'ကာ' => 'kaa'

Wrong results

 'က' + 'ေ' + 'ာ' = 'ကော' => 'keaa'
 'ကေ' + 'ာ' = 'ကော'  => 'keaa'

These need to match the last case 'ော': 'aw' and become 'kaw'.

 'က' + 'ေ' + 'ာ' = 'ကော' => 'kaw''
pid commented 9 years ago

I think, speakingurl isn't really build with this specific language in mind. You already insert a translation-table to your pull request, that's the way it will be handled. Furthermore I couldn't verify the specific cases – I'm not experienced. If you can add this correct behavour for the burmese language, pull requests are welcome :-) But please add tests to your pull request, so that future development will not destroy the burmese transliteration support.

putstrln commented 9 years ago

@pid, I tried to add some logic for lookahead characters that doesn't impact linear languages. It's now working with examples and unit tests.

pid commented 9 years ago

awesome :+1: released v0.19.0

thanks for contribution :-)

putstrln commented 9 years ago

Thanks for the project too :)