WillFuqua

Splitting Thai words with Browser APIs

One of the difficulties for students learning the Thai language is the lack of spaces between words. For example, here is a simple sentence in Thai:

สวัสดีครับกินข้าวหรือยัง

After some time, students start to recognize the shapes of the words and it becomes effortless to read. Before that time, however, it's quite a struggle!

I found a neat trick yesterday for splitting Thai sentences into words with JavaScript in Chrome. There's no native API for understanding Thai text, but it's possible to piggyback on top of the browser's text selection APIs.

When a word is double-clicked in the browser, the browser will select that word---and continue.

tagged as , and

A Software Developer Learning Thai

I recently uprooted from the USA and moved to Thailand! It's been an incredible experience so far. One of the more fascinating aspects of it has been learning the Thai language. I've created a couple of basic tools to help myself learn. Developing the tools helps me learn new technologies, and the resulting product helps me learn the language!

tagged as and