Wednesday, 28 November 2018

CMU Dictionary Adaptation to Bahasa Indonesia Lexicon Building

While creating lexicon in voice recognition in Bahasa Indonesia, we need to define the phoneme set by ourselves since there are not such a widely used standard in Bahasa Indonesia. Instead of creating new definition, there is an idea to adapt from existing phoneme set. Obtained from Kaldi resources, we can adapt the phoneme set from English issued by Carnegie Mellon University (CMU Dictionary) which contains 134,000 words.

Bahasa Indonesia is quite simplelook here also as in major case the pronunciation and written letter are the same compared to English. Thus, it is not a tedious work to start building lexicon based on CMU Dictionary although we need to add new phonemes and leave some phonemes.

Table 1 CMU Dictionary Phoneme Set

Phoneme IPA Symbol Indonesian Words Example English Words Example
AA ɑ ternak, gembala odd, balm
AE æ - at, bat
AH ʌ ambil hut, butt
AO ɔ bakpao cow, story
AW saung ought, bout
AY kait, senarai hide, bite
B b lebah, beli bee, buy
CH cuka, ceri cheese, china
D d diam, duduk dump, did
DH ð ridho the, thy
EH ɛ enak, sepak education, bet
ER ɝ bageur*, reueus* hurt
EY - ate, bait
F ɾ faedah, fana fee, forest
G g gerbang, guna green, gate
HH h hampar, unggah he, hair
IH ɪ singgah, ikatan it, implication
IY i - eat, sheep
JH adiraja, keganjilan genuine, jimmy
K k kenangan, batuk key, camp
L l lingkaran, betul luck, love
M m minum, temaram mama, mine
N n naik, menikah knee, nice
NG ŋ yang, ngengat bank, sink
OW bongkar, bogor oat, boat
OY ɔɪ - toy, boy
P p pulsa, peluh pulp, pen
R ɹ ranjau, rintangan right, row
S s sakit, sayang sea, sun
SH ʃ masyarakat, syaikh* shine, she
T t tikung, timpa tea, tone
TH θ rabiul tsani* thug, theta
UH ʊ - hood, book
UW u kuku, suku two, coup
V v viral, vas vee, vocal
W w wejangan, wayang we, wide
Y j yakin, yoga yam, yield
Z z zaman, zamrud zoo, zee
ZH ʒ jangkrik, jerapah seizure, pleasure

From table above, it’s clear that there are phonemes that are not (commonly) used in Bahasa Indonesia. Yet these phoneme set does not cover all Bahasa Indonesia lemma regarding to the root of Bahasa Indonesia which come from majorly Malay, Dutch, Arabic, Chinese, Javanese, and Sundanese. To create the things short, here is list of phonemes that needs to be added to CMU Dictionary for Bahasa Indonesia

Table 2 Addition Phoneme Set

Phoneme IPA Symbol Indonesian Words Example Notes
NY ɲ kenyang, nyamuk alveolo palatal
KH x kholifah voiceless velar fricative
Q ʔ qurban
KX ʕ sa’at voiced pharyngeal fricative
DL dhuhur voiced alveolar sibilant with pharyngealization
GH ɣ ghaib voiced velar fricative

sources :
[1] http://kaldi-asr.org/doc/examples.html
[2] http://www.speech.cs.cmu.edu/cgi-bin/cmudict
[3] https://en.wikipedia.org/wiki/ARPABET
[4] https://open-dict-data.github.io/ipa-lookup/ma/

Saturday, 30 December 2017

Kalender Puasa 2018

Kalender Puasa 2018

Dari Abu Hurairah ra., bahwa Nabi shallallahu alaihi wasallam bersabda:

Demi Dzat yang jiwa Muhammad berada di tangan-Nya, sesungguhnya bau mulut orang yang berpuasa lebih harum di sisi Allah pada hari kiamat daripada bau misk atau kasturi. Dan bagi orang yang berpuasa ada dua kegembiraan, ketika berbuka mereka bergembira dengan bukanya dan ketika bertemu Allah mereka bergembira karena puasanya.”

(HR. Bukhari dan Muslim)

Maka saya hadiahkan, terutama untuk diri sendiri, saudara dan saudariku sebagai pengingat Kalender Puasa 2018 yang dapat diunduh di

Versi bahasa Indonesia

PNG : https://goo.gl/T7Nw6C

PDF : https://goo.gl/EDbgmk

English Version

PNG : https://goo.gl/UZuKsW

PDF : https://goo.gl/qbtQA6

Semoga Allah memberikan kemudahan dan menerima semua amal ibadah kita. Tiada daya dan upaya melainkan dari Allah. Silakan untuk disebarkan kepada keluarga dan kerabat.

Jazakumullahu khairan katsiran.

NB:

1. Kalender ini hanya sebagai perkiraan. Jika di kemudian hari terdapat selisih tanggal, harap menyesuaikan dengan penanggalan yang sesuai.

2. Korespondensi lebih lanjut, mohon melalui www.github.com/linerocks/FastingCalendar2018 di kolom issues

Muslim Fasting Calendar 2018

Muslim Fasting Calendar 2018

The Prophet Muhammad , peace be upon him, said :

By Him in Whose Hands my soul is, the smell coming out from the mouth of fasting person is better in sight of Allah than the smell of musk. (allah says about the fasting person), “He has left his food, drink, and desires for My Sake. The fast is for Me. So I will reward (the fasting person) for it and the reward of good deeds is multiplied ten times.”

^reference : Sahih al-Bukhari 1894^

So , I present to, especially myself, my brother, and sister as a reminder this Muslim Fasting Calendar 2018 which can be obtained in this repository or simply download at :

English Version

PNG : https://goo.gl/UZuKsW

PDF : https://goo.gl/qbtQA6

Bahasa Version

PNG : https://goo.gl/T7Nw6C

PDF : https://goo.gl/EDbgmk

May Allah grant us ease to do good deeds and accept our good deeds. There is no power and no strength except with Allah. Feel free to share to relatives and family.

Jazakumullahu khairan katsiran.

NB:

1. This calendar is only a prediction. If you find any unmatch date, please adjust with the correct one.

2. If you have issues related to this, please kindly contact me via www.github.com/linerocks/FastingCalendar2018 on tab issues

Wednesday, 20 December 2017

Matrix Construction in C++ using Armadillo

Matrix Construction in C++ using Armadillo

As a follow-through of vector, we go on matrix construction. Starting from the definition, matrix is a rectangular array of numbers, symbols, or expressions, arranged in rows and columns. The individual items in an matrix often denoted by or so-called elements, where is row index and is column index.

Because of there is no container for matrix in C/C++ standard library, let’s make our way construction matrix. In C we could use pointer of array or pointer of pointer as follows :

int m = 4, n = 3, i;

// Using pointer of array
int *B[m];
for (i = 0; i < m; i++) {
    A[i] = (int *) calloc(n, sizeof(int));
}

// Using pointer of pointer
int **B = (int **) calloc(m, sizeof(int *));
for (i = 0; i < m; i++) {
    B[i] = (int *) calloc(n, sizeof(int)); 
}