Loading

ျမန္မာတို့ရဲ့ LGPL နွင့္ Opensource အျမင္မွားမ်ား

Myanmar NLP က Translatorနဲ့ ပတ္သက္လို့ေျပာျကဆိုျကတာ အခုတေလာေတြ့ရပါတယ္။
က်ေနာ္ကိုယ္တိုင္ကလဲ ဒါမ်ိုးပဲ ဝါသနာပါတဲ့ သူမို့လို့ ဒါမ်ိုးေတြပဲ ေလ့လာျဖစ္ပါတယ္။

Myanmar NLP က Translator ကို LGPL နဲ့ထုတ္ထားပါတယ္။
http://www.myanmarnlp.org.mm/
SharpNLP ဆိုတဲ့ English Natural Language Processing library တစ္ခုကို သံုးထားပါတယ္။
သူလည္း LGPL လိုင္စင္တစ္ခုပါပဲ။

LGPL program တစ္ခုကို library အေနနဲ့ compile လုပ္ျပီးသားဟာကို လင့္လုပ္ရံုပဲလုပ္ျပီး သံုးထားခဲ့ရင္ နဂို source ကို မျပင္ ရင္ opensource ျပန္ေပးစရာမလိုပါဘူး။ optional ျဖစ္ပါတယ္။ ျပင္မိရင္ေတာ့ မရဘူးေပါ့။

ဒီလိုဆိုထားတာေတြ့ပါတယ္။
>>> As you can see they don't even change to name for parser root
>> http://www.mysteryzillion.org/forums/showpost.php?p=34856&postcount=26
parser ကို ယူသံုးျပီး နာမည္ေတာင္ မျပင္ထားဘူးလို့ဆိုထားပါတယ္။ မျပင္ထားတာကမွ မွန္ပါတယ္။ ျပင္လိုက္ရင္ LGPL ကို ခ်ိုးေဖာက္ရာက်ပါမယ္။

ဒီ MTalk ဆိုတာလိုမ်ိုး သူမ်ားရဲ့ main program ကို တိုက္ရိုက္ယူျပီး product နာမည္ျပင္ ပံုေတြျပင္ထားျပီး opensource မေပးထားမွသာ တရားမဝင္တဲ့လုပ္ရပ္ျဖစ္ပါတယ္။ opensource ျပန္ေပးကို ေပးရပါမယ္။
http://myanmaritpros.com/forum/topic/show?id=1445004%3ATopic%3A123616&page=1&commentId=1445004%3AComment%3A123626&x=1#1445004Comment123626

အဆိုးဆံုးကေတာ့ opensource ကို ယူျပီး ျပန္ေရာင္းစားလို့ရတယ္ထင္တဲ့သူေတြရွိပါတယ္။ software မေျပာနဲ့၊ opensource ကုတ္သံုးမိထားတတဲ့ hardware ေတာင္ ေရာင္းစားရင္ တရားစြဲလို့ရပါတယ္။

>>> သူမ်ားေတြကေတာ့ codeproject က ဟာကို ယူျပီး ျပင္တယ္လို့ေျပာတာပဲ။
>> http://www.saturngod.net/?p=1143
ယူျပီး ျပင္တယ္ ဆိုတာထက္ သံုးထားတယ္ ဆိုတာက ပိုမွန္ပါမယ္။ ျပင္တယ္ဆိုရင္ ခိုးျပီး ျပင္ထားသလို အဓိပဿပါယ္ သက္ေရာက္မွုရွိနိုင္ပါတယ္။

>> http://www.mysteryzillion.org/forums/showpost.php?p=34856&postcount=26
>>> Totally this project is National level project, it shouldn't use another person project source code or dll files from internet.
အျခား dll ေတြ source code ေတြယူမသံုးသင့္ဘူးလို့ဆိုထားပါတယ္။ လိုင္စင္နဲ့ မဆိုင္ဘူးထင္ပါတယ္။ သံုးတာ သံုးသင့္ပါတယ္။ အဂဿငလိပ္စာကို အစအဆံုး analyse လုပ္တာ အခုမွ စျပီး ဘယ္သူကေရးနိုင္မွာလို့တုန္း။
အဂဿငလိပ္စာကို အဂဿငလိပ္လူမ်ိုးက grammar analyze လုပ္ေပးထားတာေတြ pattern ေတြခြဲေပးထားတာကို ေက်ေက်နပ္နပ္ျကီး သံုးသင့္ပါတယ္။

ေလာေလာဆယ္ ေတြ့မိတာကို သံုးသပ္ထားတာပါ။ ဒီထက္ အမ်ားျကီးရွိပါဦးမွာပါ။

# This article may b modify or update or add anytimes without any notice.

ေျမာက္ကိုးရီးယားမွ ဒံုးပ်ံ ကာကြယ္ေရး



ေျမာက္ကိုးရီးယားမွ ဒံုးပ်ံက်ေရာက္မွုမွ ကာကြယ္ရန္ အတြက္ ျပင္ဆင္ထားပံု


http://seizi.twwwa.org/archives/2007-03.html

Google's preferred sites


ဂူဂယ္က ဂ်ီေမးတို့၊ ဘေလာ့ဂါတို့ ေလာ့ခ္အင္ဝင္ထားျပီး ရွာတဲ့ အခ်ိန္မွာ သြားထားတဲ့ ဆိုဒ္ေတြကို မွတ္ထားပံုေပါ္ပါတယ္။ preference ထဲကိုသြားလိုက္ရင္ Preferred sites ဆိုျပီး ကိုယ္သြားေလ့ရွိတာေတြကို results မွာ ထိပ္ဆံုးကေန တက္ေအာင္လုပ္လို့ရမယ္ထင္ပါတယ္။

Add - cisco.com Add - ja.wikipedia.org Add - php.net
Add - en.wikipedia.org Add - w3schools.com Add - msdn.microsoft.com
Add - docs.python.org Add - msdn2.microsoft.com Add - ubuntuforums.org
Add - twitter.com Add - code.google.com Add - mmgeeks.org

က်ေနာ္ဆို mmgeeks.org နဲ့ code.google.com တို့က သြားေလ့သြားထရွိပါတယ္။ အထက္ပါ အျခားဆိုဒ္ေတြကို လဲသြားျဖစ္ပါတယ္။ ဆိုဒ္ရဲ့ နာမည္ျကီးမွုေပါ္မူတည္ျပီး စီထားေပးပံုရပါတယ္။ ဒါေပမယ့္ mmgeeks.org က ျမန္မာဆိုဒ္ဆိုေတာ့ နိုင္ငံျခားဆိုဒ္ထက္ယွဉ္ရင္ priority နိမ့္မယ္ထင္ပါတယ္။ ဒါေျကာင့္ေနာက္ဆံုးမွာ ေပါ္တာပါ။
ဒါေပမယ့္ Add ဆိုျပီး ထဲ့ထားလိုက္ရင္ ေတာ့ ရွာတိုင္း mmgeeks.org က result ေတြထိပ္ဆံုးမွာ ေပါ္လာမွာပါ။

cheers,
soe min

ဗမာလူမ်ိုး

ဗမာလူမ်ိုးဟာ ေကာင္းတာလုပ္တဲ့သူဆယ္ေယာက္ရွိရင္ ဖ်က္မဲ့သူလဲ ဆယ္ေယာက္ရွိတယ္။

Buglish Input Systems Mirrors

seems, people from yangon under bagan cannot access, googlepages.com, so here is mirrors for that.

v1.9
http://burglish.my-mm.org/releases/1.9/testarea.htm

http://burglish.my-mm.org/releases/1.9/fontconv.htm


v1.8
http://burglish.my-mm.org/releases/1.8/testarea.htm

http://burglish.my-mm.org/releases/1.8/fontconv.htm

and burglish.com redirected to latest web input engine


cheers,
Soe Min

some bug fixes for burglish web input system, web font converter

some bug fixes for burglish web input system, web font converter

input system - http://burglish.googlepages.com/testarea.htm

font converter - http://burglish.googlepages.com/fontconv.htm

download - version 1.9.1 - http://code.google.com/p/burglish/downloads/list

cheers
Soe Min

Opera raise js Error for UTF8 Without BOM (signature)

I found this today, Opera cant load UTF8 .js files without BOM, raising js error on the error log.

Firefox, IE, no problem at all for that.

so, Just attach following character at first

\ufeff

#http://en.my-mm.org/lookup.htm?zawgyi works for opera now, need to clear cache though

Cheers,
Soe Min

Marie Digby - Umbrella (cover) at 熊本城 (Kumamoto Castle Japan)

http://www.youtube.com/watch?gl=JP&hl=ja&v=aw27UBbuf4w&feature=related

Marie Digby - Umbrella (cover) at 熊本城 (Kumamoto Castle Japan)

----

http://www.youtube.com/watch?v=1jSac9oyKI0&NR=1

Marié Digby - Say It Again "LIVE" (in HD)

----

http://www.youtube.com/user/MarieDigby


Marie Digby's channel on Youtube

Regular Expression and Lambda function - some usages (C#, Python, Javascript, Php)

Regular Expression and Lambda function - some usages (C#, Python, Javascript, Php)

// input string will be ကခဂ and will convert to ကခဂ

// C#
using System.Text.RegularExpressions;

input = "ကခဂ"

Regex r = new Regex("&#([\d]+);");
string output = r.Replace(input,m=>(char)m.Groups[1].Value);
// ကခဂ

# Python
>>> import re

>>> input = u"ကခဂ"
>>>
>>> re.sub("&#([\d]+);",lambda x:unichr(x.group(1)), input)
# ကခဂ

// Javascript
input = "ကခဂ"

input.replace(/&#([\d]+);/g,function($0, $1){return String.fromCharCode($1);});
// ကခဂ

// php , as callback
$input = "ကခဂ"

function lamb($text){return(chr($text));}

preg_replace_callback("/&#([\d]+);/s","lamb",$input);
// ကခဂ


Cheers,
Soe Min

စည္းမ်ဉ္း

Hamasaki Ayumi - Rule

http://www.youtube.com/watch?v=hpS-B9ukOpM&feature=related

誰かに決められたルール
ဘယဩူမျနးမသိသူတ လုေပျထားတဲ့ စျညးမဉြးျဆိုတာတ
そんなもん必要ない
သာေကေျရးမေပါတာတ လံုးေဝ လံုးဝ မလိုအပျဘူး
だってこの僕らがルール
ငါကိုယျတိုငျက စျညးမဉြးျပဲ
そこんとこ譲れない※
အဲဒီလိုဟာမိုးတြကေ သာကေျခိုးမြပွတာေပါ့
こんな時代の一体どこに
ဒီေလိုခတေျမိုးမြာ ဒါမိုးတြကိုေ ဘာလုပျရမာလဲ
希望なんてあるのかって?
မာျလြေျင့ခကြျဆိုတာ ရိသးရဲ့ေလား

目に見えないものを触れられないものを
မမွငျနိုငျတဲ့အရာ မကိုငျတယျနိုငျတဲ့အရာ
信じていられるのかって?
အဲဒီလိုဟာမိုးတြကိုေ ယံုကွညျနရေမာလား

僕は黙ってただ頷いて
ငါဟာ ငွိမျန ခါေငးေျငွိျမ့နရေငျ နလိုေကျပါမယျ
静かに目を閉じる
တိတျတိတျဆိတျဆိတျ မကြျစိမိတျထားရငျထားမယျ

------------ stripped

お決まりのつまんないルール
သတျမတျပွီးသားရိတဲ့ သာကေဩံုးမကတြဲ့ စျညးမဉြးျတဆိုေတာနဲ့
押しつけられたくない
လံုးဝ အဖိမခံနိုငျဘူး
まずは君と僕でルール
အရငျဆံုး ကိုျယ့ရဲ့ ကိုယျပိုငျ စျညးမဉြးျနဲ့
ぶっ壊して始めよう
ဖာကေျဖကြျဝငျရအာငေျလား

----- stripped

English Myanmar Dictionary also Support Zawgyi Now

Unicode 5.1 Dictionary
http://en.my-MM.org/lookup.htm

Zawgyi Supported Dictionary
http://en.my-MM.org/lookup.htm?zawgyi

But I encourge to use Unicode 5.1 one.

# Thanks to Ma The` The` Aye for Unicode 5.1 to Zawgyi Dedicated Converter.

Cheers,
Soe MIn

2 versions of Myanmar3 Font


There is 2 versions of Myanmar3 out there. mm3.ttf and Myanmar3.ttf

These 2 have different reordering systems for အသတ္ နွင့္ ေအာက္ကျမစ္

i guess people from myanmar NLP and from my.wikipedia.org using second. ေအာက္ျမစ္ come befoore အသတ္.

for me, အသတ္ should be come before ေအာက္ျမစ္ , but i dont know why its like that.

well, no explanations i found so far for that. :(

Reviews for English to Myanmar Translator (Windows, Beta) from Myanmar NLP


1. GUI - is Great
2. Help - Good
3. spell correction - I cant test it, because its not work with .Net 2.0 Japanese version
4. Translation speed is not that bad, but a bit slow for me.
5. translatin accurency - may b 2 stars, out of 5 stars.
6. memory usage - above 220 MB at first load, after its loads, sometimes went down under 100 MB but goes about 100MB when searching or translating
7. database - access db - 416 MB on hardisk
8. custom dictionary entry - good
9. search in custom dictionary - almost freeze, search items not showing under selection

-- added at 2009 Mar 28
10. regardless of folder u choose, its created 2 folder under C:\, Resrc, and Models.

-- added 2009 Mar 29
11. database can be compact from microsoft access, to 2MB, 416MB is just a dummy data then :P

anyway, its good to have such things.
cheers,
Soe Min

English to Myanmar Translator from Myanmar NLP (Windows, Beta)

http://www.myanmarnlp.org.mm/

Cheers,

Memo ; MySQL UTF8 create Database and create Table

CREATE DATABASE `dbname` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;

CREATE TABLE `dbname`.`tbname` (
`itemname` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL
) ENGINE = MYISAM;

for some people

တစ္ခ်ို့လူေတြကို တစ္ခါခ်ဉ္သြားျပီဆိုရင္ တစ္သက္ခ်ီးလို့ပဲထင္တယ္။

Unicode 5.1 Dictionary update 0.5v

http://en.my-mm.org/lookup.htm


V1- V2 -V3-Ving, Vs searchable

write
pronunciation : /raÇt; rå7t; 'rÇtn/ pos : [v]
burmese : ေရးသည္

wrote
rootword : write pos : [v] form : (v2)
burmese : ေရးခဲ့သည္

written
rootword : write pos : [v] form : (v3)
burmese : ေရးခဲ့ျပီး

writing
rootword: write pos: [v] form: (ving)
burmese: ေရးေနသည္

writes
rootword : write pos : [v] form : (vs)
burmese : ေရးသည္

Plurals for Nouns searchable

writers
rootword: writer pos: [n] form: (pl)
burmese: စာေရးဆရာမ်ား

#ps : Total Records, over 210,000 :-)

Cheers,
Soe Min

V1-V2-V3-Ving All-in-one


abandon စြန့္ခြာသည္ abandoned စြန့္ခြာခဲ့သည္ abandoned စြန့္ခြာခဲ့ျပီး abandoning စြန့္ခြာေနသည္ abandons စြန့္ခြာသည္
abandon ပယ္ခြာသည္ abandoned ပယ္ခြာခဲ့သည္ abandoned ပယ္ခြာခဲ့ျပီး abandoning ပယ္ခြာေနသည္ abandons ပယ္ခြာသည္
abandon ပစ္ထားသည္ abandoned ပစ္ထားခဲ့သည္ abandoned ပစ္ထားခဲ့ျပီး abandoning ပစ္ထားေနသည္ abandons ပစ္ထားသည္
abandon စြန့္ပစ္သည္ abandoned စြန့္ပစ္ခဲ့သည္ abandoned စြန့္ပစ္ခဲ့ျပီး abandoning စြန့္ပစ္ေနသည္ abandons စြန့္ပစ္သည္
abandon ပစ္ပယ္သည္ abandoned ပစ္ပယ္ခဲ့သည္ abandoned ပစ္ပယ္ခဲ့ျပီး abandoning ပစ္ပယ္ေနသည္ abandons ပစ္ပယ္သည္
abandon စြန့္လြွတ္သည္ abandoned စြန့္လြွတ္ခဲ့သည္ abandoned စြန့္လြွတ္ခဲ့ျပီး abandoning စြန့္လြွတ္ေနသည္ abandons စြန့္လြွတ္သည္
abandon စြန့္သည္ abandoned စြန့္ခဲ့သည္ abandoned စြန့္ခဲ့ျပီး abandoning စြန့္ေနသည္ abandons စြန့္သည္

# will be more than 200,000 items in next version of Unicode 5.1 dictionary :-)

Cheers,
Soe Min

ဗဟုဝုစ္ သို့ Burmese Plurals မ်ား


ဗဟုဝုစ္ သို့ Burmese Plurals မ်ား

Another Generator :-)

Rules : -> ref from plurals

if words endswith "ch, sh, x, s, o" add "es"
if words endswith "fe, f", change to "ves"
if words endswith "us", change to "i"
if words endswith "is", change to "es"

others are irregular forms

#ps will available in next version of http://en.my-mm.org/lookup.htm

cheers
Soe Min

Congratulations Japanese Baseball Team!

Congratulations! Japanese Baseball Team!

Finally can get World No.1 :-)

Unicode 5.1 Dictionary http://en.my-mm.org v0.4


able to search V2 , and also V-ing

http://en.my-MM.org/lookup.htm

and total data records, 140,000, Wow! haha :-)


and still super fast :D

Cheers,
Soe Min

en.my-mm.org snapshots

abandon စြန့္ခြာသည္ abandoned စြန့္ခြာခဲ့သည္ abandoning စြန့္ခြာေနသည္
abandon ပယ္ခြာသည္ abandoned ပယ္ခြာခဲ့သည္ abandoning ပယ္ခြာေနသည္
abandon ပစ္ထားသည္ abandoned ပစ္ထားခဲ့သည္ abandoning ပစ္ထားေနသည္
abandon စြန့္ပစ္သည္ abandoned စြန့္ပစ္ခဲ့သည္ abandoning စြန့္ပစ္ေနသည္
abandon ပစ္ပယ္သည္ abandoned ပစ္ပယ္ခဲ့သည္ abandoning ပစ္ပယ္ေနသည္
abandon စြန့္လြွတ္သည္ abandoned စြန့္လြွတ္ခဲ့သည္ abandoning စြန့္လြွတ္ေနသည္
abandon စြန့္သည္ abandoned စြန့္ခဲ့သည္ abandoning စြန့္ေနသည္

next version of Unicode 5.1 dictionary will able to lookup V2 and V-ing also.
and I guess, It will be more than 100,000 entries on database. yay!

cheers,
soe min

Regular Verb မွ Simple Past ေျပာင္းပံုေျပာင္းနည္း (Python)

Original Article here.
http://web2.uvcs.uvic.ca/elc/StudyZone/330/grammar/pasted.htm (thx to Ma TTA)

rule 1
live, date တို့လို e နဲ့ဆံုးတာေတြကို "d" ပဲေပါင္းေပး lived, dated
>>> if word[-1]=="e":word+"d"

rule 2
try, cry တို့လို y နဲ့ဆံုးတာေတြကို ied ေျပာင္း tried, cried
>>> if word[-1]=="y":word[:-1]+"ied"

rule 3 (နဲနဲရွုပ္တယ္)
tap, commit တို့လို့စာလံုးေတြကို က်ေတာ့ ေနာက္ဆံုးစာလံုးကို ၂လံုးလုပ္
ေနာက္ဆံုးကေန သံုးလံုးမွာ ဗ်ည္း၊ သရ၊ ဗ်ည္းဆိုျပီး သြားေနရင္ rule 3 နဲ့ ညိတယ္လို့ ယူဆပါတယ္။
>>> if word[-3] not in "aeiuo" and word[-2] in "aeiuo" and word[-1] not in "aeiuowy": word+word[-1]+"ed"

rule 4
အထက္ကဟာေတြ နဲ့မညိတာေတြ အားလံုးကို ed ေပါင္းေပး
>>> word+"ed"

cheers,
Soe Min

Generating V2 from normal verbs


amaze အံ့အားသင့္ေစသည္ amazed အံ့အားသင့္ေစခဲ့သည္
amaze တအံ့တဩျဖစ္ရသည္ amazed တအံ့တဩျဖစ္ရခဲ့သည္
amble စိမ္ေျပနေျပေလ်ွာက္သည္၊လွမ္းသည္၊သြားသည္ ambled စိမ္ေျပနေျပေလ်ွာက္သည္၊လွမ္းသည္၊သြားခဲ့သည္
ambush ခ်ံုခိုတိုက္ခိုက္သည္ ambushed ခ်ံုခိုတိုက္ခိုက္ခဲ့သည္
ambush ေခ်ာင္းေျမာင္းတိုက္ခိုက္သည္ ambushed ေခ်ာင္းေျမာင္းတိုက္ခိုက္ခဲ့သည္
ambush အလစ္ ဖမ္းသည္ ambushed အလစ္ ဖမ္းခဲ့သည္
ameliorate ပိုမိုေကာင္းမြန္ေစသည္ ameliorated ပိုမိုေကာင္းမြန္ေစခဲ့သည္
amend ျပင္ဆင္ခ်က္ထုတ္သည္ amended ျပင္ဆင္ခ်က္ထုတ္ခဲ့သည္
amend ျပုျပင္သည္ amended ျပုျပင္ခဲ့သည္

Generating V2 from V1 and Burmese also.

Firefox 3.6 Alpha 64 bit Windows

Firefox 3.6 Alpha 64 bit Windows

Firefox-3.6a1pre.en-US.win64.installer.20090322.zip

OpenOffice 3.1 for Windows, Linux, Mac, Solaris

OpenOffice 3.1 for Windows, Linux, Mac, Solaris

http://ooo.services.openoffice.org/pub/OpenOffice.org/cws/upload/localization/ooo310_m5/


Thx, Ko Wunna Ko Ko and Keith Stribley, OpenOffice Team Members

Regards,

Morphy

% python
>>> from wordnet import *
>>> morphy("ate",VERB)
eat
>>> morphy("easier",ADJ)
easy
>>> morphy("apples")
apple

nice huh!

Search POS (Part of Speech) using NLTK

% python
>>> import nltk
>>> nltk.pos_tag(["work"])
[('work', 'NN')]
Oh! its say work as NOUN!

Yeah, single verb can be use as noun. we need to pass the the whole sentence to check it

we have english sample like "he works for a company"
>>> nltk.pos_tag("he works for a company".split())
[('he', 'PRP'), ('works', 'VBZ'), ('for', 'IN'), ('a', 'DT'), ('company', 'NN')]

wow :-) its show "works" as VBZ, it is verb, great. huh!

so search, "work" in nltk results again. and can get very accurate POS :-)

work = VBZ for that case :-)

#but unfortunately its take time around 100ms to 1s, its slow for me, but no way. have to use that.

cheers,
soe min

Firefox 3.6 Alpha

firefox-3.6a1pre

FYI

なし

早く寝れるのはいい人生だと思うだけどなぁ。もう気付いたらこんな時間!

OpenOffice 3.1 will have Myanmar Locale by default

http://www.openoffice.org/dev_docs/features/3.1/#r7

Thanks Ko Wunna Ko Ko,

Cheers,

Unicode 5.1's rendering engine is too slow on text editors

I am trying to handle big burmese unicode 5.1 text with the font Myanmar3.

even 10K its need to load 3 - 5 seconds,
over 500K need more than a minutes, and hard to scroll down also.
over 1M, cannot load at all, windows just freeze. or i cant wait more than 5 minutes?

I only tested on Notepad++ and only Myanmar3 font.
I am not sure other unicode 5.1 fonts like padauk or parabaik , and others text editors.
but I think It might have same behavior. even firefox hard to display big burmese unicode 5.1 texts.

and + UTF8, Its damn slow than other encoding like UTF16,
because need another converting process on encoding,
for example for "က", normal code is \u1000, but in UTF8, \xe1\x80\x80, 3 bytes.
need to convert back and to UTF8 need extra process, thats too bad if you handle big texts.

:(

Get Google Suggestion Data as JSON or XML

?output=json&q=က

window.google.ac.h(["က",[["ကဗ်ာ","235,000 results","0"],["ကြန္ပ်ူတာနည္းပညာ","857 results","1"],["ကြန္ပ်ူတာ","22,200 results","2"],["ကဗ်ာမ်ား","36,600 results","3"],["ကြန္ပ်ူတာဂ်ာနယ္","350 results","4"],["ကြန္ျပူတာ","11,200 results","5"],["က်န္းမာေရး","63,200 results","6"],["ကလိုေစးထူး","29,300 results","7"],["ကိုထိုက္","30,700 results","8"],["ကြန္ပ်ူတာစာအုပ္မ်ား","2 results","9"]]])

?output=toolbar&q=က

<?xml version="1.0"?>
<toplevel>
<CompleteSuggestion><suggestion data="ကဗ်ာ"/><num_queries int="235000"/></CompleteSuggestion>
<CompleteSuggestion><suggestion data="ကြန္ပ်ူတာနည္းပညာ"/><num_queries int="857"/></CompleteSuggestion>
<CompleteSuggestion><suggestion data="ကြန္ပ်ူတာ"/><num_queries int="22200"/></CompleteSuggestion>
<CompleteSuggestion><suggestion data="ကဗ်ာမ်ား"/><num_queries int="36600"/></CompleteSuggestion>
<CompleteSuggestion><suggestion data="ကြန္ပ်ူတာဂ်ာနယ္"/><num_queries int="350"/></CompleteSuggestion>
<CompleteSuggestion><suggestion data="ကြန္ျပူတာ"/><num_queries int="11200"/></CompleteSuggestion>
<CompleteSuggestion><suggestion data="က်န္းမာေရး"/><num_queries int="63200"/></CompleteSuggestion>
<CompleteSuggestion><suggestion data="ကလိုေစးထူး"/><num_queries int="29300"/></CompleteSuggestion>
<CompleteSuggestion><suggestion data="ကိုထိုက္"/><num_queries int="30700"/></CompleteSuggestion>
<CompleteSuggestion><suggestion data="ကြန္ပ်ူတာစာအုပ္မ်ား"/><num_queries int="2"/></CompleteSuggestion>
</toplevel>

ဘာလုပ္လို့ရလဲဆိုေတာ့ စာလံုးတစ္လံုးျပီးရင္ ေနာက္တစ္လံုး ဘာအလာနိုင္ဆံုးလဲဆိုတာ သိနိုင္ပါတယ္။

ေလာေလာဆယ္ေတာ့ ဂူဂယ္မွာ ေဒတာနဲနဲပဲ ရွိပါေသးတယ္။ ျမန္မာလို ရွာတဲ့သူေတြမ်ားလာရင္ ပိုျပီးတိတိက်က် ရလာပါလိမ့္မယ္။

မာ့ခ္

Myanmar Encylopedia in Unicode 5.1 (Just for Testing)

Vol1 - Few Definitions

I didn't realize there is so much information there. lots of texts,
only texts take several Megabytes for few definitions

ကကတစ္ ။။ ကကတစ္သည္ ျမန္မာနိုင္ငံ ကမ္းရိုး တစ္ေလ်ွာက္၌ေတြ့ရေသာ အေရးျကီးသည့္ စားငါးတစ္မ်ိုး ျဖစ္၍ လူသိမ်ားသည္။ ဤငါးသည္ ပါဏေဗဒ အလိုအရ ငေတာက္တူ၊ကသျမင္း၊ငစင္စပ္ စသည္တို့နွင့္အတူ "ပါစီဒို" မ်ိုးရင္းတြင္ ပါဝင္သည္။ ကကတစ္၏ကိုယ္သည္ ျပား၍ အနည္းငယ္ရွည္လ်ားသည္။ နွာတံတို၍ ေအာက္ေမးေရွ့သို့ ေငါထြက္ေနသည္။ ေခါင္း၏ ေဘးတစ္ဖက္တစ္ခ်က္တြင္ ျကီး မားေသာ မ်က္လံုး နွစ္လံုးရွိသည္။ ေက်ာဆူးေတာင္ နွစ္ခုပါ၍ ေရွ့ဆူးေတာင္တြင္ မာေက်ာေသာဆူးရိုးမ်ားပါရွိသည္။ အျမီးမွာ ထိပ္ဝိုင္းမ်ိုး ျဖစ္၏။ အေျကးမ်ားမွာ မျကီးမငယ္ျဖစ္၍ အနား ျကမ္း အေျကးမ်ိုးျဖစ္သည္။ ဤငါး၏အေရာင္မွာ မြဲျပာေရာင္ ျဖစ္၍၊ ေက်ာပိုင္းတြင္ အစိမ္းေရာင္ ဝမ္းပိုက္ တစ္ေလ်ွာက္တြင္ အျဖူေရာင္သန္းေနသည္။ ကကတစ္သည္ သာမန္အားျဖင့္ တစ္ ေပခြဲသာ ရွိေသာ္လည္း၊ တစ္ခါတစ္ရံ အရွည္ ၅ ေပ အေလး ခ်ိန္ ၅၅ ပိသာခန့္အထိ ရွိနိုင္သည္။ ဤငါး၏ စည္ေဖာင္းမ်ား မွ အေတာ္အသင့္ ေကာင္းမြန္ေသာ ငါးစည္ေဖာင္း ေကာ္ကို ျပုလုပ္ရရွိနိုင္သည္ဟု သိရသည္။ ဓ 

ကကုသန္ျမတ္စြာဘုရား ။။ ဘုရားငါးဆူပြင့္ရာ ဤဘဒဿဒ ကမဿဘာ အတြင္း ပြင့္ေတာ္မူခဲ့ျပီး ဘုရားေလးဆူအနက္ ပထမဆံုး ပြင့္ ေတာ္မူေသာ ဘုရားရွင္ျဖစ္သည္။ေခမံျပည္၌ အဂဿဂိဒšပုဏဿထားနွင့္ ဝိသာခါပုေဏဿထးမတို့၏သား ျဖစ္၏။ အရြယ္ေရာက္ေသာ္ သင့္ ျမတ္ေသာ သတို့သမီးနွင့္ လက္ထပ္ထိမ္းျမား၏။ သားေတာ္ ဥတဿတရကို ဖြားျမင္ျပီးေနာက္ ေလာကီစည္းစိမ္ကို စြန့္ပယ္ကာ ေတာထြက္ေတာ္မူသည္။ ရွစ္လျကာမ်ွ ဒုကဿကရစရိယာ က်င့္ေတာ္ မူျပီးေနာက္ ကုကဿကိုေဗါဓိ ပင္ရင္း ဝယ္ သညုတ ဥာဏ္ေတာ္ ကိုရ၍ ဘုရား ျဖစ္ေတာ္မူသည္။ ထိုျမတ္စြာဘုရား၏ အဂဿဂ သာဝက တပည့္ နွစ္ပါးကား ရွင္ဝိဓူရနွင့္ ရွင္သိဉဿစီဝတို့ျဖစ္ သည္။ အလုပ္အေက်ြး(တပည့္)ကား ရွင္ဗုရူအိးေဇာျဖစ္သည္။ ထိုျမတ္စြာဘုရား၏ဥာဏ္ေတာ္အျမင့္သည္ အေတာင္ ေလး ဆယ္ျဖစ္၏။ သက္ေတာ္ အနွစ္သံုးေသာင္း နွစ္ေထာင္တြင္ ေခမာရံု၌ ပရိနိာန္ျပုေတာ္မူရာ၊ ျကြင္းေသာဓါတ္ေတာ္အစုကို ဌပနာ၍ တစ္ဂါဝုတ္ျမင့္ေသာ ေစတီေတာ္ကို တည္ထား ကိုး ကြယ္ျကသည္။ ထိုအခါ လူတို့၏ အသက္တမ္းမွာ ၄ ေသာင္း ျဖစ္၏။ 

ကကူရံ ။။ကကူရံသည္ ပင္လယ္ငါးမ်ိုးျဖစ္၍ ရခိုင္ျပည္ ဖက္တြင္ ငလက္ခြာဟု၎၊ ထားဝယ္ဖက္၌ ငကြဲယင္ဟု၎ တြင္သည္။ နိုင္ငံျခားတြင္မူ အိနဿဒိယဆာမန္ဟု ေခါ္ေလ့ရွိျက သည္။ ပါဏေဗဒ အလိုအရ ကကူရံသည္ ငပုဏဿထားနွင့္အတူ "ေပါ္လီနီမီဒို" မ်ိုးရင္းတြင္ ပါဝင္၍၊ ဤငါးနွစ္မ်ိုးလံုးပင္ ျမန္မာနိုင္ငံ၌ လူျကိုက္မ်ားသျဖင့္ အေရာင္းရ တြင္က်ယ္ ေလသည္။ ကကူရံသည္ ေျခာက္ေပေက်ာ္ေက်ာ္အထိ ရွည္နိုင္သည္။ နွာေယာင္ပြ၍ ဝိုင္းသည္။ မ်က္လံုးျကီးသည္။ ပါးစပ္ျကီး၍ ပါးစပ္ေပါက္နက္သည္။ ေက်ာဆူးေတာင္နွစ္ခုပါ၍ ထင္ရွား ေပါ္လြင္သည္။ အျမီးခြနက္သည္။ အနားျကမ္းမ်ိုး ျဖစ္သည့္ အေျကးမ်ားမွာ ေသးငယ္၍ ေထာင္လိုက္ေပါက္ေသာ ဆူး ေတာင္ဖ်ားအထိပင္ ဖံုးအပ္ ေနတတ္သည္။ ဤငါး၏ အေရာင္ မွာ အစိမ္းနွင့္ေငြေရာင္ ေရာစပ္ထားေသာအေရာင္မ်ိုးျဖစ္၍ ကိုယ္နံေဘး နွင့္ဝမ္းပိုက္ပိုင္းတြင္ ျဖူဝါေရာင္သို့ ေျပာင္းသြား သည္။ ေက်ာနွင့္အျမီးဆူးေတာင္ထိပ္မ်ားတို့မွာမည္း၍ ေသးငယ္ ေသာ အမည္းေျပာက္ကေလးမ်ားပါသည္။ ဝမ္းနွင့္စအို ဆူး ေတာင္တို့၏ အနားတစ္ေလ်ာက္မွာ အဝါနု ေရာင္သန္းေန၏။ ပါးဟက္ဖံုးေပါ္တြင္ အမည္းကြက္တစ္ခုစီပါရွိသည္။ ကကူရံကို အဆိပ္အေတာက္ကင္းသည္ဆိုကာ လူဖ်ားလူနာမ်ား စားသံုး နိုင္ေသာ ငါးမ်ိုးစာရင္းတြင္ ထည့္သြင္းထားသည္။ ကကူရံကို ျမန္မာနိုင္ငံပင္လယ္မွ အေျမာက္အျမား ဖမ္းဆီးရမိေလ့ ရွိသည့္ အတိုင္း၊ လတ္လတ္ေရာင္းခ်ရန္ထက္ ပိုလ်ွံေနေသာ ငါးမ်ားကို ငါးပုပ္ေျခာက္မ်ား ငါးေျခာက္မ်ားျပုလုပ္၍ ေရာင္းခ်စားေသာက္ ေလ့ရွိျကသည္။

.....

#there is still some issues on my converter though. but almost readable now :-)

:-)

Some fixes for http://en.my-mm.org/lookup.htm

http://en.my-mm.org/lookup.htm
- random word button not working for some cases before, now fixed, and super fast :-)
- some mismatch data before, now should be a lot better :D
- Look Word and Look List button should be faster than before also :-)
- total data records are over 82,000 now :-)

Testing Popup English to Burmese Dictionary :-)

Yes
 

We
  

Can is not in dictionary yet. so its show cant find :-)

  

just testing no data yet, there is only 2 words in the database.

"yes":"ဟုတ္ကဲ့", "we":"က်ြန္ုပ္တို့"

# Contact me, if anybody interest to do real project, need knowledge on javascript and server side scripts (may b), ajax, and most important thing is, how much TIME you can give on it. :-)
or If you have idea or suggestions about that, pls share :-)

Cheers,
Soe Min

Get a English Word under mouse cursor with Javascript

Get a English Word under mouse cursor with Javascript

event.target.innerHTML.substring(event.target.innerHTML.lastIndexOf(" ",event.rangeOffset),event.target.innerHTML.indexOf(" ",event.rangeOffset));

+

Mouse Cursor in Pixel by event.clientX and event.clientY.

can make popup english to burmese dictionary when you point to english words.

just an idea.

:-)

Firefox Myanmar (Burmese) spell dictionary (Zawgyi-One)

Please Reference my previous post for Firefox Myanmar (Burmese) spell dictionary first
http://www.soemin.net/2009/03/firefox-my-mm-spell-dictionary.html

This is just converting Unicode 5.1 data to Zawgyi Encoding.
All the data are by
http://www.ThanLwinSoft.org by Keith Stribley, and Ko Wunna Ko Ko

http://www.thanlwinsoft.org/ThanLwinSoft/Downloads/#moz


my-MM-ZG.zip

Cheers,
Soe Min

Firefox Myanmar (Burmese) spell dictionary (Unicode 5.1)

First of all, there is full feature packages for Myanmar Language in
http://www.ThanLwinSoft.org by Keith Stribley, and Ko Wunna Ko Ko

http://www.thanlwinsoft.org/ThanLwinSoft/Downloads/#moz

I am planning to do web based Spell Lookup Dictionary (Not Spelling Autocorrection one)
Dictionary is currently around 800K and its a little bit Big for Web base program..
But I found that its able to add as firefox plugin, its too easy.

There is full feature language pack, but not dictionary only, and
also cant find on mozilla plugin database
https://addons.mozilla.org/en-US/firefox/browse/type:3
(If I am wrong, pls correct me)

So, I've download English-US dictionary and Download Myanmar Dictionary from OpenOffice.org and combine it to firefox spell checking dictionary my-MM.xpi
Unzip, Click and Drag my-MM.xpi into firefox windows to install it.

Popup menu

 
How to enable

Installed



About



I ve only touch readme.txt and added a line about i repacked at 2009 Mar 10.

Thats all,

Thanks and Regards to All,
Soe Min

Extracting Burmese Syllables from Word Dictionary use in OpenOffice.org

Extracting Burmese Syllables from Word Dictionary use in OpenOffice.org
http://my.openoffice.org/

dictionary by thanlwinsoft.org, keith stribley
http://www.thanlwinsoft.org/ThanLwinSoft/Downloads/OpenOffice/my-MMDict.oxt

data collected by Ko Wunna Ko Ko
http://myanmarnlpteam.blogspot.com/

data is something like this.
32308
က
ကကတိုး
ကကတစ္
ကကုသန္
ကကူရံ
ကျကီကေျကာင္လုပ္
ကျကီး
ကျကီးထြန္
ကျကိုး
ကျကိုးတန္ဆာ
ကကြက္
ကေခါင္းတယ္
ကခ်လာ
ကေခ်သည္
ကေခ်ာ္ကခ်ြတ္
ကခ်င္
ကစား
ကစားကြက္
ကစားကြင္း
ကစားခုန္စား
ကစားစရာ
ကစားဒိုင္
ကစားေဖာ္
ကစားေဖာ္ကစားဖက္
.....

i use following code to extract it (python)
sorted(set(cburglish.syllable(CONTENT,Myanmar3,u"|").split("|")))

i ve got
total syllables 121666
unique syllables 2925
unique pali 587
unique non-pali 2338
my_MM.dic extracted!

Pali word 556
to check Pali or not in Unicode 5.1 is easy, just check \u1039 or \u103f is in it or not.

syllables
က
ကကဿက
ကကဿကု
ကက္
ကဂဿဂ
ကင္
ကင္း
ကကဿငာ
ကစဿစည္း
ကစ္
ကဉဿစ
ကဋ္
ကဏဿဋ
.....

PaLi
ကကဿက
ကကဿကု
ကဂဿဂ
ကကဿငာ
ကစဿစည္း
ကဉဿစ
ကဏဿဋ
ကဏဿဌ
ကဏဿဍ
ကဏဿဏ
ကတဿတ
ကတဿတား
ကတဿတီ
ကတဿတူ
ကနဿတ
ကနဿတာ
.....

Non-Pali
က
ကက္
ကင္
ကင္း
ကစ္
ကဋ္
ကဏ္
ကတ္
ကန္
ကန့္
ကန္း
ကပ္
ကမ္း
ကယ္
ကယ့္
ကာ
ကာယ္
ကား
ကိ
ကိဏ္း
.....

Cheers,
Soe Min

English to Myanmar Dictionary in Unicode 5.1 (very very experimental version) :D


English to Myanmar Dictionary in Unicode 5.1 v0.1 (very very experimental version) :D

you can even search single length word "a" "b" "c" "d" :-)


http://en.my-MM.org/lookup.htm


total rows is around 74000 in my sql database

:-)

cheers,
Soe Min

ေဇာ္ဂ်ီ၏ ရရစ္ ၈ မ်ိုး ------------------------------

က်ေနာ္ ျကံျကံဖန္ဖန္ေတြးတာ သိပ္ဝါသနာပါပါတယ္။

က်ေနာ္ ဟိုတစ္ေန့က ကိုညီလင္းဆက္ဆီက ရထားတဲ့ Normalization V1.1 ဆိုတဲ့ document တစ္ခုရွိပါတယ္။

ရရစ္ျကီး + (က၊ဆ၊တ၊ထ) + လံုးျကီးတင္ ဆိုရင္ (1080) + (က၊ဆ၊တ၊ထ) + (102D) လို့ေျပာင္းေပး။
U+107E U+1000 U+102D <> U+1080 U+1000 U+102D
U+107E U+1006 U+102D <> U+1080 U+1006 U+102D
....

ရရစ္ငယ္ + (ခ၊ဂ၊င၊ဒ၊ဓ၊န၊ပ၊ဖ၊ဗ၊မ) + လံုးျကီးတင္ ဆိုရင္ (107F) + (ခ၊ဂ၊င၊ဒ၊ဓ၊န၊ပ၊ဖ၊ဗ၊မ) + (102D) လို့ ေျပာင္းေပး။
U+103B U+1001 U+102D <> U+107F U+1001 U+102D
U+103B U+1002 U+102D <> U+103B U+1002 U+102D
U+103B U+1004 U+102D <> U+103B U+1004 U+102D
....

အားလံုးေပါင္း ၁၅မ်က္နွာမွာ ရရစ္အတြက္ခ်ည္းပဲ ၁၀ မ်က္နွာေက်ာ္ရွိပါတယ္။
ေဇာ္ဂ်ီရယ္ ဘယ္လိုမ်ားလုပ္ထားသလဲ မသိဘူး။
ကိုညီလင္းဆက္ စုစည္းေပးထားတာ အရမ္းေကာင္းပါတယ္။

က်ေနာ္ အဲဒီေဒတာ ၁၅မ်က္နွာကို မနက္ကတည္းက ထိုင္ျကည့္ပါတယ္။ ဘာမ်ား ေတြ့လိုေတြ့ျငားလို့ေပါ့။
rule ေတြတစ္ခုျခင္းဆီဖတ္ျကည့္တယ္။ ကြန္ပ်ူတာ အေနနဲ့မဟုတ္ပဲ လူအေနနဲ့ ဘယ္လိုလုပ္ရင္ ရမလဲစဉ္းစားတယ္။

ရွစ္ခုျဖစ္တဲ့ ------------------------------ ျမွာ
ပံုမွန္အားျဖင့္ ျမန္မာတစ္ေယာက္ဆိုရင္ ရရစ္အျကီးသံုးရမလား အေသးသံုးရမလား။
ေခါင္းမပါတာေလးသံုးရမလား။ ေအာက္ကလြတ္ေနတာေလးသံုးရမလား။ အလိုလိုသိပါတယ္။ ဘာလို့လဲ???

၂နာရီေလာက္ဟိုနဲနဲ ဒီနဲနဲစမ္းျကည့္ သေဘာမက်ေသးတာနဲ့ ျပန္ဖ်က္လိုက္နဲ့ လုပ္ျကည့္ပါတယ္။
ေနာက္ဆံုး ျမန္လဲျမန္မယ့္ အိုင္ဒီယာတစ္ခုရလာပါတယ္။

ေဇာ္ဂ်ီက 0x1000 ကေန 0x1097 အထိ range ထဲမွာ ရွိပါတယ္။ အဲဒီ 0x97 လံုးကို char array ထဲမွာ ဘယ္ဟာက ဘာဆိုျပီး ခြဲထားလိုက္ရင္ array နဲ့ ျပန္ေထာက္ယူလို့ရပါတယ္။
char မွာ 8 bit , 0000 0000 ရွိပါတယ္။
တစ္ bit စီကို အနံက်ယ္တဲ့ စာလံုး(like ကဆ ....), bit 1, value (0,1)
အေပါ္တက္ေနတဲ့ စာလံုး (--ီ --ဲ ....), bit 2, value (0,2)
ေအာက္ထြက္ေနတဲ့ စာလံုး (--ရ---ြ--ွ-- ....), bit 4, value (0,4)
ဆိုျပီး ခြဲခ်ျကည့္ပါတယ္။

ရရစ္ ၈လံုးရွိတယ္။ 0-7 ဆိုရင္ ၈လံုး။ 3bit is 23 = 8, wow!
ရရစ္ ၈လံုးကို array ထဲစီျပီးထည့္။
yayitarray[]={0x103b,0x107e,0x1081,0x1082,0x107f ....}

စာလံုးေတြကို ခြဲထားတဲ့ array, ထည့္
zawgyiarry[]={0x01,0x00,0x00,0x01 .....}
0x01 က ကျကီးပါ။ အနံက်ေတာ့ bit 1 ကို ON ေပးလို့ 0x01 ျဖစ္ပါတယ္။

အဲဒီေတာ့ yayitarray[0x01] ဟာ ------ ျဖစ္ပါတယ္။ OH! OH! OH!
အဲဒီအတိုင္းပဲ ခေခြးဟာ 0x00 ျဖစ္တဲ့အတြက္ yayitarray[0x00] ----- :-)

and ေျဟာသလို တစ္ေျကာင္းထဲ? နဲ့
while(*d++)if(*d>=0x107e && *d<=0x1084)||*d==0x103b) *d=(yayitarray[(zawgyiarray[*&d[1]]| zawgyiarray[*&d[2]]| zawgyiarray[*&d[3]])&7];

ေဟာဒီဟာကို
ျမျကျခ  ျကျကိ ျကြ ျကြိ ျခ ျခြ ျခိ ျခြိ ျခ  ျခြ  ျခိ   ျခြီ

ေဟာသလို
ျမျကျခ  ျကျကိ ျကြ ျကြိ ျခ ျခြ ျခိ ျခြိ ျခ  ျခြ  ျခိ   ျခြီ

ေျပာင္းနိုင္ပါတယ္။ :-)

Yay! I am satisfied for today. :-)

Cheers,
Soe Min

Making Extension for Python is easier than PHP especially Unicode Program with C/C++

Making Extension for Python is easier than PHP especially Unicode Program with C/C++

Well, Its take my two holidays to get working Unicode related program on php.

In python, only need gcc or g++ and working great.

but php (tested on php5.2.9), mainly accept the type *char* and need extra library to convert to *wchar_t* type. so I have to write my own unicode-utf8 conversion, escape functions and parsing functions.
And need the program *phpize* to generate configure scripts,
Its only on php source and you need to compile php.
And to compile php,will need very very big library *libxml2* source and compile, its take more time than compiling php.
for C program thats all, but for C++ seems need extra information, I still dont sucess running C++ programs for PHP yet. but its ok so far for me. :-)

Well, I think its still worth to do it :-)

Soe Min

နည္းပညာသည္ လူတိုင္းအတြက္ ျဖစ္ရမည္။

နည္းပညာသည္ လူတိုင္းအတြက္ ျဖစ္ရမည္။
"technology in the country's own language",
rather than
"in the hands of a minority that masters [English]".
အဂဿငလိပ္စာတတ္ေသာ လူတစ္စု၏ လက္ထဲတြင္သာ မရွိသင့္။

ဘာသာျပန္သူတစ္ခ်ို့ရဲ့ ခံယူခ်က္ပါ။

အဲဒီစကားက မွန္ကန္ေနသလို ခံျပင္းစရာလဲေကာင္းပါတယ္။
မျဖစ္သင့္ပါဘူး။ ဒါေပမယ့္ ျဖစ္ေနပါတယ္။ ကဲဘယ္လိုလုပ္သင့္သလဲ???

ref:
http://myanmaritpros.com/forum/topic/show?id=1445004%3ATopic%3A117987&page=2&commentId=1445004%3AComment%3A118349&x=1#1445004Comment118349
http://www.stockholmchallenge.se/data/1237

Burmese Reordering Fix & Strip Garbages as PHP extension

Download the binary php_cburglish.7z

#compile for x86_64 GNU/Linux only

before using in php
#1 extract and copy cburglish.so file into php extensions directory.
#2 add extension="cburglish.so" in php.ini file

how to use in php
Usages :
<?php
echo cburglish_normalize("\u1000\u102f\u102d\u1000\u1039 \u1039 \u1039",6);
?>

ကိုက္္

# 6 is Zawgyi-One
# 13 is Myanmar3

will reorder
\u1000\u102f\u102d က -ု -ိ
to
\u1000\u102d\u102f က -ိ -ု

will strip
\u1000\u1039 \u1039 \u1039 က ္ ္ ္ 
to
\u1000\u1039 က္

And The Program is Free of Charge, but CANNOT be use in Commercial Applications.

Cheers,
Soe Min

Few things about UTF-8 Encoding and Myanmar

ျမန္မာစာဟာ ယူနီကုတ္ range ဟာ U+1000 ကေန U+109F ျကားမွာရွိျပီး
စာလံုးအေနနဲ့သိမ္းဖို့ ပံုမွန္အားျဖင့္ ၂ဘိုက္(wchar_t*1 or WORD or TCHAR?) လိုအပ္ပါတယ္။
စာလံုးတစ္လံုး(၁ဘိုက္ char)ျဖစ္တဲ့ 1-256အတြင္းမဆံ့လို့ပါ။
တခ်ို့ေနရာေတြမွာ ေဒတာ အသြင္းအထုတ္လုပ္တဲ့ အခ်ိန္မွာ စာလံုးတစ္လံုး char အေနနဲ့မွ အဆင္ေျပမယ့္ေနရာေတြရွိပါတယ္။ ဒါေျကာင့္ ပို့တဲ့အခ်ိန္မွာ char အေနနဲ့ပို့ျပီး ျပန္ေျပာင္းဖို့လိုပါတယ္။
UTF-8 ဟာအဲဒီအတြက္ျပဌာန္းထားတာ ရွိပါတယ္။

(*1 wchar_t is 4 bytes in Linux)

ေဟာဒီေနရာမွာ အဂဿငလိပ္လို အေသးစိတ္ေလ့လာလို့ရပါတယ္။ http://en.wikipedia.org/wiki/UTF-8

ျမန္မာစာလံုး က ဟာ \u1000 ျဖစ္ျပီး UTF8 မွာ E1 80 80 ဆိုျပီးျပပါတယ္။
AbCd ကေတာ့ AbCd အတိုင္းပါဘဲ။

အြန္လိုင္းေပါ္မွာ ေျပာင္းျကည့္ခ်င္ရင္ ေဟာ့ဒီမွာ လုပ္လို့ရပါတယ္။ http://rishida.net/scripts/uniview/conversion.php

E1 80 80 ကေန \u1000 ကို ေျပာင္းတဲ့ ပရိုဂရမ္ကို က်ေနာ္ ဒီလိုစမ္းထားပါတယ္။
အျခား full feature ပရိုဂရမ္ေတြ အမ်ားျကီးရွိပါတယ္။
http://enchantia.com/software/graphapp/package/src/utility/utf8.c

Seth ေရးထားတဲ့ ကုတ္လည္း ေတာ္ေတာ္ေကာင္းပါတယ္။

က်ေနာ္ကေတာ့ မတိုတိုေအာင္ေရးတာ ဝါသနာပါပါတယ္။ ဘယ္သူမွ မဖတ္တတ္ပါဘူး။ :P
ကြန္ပ်ူတာဖတ္ဖို့ေရးတာပါ။ ျပသဿသနာမရွိပါဘူး။ :D :D :D
do{
if(*s<0x80){*d++=*s;
}else if(*s>>4==0xf){s+=3;
}else if(*s>>5==7){*d=(((*s<<4)|(*&s[1]>>2&0xf)<<4)<<8)|((*&s[1]<<6)&3)|(*&s[2]&0x3f);s+=2;d++;
}else if(*s>>6==3){s+=1;}
}while(*s++);

*s ဟာ source string ကိုေထာက္ထားျပီး *d ဟာ destination string ကိုေထာက္ထားပါတယ္။
U+10000 အထက္ကဟာေတြကို ေက်ာ္ပစ္ပါတယ္။ ျမန္မာစာ အတြက္ မလိုပါဘူး။
U+127 + U+7FF ကိုလည္းေက်ာ္ထားပါတယ္။ က်ေနာ္ မလိုပါဘူး :P

python ကို port လုပ္ျပီးစမ္းထားပါတယ္။
% python
>>> import cburglish
>>> "aကaကခဂဃa"
'a\xe1\x80\x80a\xe1\x80\x80\xe1\x80\x81\xe1\x80\x82\xe1\x80\x83a'
>>> cburglish.utf8decode("aကaကခဂဃa")
u'a\u1000a\u1000\u1001\u1002\u1003a'

ဒါနဲ့ python မွာ အဲဒီဖန္ရွင္ built-in ပါပါတယ္။ မလိုပါဘူး။ က်ေနာ္ php extension အတြက္စမ္းထားတာပါ။

#ps Above codes are GPLv3, According to License, Free of charge to use, But Can't be use in Commercial Applications.

Cheers,
Soe Min

refs:
http://en.wikipedia.org/wiki/UTF-8
http://www.phpwact.org/php/i18n/utf-8#utf-8_dangerous_php_functionality
http://waitzar.googlecode.com/svn/trunk/cross_platform_library/waitzar/WordBuilder.cpp
http://enchantia.com/software/graphapp/package/src/utility/utf8.c

Stripping Garbages from Burmese Texts

Well There is lots of Garbage Types, This one will just remove extra from the following string.

ကဲ ဲ ဲ ဲ ဲ ဲ ဲ ဲ ဲ ဲကဲ ဲ ဲ ဲေအာင္ ္ ္ ္ ္ ္  ္ ္ ္   ္၏၏၏၏၏၏၏၏၏၏၏

to
ကဲကဲေအာင္၏

:D

in C++
while(*dstIdx++=*srcIdx++)
if(*&dstIdx[-1]==*srcIdx && isSingleChar(*srcIdx)){dstIdx--;
}else if(*&dstIdx[-1]==0x20 && isSingleChar(*srcIdx)){*&dstIdx--[-1]=*srcIdx;}
dstIdx,srcIdx ၂ခုလံုး INPUTSTR ကိုေထာက္ထားတဲ့ ပြိုင္တာျဖစ္ပါတယ္။

bool isSingleChar(wchar_t ch){
return ch==0x20 || (ch>=0x102b && ch<=0x103e) || (ch>=0x104a && ch<=0x1097)?true:false;
}
And, Technically, Its works on both Zawgyi and Unicode 5.1:-)

In Python
% python
>>> import cburglish
>>> cburglish.strip(INPUTSTR,Myanmar3)

Cheers,
Soe Min

Japanese Broadband Internet User use bandwidth 990Gbps

http://www.soumu.go.jp/s-news/2009/090227_3.html

Japanese Broadband Internet User use bandwidth 990Gbps in 2008, 1.2 times than 2007

Just FYI :-)

Ordering Fix or Reordering for Burmese Parts in C/C++

for example, က - ု - ိ နဲ့ က - ိ -ု ဆက္ေရးထားရင္ အတူတူလို့ျမင္ရပါတယ္။
ဒါေျကာင့္ ယူနီကုတ္ ၅.၁ မွာ ေျပာင္းျပန္ရိုက္မရေအာင္ လုပ္ထားတာရွိပါတယ္။

အဲတစ္ခု လက္ရွိ ေဇာ္ဂ်ီတို့ ဝင္းအင္းဝတို့နဲ့ ရိုက္ထားတဲ့ စာေတြသံုးခ်င္ရင္ ဘယ္လိုလုပ္မလဲဆိုတာရွိပါတယ္။
ျပန္စီဖို့ပဲ ရွိတာေပါ့။ လက္နဲ့ ျပန္စီမယ္ဆိုရင္ အစအဆံုး ျပန္ရိုက္တာထက္ ပိုျကာမယ့္ အေနအထားရွိပါတယ္။ စာေပါ္ေတာ့ မူတည္မယ္ေပါ့။

စိတ္တိုင္းအက်ဆံုး မဟုတ္ေပမယ့္ အလုပ္လုပ္ေပးနိုင္တဲ့ ကုတ္ေဟာဒီမွာပါ။ နဲနဲပဲ စမ္းရပါေသးတယ္။ ေရးထားတာ ၁ရက္ခြဲျကာပါတယ္။ ၅ ခါေလာက္အစအဆံုး ျပန္ေရးျပီးေနာက္ဆံုး ေခါင္းထဲက ထြက္လာတာ ဒါပါပဲ။
while(*++dstIdx){
if(vowel[*dstIdx]!=0){
lookbehind=-1;idx=0;
while(vowel[*&dstIdx[lookbehind]]!=0 && vowel[*&dstIdx[lookbehind]]>vowel[*dstIdx] )
lookbehind--;
if(++lookbehind<0){
ch=*dstIdx;
while(--idx>=lookbehind)
*&dstIdx[idx+1]=*&dstIdx[idx];
*&dstIdx[lookbehind]=ch;
}
}
}

dstIdx ဟာ ျပင္မယ့္ဟာ ကိုေထာက္ထားတဲ့ ပြိုင္တာျဖစ္ပါတယ္။
vowel ဆိုတာ -------ြ----ွ------------ါ----ာ----ိ----ီ----ု----ူ----ဲ----ံ----်----္----့---- array ေျဖစ္ပါတယ္။
သေဘာတရားအရကေတာ့ စာလံုးကို တစ္လံုးစီျကည့္သြားျပီး vowel ထဲမွာ ပါရင္ ေရွ့က စာလံုးေတြကို ျပန္စစ္ပါတယ္။ vowel အစီအစဉ္ အတိုင္းမဟုတ္ရင္ ျပန္စီပါတယ္။ အဲဒါပါပဲ။

Ported in Python like this
% python
>>> import cburglish
>>> cburglish.reorderFix(u"\u107E\u1000\u100A\u1037\u1039",Zawgyi)
u'\u107e\u1000\u100a\u1039\u1037'

\u107E\u1000\u100A\u1037\u1039 ဟာ ျကည့္ ဆိုတာကို ျကည---့--္ ဆိုျပီး အသတ္ျကားထဲမွာ ေအာက္ကျမစ္ဝင္ေနပါတယ္။
အဲတာကို ျကည---္--့ ျဖစ္ေအာင္ ျပင္ေပးပါတယ္။

က်ေနာ္ အရင္ က regex သံုးျပီးလုပ္ပါတယ္။ ဒါေပမယ့္ ဒီေလာက္ ျပန္စီတာေလာက္ကို regex နဲ့ လုပ္ရင္ overkill လုပ္ရာက်ပါတယ္။ ဒီကုတ္က က်ေနာ့္စက္မွာ regex ထက္ ၃ဆေလာက္ပိုျမန္ပါတယ္။
8MB ကို ၈ စကဿကန့္ျကာပါတယ္။ 1MB/s ေပါ့။ regex သံုးရင္ 8MB ကို ၂၂ စကဿကန့္ျကာပါတယ္။ ေဇာ္ဂ်ီကေန ျမန္မာ၃ ကိုေျပာင္းတဲ့ အခ်ိန္ပါျပီးျဖစ္ပါတယ္။ သူ့ခ်ည္းဆိုရင္ ၁စကဿကန့္ ေလာက္ပဲျကာသင့္ပါတယ္။ :D

cheers,
Soe Min

Syllable Breaker for Test as .exe file (Artistic License / GPLv3 for temporary:-)

For some people who want to test 10MB+/s syllable breaker :-)


http://burglish.my-mm.org/latest/trunk/syllable.7z


Its include python libaries

usage:
run in command prompt

syllable.exe zawgyi.txt 6

# 6 is magic code :P (Zawgyi currently, it is changing)

output:

zawgyi.out

# ps it is Artistic License / GPLv3 for temporary. It is FREE of charge.
# According to license, It should not be use in Commercial Applications. :-)
# License files should NOT be deleted for any reason.

Cheers,
Soe Min

大好きなアザラシ :D :D :D


ဤပံုကို http://headlines.yahoo.co.jp/hl?a=20090303-00000028-maiall-soci.view-000 မွကူယူးပါသည္။ ျကိုက္လြန္းလို့ပါ။ :D :D :D

more than 10MB / second speed for Syllable Breaker including file writing :-)

I have tested my C/C++ Syllable Breaker as python extension.

zawgyi.txt is 25 MB

% syllable.py zawgyi.txt 6
finish syllable break in 2516.0ms

# WinXP, Intel ATOM CPU 1.6GHz Laptop

Cheers,
Soe Min

Simplest and Fastest way to Break Syllables for Zawgyi-One in Pure C/C++

Here is some texts from Ko Nyi Lynn Seck's Blog.

က်ြန္ေတာ္ ေတာ္ေတာ္ေလး စိတ္ပ်က္ေနပါတယ္။ က်ြန္ေတာ္တို့ ရပ္ကြက္မွာ မီးမလာတာ အရမ္းျကာေနျပီ။ ဒါေတာင္ တိုက္က ကိုယ့္မီးစက္နဲ့ကိုယ္ ညေန ၆နာရီကေန ၁၁နာရီအထိ ေပးထားလို့ မီးေလး ေတြ့ေတြ့ေနရတာ။ လ်ွပ္စစ္က လူေတြကလည္း တကယ္လည္တယ္။ တစ္ရက္လံုး မီးပ်က္ေနတယ္ မျဖစ္ေအာင္ေတာ့ လာရမယ့္ အခ်ိန္ဆို ၁ဝမိနစ္ ၁၅မိနစ္ေလာက္ ခဏ လြွတ္ေပးလိုက္တယ္။ ျပီးရင္ ပ်က္ကေရာ။ တကယ္ကို ၁ဝမိနစ္ ၁၅မိနစ္ပါပဲ။ အဲဒီေတာ့ ေန့စဉ္ရက္ဆက္ မီးပ်က္တယ္ဆိုတာ မျဖစ္ေတာ့ဘူးေပါ့။ ည ၁၁နာရီဆိုတာ တကယ္ေတာ့ က်ြန္ေတာ္တို့လို လူေတြ အလုပ္လုပ္စလုပ္တဲ့ အခ်ိန္ပါ။ အခုေတာ့ ဘာမွ မတတ္နိုင္ဘူး။ အိပ္ယာထဲ ဝင္ရတာပဲ။ ျကာလာေတာ့ လူမမာ တစ္ေယာက္လို ကိုယ့္ကိုကိုယ္ေတာင္ စိတ္ပ်က္လာတယ္။ မအိပ္ခ်င္ဘဲ အိပ္ေနရတဲ့ဘဝ။ ဘာမွထူးျခားမလာတဲ့ အရာေတြကိုလည္း ေျပာမေနခ်င္ေတာ့ဘူး။ မေျပာခ်င္ဘူးဆိုတာက ေျပာခ်င္စိတ္ကို ကုန္သြားတာ။ မီးပ်က္ေတာ့ ဖုန္းအိပ္ခ်ိန္းေတြပါ လိုက္ပ်က္တယ္။ ဖုန္းအိပ္ခ်ိန္းပ်က္ေတာ့ အင္တာနက္လိုင္းပါ သံုးမရေတာ့ဘူး။ ကဲက်ြန္ေတာ္ ဘာလုပ္ရမလဲ။ အဲဒီေနရာမွာ ဒီအျဖစ္မ်ိုးေတြကို မခံစားဖူးရင္ ဒါမ်ိုး က်ြန္ေတာ္တို့ရဲ့ စိတ္ပ်က္မွုနဲ့ ဒုကဿခေတြကို ဘယ္လိုမွ နားလည္မွာ မဟုတ္ဘူး။ 

output is

က်ြန္|ေတာ္| |ေတာ္|ေတာ္|ေလး| |စိတ္|ပ်က္|ေန|ပါ|တယ္|။| |က်ြန္|ေတာ္|တို့| |ရပ္|ကြက္|မွာ| |မီး|မ|လာ|တာ| |အ|ရမ္း|ျကာ|ေန|ျပီ|။| |ဒါ|ေတာင္| |တိုက္|က| |ကို|ယ့္|မီး|စက္|နဲ့|ကိုယ္| |ည|ေန| |၆|နာ|ရီ|က|ေန| |၁၁|နာ|ရီ|အ|ထိ| |ေပး|ထား|လို့| |မီး|ေလး| |ေတြ့|ေတြ့|ေန|ရ|တာ|။| |လ်ွပ္|စစ္|က| |လူ|ေတြ|က|လည္း| |တ|ကယ္|လည္|တယ္|။| |တစ္|ရက္|လံုး| |မီး|ပ်က္|ေန|တယ္| |မ|ျဖစ္|ေအာင္|ေတာ့| |လာ|ရ|မ|ယ့္| |အ|ခ်ိန္|ဆို| |၁၀|မိ|နစ္| |၁၅|မိ|နစ္|ေလာက္| |ခ|ဏ| |လြွတ္|ေပး|လိုက္|တယ္|။| |ျပီး|ရင္| |ပ်က္|က|ေရာ|။| |တ|ကယ္|ကို| |၁၀|မိ|နစ္| |၁၅|မိ|နစ္|ပါ|ပဲ|။| |အဲ|ဒီ|ေတာ့| |ေန့|စဉ္|ရက္|ဆက္| |မီး|ပ်က္|တယ္|ဆို|တာ| |မ|ျဖစ္|ေတာ့|ဘူး|ေပါ့|။| |ည| |၁၁|နာ|ရီ|ဆို|တာ| |တ|ကယ္|ေတာ့| |က်ြန္|ေတာ္|တို့|လို| |လူ|ေတြ| |အ|လုပ္|လုပ္|စ|လုပ္|တဲ့| |အ|ခ်ိန္|ပါ|။| |အ|ခု|ေတာ့| |ဘာ|မွ| |မ|တတ္|နိုင္|ဘူး|။| |အိပ္|ယာ|ထဲ| |ဝင္|ရ|တာ|ပဲ|။| |ျကာ|လာ|ေတာ့| |လူ|မ|မာ| |တစ္|ေယာက္|လို| |ကို|ယ့္|ကို|ကိုယ္|ေတာင္| |စိတ္|ပ်က္|လာ|တယ္|။| |မ|အိပ္|ခ်င္|ဘဲ| |အိပ္|ေန|ရ|တဲ့|ဘ|ဝ|။| |ဘာ|မွ|ထူး|ျခား|မ|လာ|တဲ့| |အ|ရာ|ေတြ|ကို|လည္း| |ေျပာ|မ|ေန|ခ်င္|ေတာ့|ဘူး|။| |မ|ေျပာ|ခ်င္|ဘူး|ဆို|တာ|က| |ေျပာ|ခ်င္|စိတ္|ကို| |ကုန္|သြား|တာ|။| |မီး|ပ်က္|ေတာ့| |ဖုန္း|အိပ္|ခ်ိန္း|ေတြ|ပါ| |လိုက္|ပ်က္|တယ္|။| |ဖုန္း|အိပ္|ခ်ိန္း|ပ်က္|ေတာ့| |အင္|တာ|နက္|လိုင္း|ပါ| |သံုး|မ|ရ|ေတာ့|ဘူး|။| |ကဲ|က်ြန္|ေတာ္| |ဘာ|လုပ္|ရ|မ|လဲ|။| |အဲ|ဒီ|ေန|ရာ|မွာ| |ဒီ|အ|ျဖစ္|မ်ိုး|ေတြ|ကို| |မ|ခံ|စား|ဖူး|ရင္| |ဒါ|မ်ိုး| |က်ြန္|ေတာ္|တို့|ရဲ့| |စိတ္|ပ်က္|မွု|နဲ့| |ဒုကဿခ|ေတြ|ကို| |ဘယ္|လို|မွ| |နား|လည္|မွာ| |မ|ဟုတ္|ဘူး|။| 

while(*dstIdx++=*srcIdx++){
changed=(isBurmese(*srcIdx)-isBurmese(*(&srcIdx[-1])))!=0?true:changed;
changed=(isStandAloneCharZawgyi(*srcIdx)-isStandAloneCharZawgyi(*(&srcIdx[-1])))!=0?true:changed;
separated=(*srcIdx>=0x1000 && *srcIdx<=0x1029) || *srcIdx==0x1031 || *srcIdx==0x103b || (*srcIdx>=0x107e && *srcIdx<=0x1084) || *srcIdx==0x108f || *srcIdx==0x1090 || *srcIdx==0x106a || *srcIdx==0x106b ?true:false;
if(separated || changed){
if( *(&srcIdx[1])!=0x1039 && !(*(&srcIdx[1])>=0x1060 && *(&srcIdx[1])<=0x107c) && *(&srcIdx[1])!=0x1085 && *(&srcIdx[1])!=0x1093 && *(&srcIdx[-1])!=0x1031 && *(&srcIdx[-1])!=0x103b && !(*(&srcIdx[-1])>=0x107e && *(&srcIdx[-1])<=0x1084) ){
sepIdx=sep;while(*dstIdx++=*sepIdx++);dstIdx--;
}
if(changed)changed=false;
}
}

Well Its more complicated than Unicode 5.1, since Zawgyi is using various unicode points.

*srcIdx ဟာ input string, *dstIndx ဟာ output string ကို ေထာက္ထားတဲ့ ပြိုင္တာျဖစ္ပါတယ္။
*sepIdx ဟာ ျကားမွာ ခံခ်င္တဲ့ | ကိုေထာက္ထားတာျဖစ္ပါတယ္။ အျခား xXx |x| စတာေတြနဲ့ လဲလို့ရပါတယ္။
isBurmese ဟာ \u1000 ကေန \u109f (ျမန္စာ စာလံုးေနရာ) ဟုတ္မဟုတ္စစ္တာျဖစ္ပါတယ္။
isStandAloneChar ဟာ "၍ဤ၌၏" စတဲ့ တစ္လံုးတည္းရွိတဲ့ စာလံုးဟုတ္မဟုတ္စစ္ပါတယ္။

bool isStandAloneCharZawgyi(wchar_t ch){
return (ch==0x1024 || ch==0x102a ||
(ch>=0x104a && ch<=0x104f))?true:false;
}

အဲဒီဟာကို Python ကို ေျပာင္းျပီး ေဟာဒီလိုေရးပါတယ္။

% python
>>> import cburglish
>>> print cburglish.syllable(INPUTSTR,Zawgyi,u"|")

:D
A bit more complicated strings with PaLi Language

၁။ ယံ ဒုနဿနိမိတဿတံ အဝမဂဿငလဥဿစ၊
ေယာ စာ မနာေပါ သကုဏသဿသ သေဒဿဒါ။
ပါပဂဿဂေဟာ ဒုသဿသုပိနံ အကနဿတံ၊
ဗုဒဿဓါနုဘာဝေန ဝိနသ ေမနဿတု။

၂။ ယံ ဒုနဿနိမိတဿတံ အဝမဂဿငလဥဿစ၊
ေယာ စာ မနာေပါ သကုဏသဿသ သဒဿဒါ။
ပါပဂဿဂေဟာ ဒုသဿသုပိနံ အကနဿတံ၊
ဓမဿမာ နုဘာဝေန ဝိနာသ ေမနဿတု။

၃။ ယံ ဒုနဿနိမိတဿတံ အဝမဂဿငလဥဿစ၊
ေယာ စာ မနာေပါ သကုဏသဿသ သေဒဿဒါ။
ပါပဂဿဂေဟာ ဒုသဿသုပိနံ အကနဿတံ၊
သံဃာနုဘာဝေန ဝိနာသ ေမနဿတု။ 

to

|၁|။| |ယံ| |ဒုနဿနိ|မိတဿတံ| |အဝ|မဂဿင|လဥဿစ|၊|
|ေယာ| |စာ| |မ|နာ|ေပါ| |သ|ကု|ဏသဿသ| |သ|ေဒဿဒါ|။|
|ပါ|ပဂဿဂ|ေဟာ| |ဒုသဿသု|ပိ|နံ| |အ|ကနဿတံ|၊|
|ဗုဒဿဓါ|နု|ဘာ|၀|ေန| |ဝိ|န|သ| |ေမနဿတု|။|

|၂|။| |ယံ| |ဒုနဿနိ|မိတဿတံ| |အဝ|မဂဿင|လဥဿစ|၊|
|ေယာ| |စာ| |မ|နာ|ေပါ| |သ|ကု|ဏသဿသ| |သဒဿဒါ|။|
|ပါ|ပဂဿဂ|ေဟာ| |ဒုသဿသု|ပိ|နံ| |အ|ကနဿတံ|၊|
|ဓမဿမာ| |နု|ဘာ|၀|ေန| |ဝိ|နာ|သ| |ေမနဿတု|။|

|၃|။| |ယံ| |ဒုနဿနိ|မိတဿတံ| |အ|ဝ|မဂဿင|လဥဿစ|၊|
|ေယာ| |စာ| |မ|နာ|ေပါ| |သ|ကု|ဏသဿသ| |သ|ေဒဿဒါ|။|
|ပါ|ပဂဿဂ|ေဟာ| |ဒုသဿသု|ပိ|နံ| |အ|ကနဿတံ|၊|
|သံ|ဃာ|နု|ဘာ|၀|ေန| |ဝိ|နာ|သ| |ေမနဿတု|။| 

# အမွားအယြင္းရွိမယ္ဆိုရင္ ကူညီေျပာျပေပးနိုင္ပါတယ္။
# ကိုညီလင္းဆက္ကို အထူးေက်းဇူးတင္ရွိသည္။

Cheers,
Soe Min

Simplest and Fastest way to Break Syllables for Unicode 5.1 in Pure C/C++

Here is some texts from Ko Nyi Lynn Seck's Blog.

က်ြန္ေတာ္ ေတာ္ေတာ္ေလး စိတ္ပ်က္ေနပါတယ္။ က်ြန္ေတာ္တို့ ရပ္ကြက္မွာ မီးမလာတာ အရမ္းျကာေနျပီ။ ဒါေတာင္ တိုက္က ကိုယ့္မီးစက္နဲ့ကိုယ္ ညေန ၆နာရီကေန ၁၁နာရီအထိ ေပးထားလို့ မီးေလး ေတြ့ေတြ့ေနရတာ။ လ်ွပ္စစ္က လူေတြကလည္း တကယ္လည္တယ္။ တစ္ရက္လံုး မီးပ်က္ေနတယ္ မျဖစ္ေအာင္ေတာ့ လာရမယ့္ အခ်ိန္ဆို ၁ဝမိနစ္ ၁၅မိနစ္ေလာက္ ခဏ လြွတ္ေပးလိုက္တယ္။ ျပီးရင္ ပ်က္ကေရာ။ တကယ္ကို ၁ဝမိနစ္ ၁၅မိနစ္ပါပဲ။ အဲဒီေတာ့ ေန့စဉ္ရက္ဆက္ မီးပ်က္တယ္ဆိုတာ မျဖစ္ေတာ့ဘူးေပါ့။ ည ၁၁နာရီဆိုတာ တကယ္ေတာ့ က်ြန္ေတာ္တို့လို လူေတြ အလုပ္လုပ္စလုပ္တဲ့ အခ်ိန္ပါ။ အခုေတာ့ ဘာမွ မတတ္နိုင္ဘူး။ အိပ္ယာထဲ ဝင္ရတာပဲ။ ျကာလာေတာ့ လူမမာ တစ္ေယာက္လို ကိုယ့္ကိုကိုယ္ေတာင္ စိတ္ပ်က္လာတယ္။ မအိပ္ခ်င္ဘဲ အိပ္ေနရတဲ့ဘဝ။ ဘာမွထူးျခားမလာတဲ့ အရာေတြကိုလည္း ေျပာမေနခ်င္ေတာ့ဘူး။ မေျပာခ်င္ဘူးဆိုတာက ေျပာခ်င္စိတ္ကို ကုန္သြားတာ။ မီးပ်က္ေတာ့ ဖုန္းအိပ္ခ်ိန္းေတြပါ လိုက္ပ်က္တယ္။ ဖုန္းအိပ္ခ်ိန္းပ်က္ေတာ့ အင္တာနက္လိုင္းပါ သံုးမရေတာ့ဘူး။ ကဲက်ြန္ေတာ္ ဘာလုပ္ရမလဲ။ အဲဒီေနရာမွာ ဒီအျဖစ္မ်ိုးေတြကို မခံစားဖူးရင္ ဒါမ်ိုး က်ြန္ေတာ္တို့ရဲ့ စိတ္ပ်က္မွုနဲ့ ဒုကဿခေတြကို ဘယ္လိုမွ နားလည္မွာ မဟုတ္ဘူး။ 

output is
က်ြန္|ေတာ္| |ေတာ္|ေတာ္|ေလး| |စိတ္|ပ်က္|ေန|ပါ|တယ္|။| |က်ြန္|ေတာ္|တို့| |ရပ္|ကြက္|မွာ| |မီး|မ|လာ|တာ| |အ|ရမ္း|ျကာ|ေန|ျပီ|။| |ဒါ|ေတာင္| |တိုက္|က| |ကိုယ့္|မီး|စက္|နဲ့|ကိုယ္| |ည|ေန| |၆|နာ|ရီ|က|ေန| |၁၁|နာ|ရီ|အ|ထိ| |ေပး|ထား|လို့| |မီး|ေလး| |ေတြ့|ေတြ့|ေန|ရ|တာ|။| |လ်ွပ္|စစ္|က| |လူ|ေတြ|က|လည္း| |တ|ကယ္|လည္|တယ္|။| |တစ္|ရက္|လံုး| |မီး|ပ်က္|ေန|တယ္| |မ|ျဖစ္|ေအာင္|ေတာ့| |လာ|ရ|မယ့္| |အ|ခ်ိန္|ဆို| |၁၀|မိ|နစ္| |၁၅|မိ|နစ္|ေလာက္| |ခ|ဏ| |လြွတ္|ေပး|လိုက္|တယ္|။| |ျပီး|ရင္| |ပ်က္|က|ေရာ|။| |တ|ကယ္|ကို| |၁၀|မိ|နစ္| |၁၅|မိ|နစ္|ပါ|ပဲ|။| |အဲ|ဒီ|ေတာ့| |ေန့|စဉ္|ရက္|ဆက္| |မီး|ပ်က္|တယ္|ဆို|တာ| |မ|ျဖစ္|ေတာ့|ဘူး|ေပါ့|။| |ည| |၁၁|နာ|ရီ|ဆို|တာ| |တ|ကယ္|ေတာ့| |က်ြန္|ေတာ္|တို့|လို| |လူ|ေတြ| |အ|လုပ္|လုပ္|စ|လုပ္|တဲ့| |အ|ခ်ိန္|ပါ|။| |အ|ခု|ေတာ့| |ဘာ|မွ| |မ|တတ္|နိုင္|ဘူး|။| |အိပ္|ယာ|ထဲ| |ဝင္|ရ|တာ|ပဲ|။| |ျကာ|လာ|ေတာ့| |လူ|မ|မာ| |တစ္|ေယာက္|လို| |ကိုယ့္|ကို|ကိုယ္|ေတာင္| |စိတ္|ပ်က္|လာ|တယ္|။| |မ|အိပ္|ခ်င္|ဘဲ| |အိပ္|ေန|ရ|တဲ့|ဘ|ဝ|။| |ဘာ|မွ|ထူး|ျခား|မ|လာ|တဲ့| |အ|ရာ|ေတြ|ကို|လည္း| |ေျပာ|မ|ေန|ခ်င္|ေတာ့|ဘူး|။| |မ|ေျပာ|ခ်င္|ဘူး|ဆို|တာ|က| |ေျပာ|ခ်င္|စိတ္|ကို| |ကုန္|သြား|တာ|။| |မီး|ပ်က္|ေတာ့| |ဖုန္း|အိပ္|ခ်ိန္း|ေတြ|ပါ| |လိုက္|ပ်က္|တယ္|။| |ဖုန္း|အိပ္|ခ်ိန္း|ပ်က္|ေတာ့| |အင္|တာ|နက္|လိုင္း|ပါ| |သံုး|မ|ရ|ေတာ့|ဘူး|။| |ကဲ|က်ြန္|ေတာ္| |ဘာ|လုပ္|ရ|မ|လဲ|။| |အဲ|ဒီ|ေန|ရာ|မွာ| |ဒီ|အ|ျဖစ္|မ်ိုး|ေတြ|ကို| |မ|ခံ|စား|ဖူး|ရင္| |ဒါ|မ်ိုး| |က်ြန္|ေတာ္|တို့|ရဲ့| |စိတ္|ပ်က္|မွု|နဲ့| |ဒုကဿခ|ေတြ|ကို| |ဘယ္|လို|မွ| |နား|လည္|မွာ| |မ|ဟုတ္|ဘူး|။| 

while(*dstIdx++=*srcIdx++){
changed=(isBurmese(*srcIdx)-isBurmese(*(&srcIdx[-1])))!=0?true:changed;
changed=(isStandAloneChar(*srcIdx)-isStandAloneChar(*(&srcIdx[-1])))!=0?true:changed;
separated=(*srcIdx>=0x1000 && *srcIdx<=0x1027)?true:false;
if(separated || changed){
if(*(&srcIdx[-1])!=0x1039 && *(&srcIdx[1])!=0x1039 && *(&srcIdx[1])!=0x103A){
sepIdx=sep;while(*dstIdx++=*sepIdx++);dstIdx--;
}
if(changed)changed=false;
}
}
*srcIdx ဟာ input string, *dstIndx ဟာ output string ကို ေထာက္ထားတဲ့ ပြိုင္တာျဖစ္ပါတယ္။
*sepIdx ဟာ ျကားမွာ ခံခ်င္တဲ့ | ကိုေထာက္ထားတာျဖစ္ပါတယ္။ အျခား xXx |x| စတာေတြနဲ့ လဲလို့ရပါတယ္။
isBurmese ဟာ \u1000 ကေန \u109f (ျမန္စာ စာလံုးေနရာ) ဟုတ္မဟုတ္စစ္တာျဖစ္ပါတယ္။
isStandAloneChar ဟာ "၍ဤ၌၏" စတဲ့ တစ္လံုးတည္းရွိတဲ့ စာလံုးဟုတ္မဟုတ္စစ္ပါတယ္။
bool isBurmese(wchar_t ch){
return (ch>=0x1000 && ch<=0x109f)?true:false;
}
bool isStandAloneChar(wchar_t ch){
return (ch==0x1024 || ch==0x102a ||
(ch>=0x104a && ch<=0x104d) || ch==0x104f)?true:false;
}
အဲဒီဟာကို Python ကို ေျပာင္းျပီး ေဟာဒီလိုေရးပါတယ္။
% python
>>> import cburglish
>>> print cburglish.syllable(INPUTSTR,Myanmar3,u"|")
:D

# Zawgyi အတြက္ လာပါဦးမည္။ :-)
# ကိုညီလင္းဆက္ကို အထူးေက်းဇူးတင္ရွိသည္။

Cheers,
Soe Min

Parts of Myanmar Syllables (only Non-Consonents)

--ာ ါ --ိ- --ီ- --ု- --ူ- ​-- --ဲ- --ံ- --့- --း --ျ --- -ွ-- --- ---

အြားေလံုးပါငးေျ ၁၆လံုးဝျနးကငြျပဲရိတယျ။ ာ နဲ့ ါ ကို တစျခုတျညးအနနဲ့ေထားရငျ ၁၅ လံုး။

ပတျဆျင့အတကျ \u1039 ထျည့ထားရငျတာငေျ ၁၆လံုး ဒါဆို 2 Bytes Integer အနနဲ့ေ Flag ထာငေျလို့ရနိုငျတယျ။

စာလံုးတစျလံုးနဲ့တစျလံုး ဘယျလာကေျတူသလဲ တိုကျစစျတဲ့အခါ အသံုးဝငျနိုငျမလားပဲ။

Unicode 5.1 နဲ့ ဒတာေကို အခွခံေထားတဲ့ Spell Correction လးတေစျခု ရရငျကာငးေျမယျ။

အိုငျဒီယာလးတေ စုေနတေယျ။ အိုငျဒီယာ ရိသူမား မြဝြနိုေငျပါသညျ။

Why reordering is needed in Burmese Syllables and How to fix with Regex (Javascript,Python,C/C++)

Why reordering is needed in Burmese Syllables? and How to fix with Regex

For example if can type “ko” with က___ိ__ု or က__ု__ိ

But its not good idea, right? You cannot do like that in English, for example “use” and “ues”

And even in Unicode 5.1, Vowel E like သဝထိုးေ are after the consonant like က to အ,
“က ” for “ကေ”

so I collected the data and get the following ordering list for Unicode 5.1

-------ွ----------------ါ----ာ----ိ----ီ----ု----ူ----ဲ----ံ----ျ----်----့----

#ps ---း--- will need at the end according to theory (I skipped that because I never find the person who type း before others, may b I didnt know Ma KOM at that time :P)

Its mean ----ွ-------- come first than

so what I’ve done is to reorder the following patterns.

([_ွ____ါ_ာ_ိ_ီ_ု_ူ_ဲ_ံ_ျ_်_့]+__)(____)
([____ါ_ာ_ိ_ီ_ု_ူ_ဲ_ံ_ျ_်_့]+__)(__ွ__)
([___ါ_ာ_ိ_ီ_ု_ူ_ဲ_ံ_ျ_်_့]+__)(____)
([__ါ_ာ_ိ_ီ_ု_ူ_ဲ_ံ_ျ_်_့]+__)(____)
([_ါ_ာ_ိ_ီ_ု_ူ_ဲ_ံ_ျ_်_့]+__)(____)
([_ာ_ိ_ီ_ု_ူ_ဲ_ံ_ျ_်_့]+__)(__ါ__)
([_ိ_ီ_ု_ူ_ဲ_ံ_ျ_်_့]+__)(__ာ__)
([_ီ_ု_ူ_ဲ_ံ_ျ_်_့]+__)(__ိ__)
([_ု_ူ_ဲ_ံ_ျ_်_့]+__)(__ီ__)
([_ူ_ဲ_ံ_ျ_်_့]+__)(__ု__)
([_ဲ_ံ_ျ_်_့]+__)(__ူ__)
([_ံ_ျ_်_့]+__)(__ဲ__)
([_ျ_်_့]+__)(__ံ__)
([_်_့]+__)(__ျ__)

To get that list Javascript need to done like this
for(var i=0;i<vowel.length-2;i++){
var re=eval("/(["+vowel.slice(i+1).join("")+"]+)("+vowel[i]+")/g"__);
}

in python, its more easy like this in one line,
ps# Don’t tell me its complicated, I like obfuscated codes : - )
["("+"".join(vowel[vowel.index(x)+1:])+")("+x+")" for x in vowel]

in C|C++, have to do a bit more things.
for(int i=0;i<vowel_len-1;i++){
wchar_t *restr = new wchar_t[40];
sprintf(restr, L"([%s]+)(%c)", &vowel[i+1], &vowel[i]);

Regex re(restr,true);
if(re.test(content)){
re.sub(content,L"\2\1",content);
}
#ps That Regex function is 100% my own regex engine written in C++.

with that rules, replace / sub to $2$1 / \2\1 will get correct order.

Ps# I ve put extra underscores ___ on the codes, to see it clearly on screen, you should remove all of that characters.

And, This is the one I use in Burglish Web Input System to Correct Syntaxes.

Cheers,
Soe Min

Javascript Shell

Most decent script engine has a shell like Python / Ruby to test it.

There is one for Javascript also. Its nice.

http://www.squarefree.com/shell/shell.html

Links for Burglish Web Input System v1.9

Latest
http://burglish.googlepages.com/testarea.htm
http://burglish.my-MM.org/latest/trunk/web/testarea.htm

Previous One v1.8
http://burglish.my-MM.org/releases/1.8/testarea.htm

Test for Burglish Menu (Phonetic Menu), Its really fast! :-)

Cheers,

Burglish Web Input System 1.9 Features

Burglish Web Input System 1.9 Features Compared to current version 1.8

- Rewritten Word generator from Phonetic menu (Burglish Menu), gets 5 to 10 times faster than version 1.8 (only phonetic menu mode)

- Fix - Ctrl+Alt+Shift sequence not working in version 1.8 for Direct Input (Typewriter Input).
eg., Ctrl+Alt+Shift+5 ဪ, Ctrl+Alt+Shift+4 ဣ

- Improved (I said Improved :D, not 100% fix, it can fix 50% to 90% of original texts) "Syntax Correct" features like for eg. some texts from Ma KOM Blog.(I hope you forgive me) :P

အျခိန်ဆွဲထားတာ့ေ အခိျန်ကုန်တာပါ့ေ။ အဲဒီတာ့ေကြားထဲ မာ မာေင်ကာေျင်းသား အနေနဲ့ မန်မန် ကြူနေပးေဘို့တာ့ေလိုအပ်တာပါ့ေ။ ဖံုးဘိူးကုန်တယ် လို့ ပြာေချင်သးေလို့လား။ ဒီအျခိန်ဘဲ ယာေက်ျက်ာလးေျမား ကို အနိုင်ရတာပ်ါ။ တသက်လံူး အပိုးျကီူး ျကိူးနေ သွား ရတာ့ေမာ ။ သူတို့က ရပြီ:ရင်တ်ာေ အိလ်ာေျ အီ ထိုး ထားချင်ကြတာပါ။ 
to
အျခိန်ဆွဲထားတာ့ေ အျခိန်ကုန်တာပါ့ေ။ အဲဒီတာ့ေကြားထဲ မာမာေင်ကာေျင်းသား အနေနဲ့ မန်မန်ကြူနေပးေဘို့တာ့ေလိုအပ်တာပါ့ေ။ ဖံုးဘိုးကုန်တယ် လို့ပြာေချင်သးေလို့လား။ ဒီအျခိန်ဘဲယာေက်ျက်ာလးေျမား ကို အနိုင်ရတာပ်ါ။ တသက်လံုး အပိုးျကီူး ျကိုးနေ သွား ရတာ့ေမာ ။ သူတို့က ရပြီ:ရင်တ်ာေ အိလ်ာေျ အီ ထိုး ထားချင်ကြတာပါ။

I will post Link for new version soon :-)

က်ေနာ္ဖတ္ေသာ အျခား ဘေလာ့ / ဆိုဒ္မ်ား