Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working for Thai #67

Open
stephankn opened this issue May 4, 2018 · 6 comments
Open

Not working for Thai #67

stephankn opened this issue May 4, 2018 · 6 comments

Comments

@stephankn
Copy link

Completely broken for Thai.

Try เชียงใหม่

Should​ be Chiang Mai. Official scheme for Thai is RTGS.

Your transliteration looks as broken as ICU.

@dzcpy
Copy link
Owner

dzcpy commented Jul 14, 2018

You are right, Thai seems not supported. I'll add this in caveats section. Meanwhile, do you know any open source script which can transliterate Thai into Latin?

@stephankn
Copy link
Author

Sorry, don't know anything better. I search from time for something RTGS capable. This is how I came across yours, just to discover it being broken as well.
If someone finds open source capable of transliteration with RTGS I would be happy to learn about it, too.

@dzcpy
Copy link
Owner

dzcpy commented Jul 15, 2018

@stephankn I found one, it's not accurate but kind of working: https://github.com/comdevx/thai2karaoke
Here is the test code:

const { thai2karaoke: thai } = require('thai2karaoke')();
const res = {
  status() {
    return this;
  },
  json(res) {
    console.log(res.data);
  }
}
let result = thai({ body: { text: 'เชียงใหม่' } },  res);
console.log(result);

Below are some links about the rules to transliterate Thai using RTGS:
http://www.arts.chula.ac.th/~ling/tts/principles_eng.pdf
https://en.wikipedia.org/wiki/Royal_Thai_General_System_of_Transcription

I'm not quite familiar with Thai, if any one can help coding the conversion rules, I can merge it into this module.
Here is a place where you can test whether the result is correct:
http://www.thai-language.com/?nav=dictionary&anyxlit=1

@arturtr
Copy link

arturtr commented Dec 5, 2018

Another service for testing transliteration
https://www.thai2english.com/transliteration

@stephankn
Copy link
Author

Meanwhile I found this one to work quite well for Thai: https://pypi.org/project/tltk/

@alexsyeo
Copy link

Saw this thread is quite old, but just hit this issue as I'm currently relying on this library for other languages and just onboarded Thai. I'm wondering if there has been any progress made here, and also if anyone knows of any alternative libraries that support Node.js. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants