Pencarian Nama yang Memuliki Kesamaan Fonetik Menggunakan Metode Kesamaan String

INDRA KALIANA. Pencarim Nama Yaug Me~uilikiKesau~amFonetik Me11gg1111akmMetode Kesamaan
Sir~~ilarily
Using SI~'ir~gn/lachi~?gAlgorif/?~~r).
Dibilnbing Oleh
String. (Nar~reSearching Based 011 Pl?o~?elic
JULIO ADISANTOSO dau ABDURRAUF RAMBE.
Iiesamaa~fonetik men~pakanukurai~k e s a n ~ a ayang
~ ~ sangat tergillltung pada bahasa y a ~ gdigt~ulakan.
Algorilme So~~udex
d m Phonis adalal~metode yaug tcrke~x~l
uutuk menibandingkan kata deugan
nie~~il~erllatika~
kkesa~~laaufonetik. Dalani penerapan pada bahasa Indonesia, kedua ~ ~ ~ e t otersebut
de
me~idal~atka~
~iiasalalijika uielakukai pencariai terhadap ilania y a ~ gniasih n~euggu~~akau
e j a a ~l m ~ a .
Penelitian ini berlujuan uutuk menerapku~neto ode kess~uaauslriug pada pencluimi llama yailg n~emiliki
kesamaan fonetik d m ~ ~ ~ l e ~ i b a ~ ~due
dii~
algorit~ne

g k a ~ i kesamaan slring yaih~algoriune Uraku~i-Takedadan
algoritme Selc~~ensial.
Proscs pencarian nalna m e n g g ~ ~ ~ inclodc
~ a k ; ~kcsainaa~i
~~
string ii~itcrdiri dari dua li~nglOl do
State := glstate,a,I;
j := j - 1;
endwhile;
while j > 0 do
glstate,a,l := newstate;
depthlnewstatel := m - j + 1;
State ;= newstate;
newstate := newstate i 1;
j : = j + 1;
endwhile;
left-endli) := state;
out Istatel : = [a,,a z...a,];
minlen := minlminlen,ml ;
end.


Algoritm 3.1 Construction of tllc fu~lctio~l
Q
Iiipul : fuligsi goto.
Oulpul : fuligsi 41
Metode :
Begin
queue : = empty;
for each c such that gt0,cl = s > 0 do
queue := queue.^;
+is, := 0;
endfor;
while queue f empty do
let queue = r.tai1;
queue := tail;
for each c such that glr,c) = s # fail do

queue :=

queue.^;


state := 4111;
while g(state,c)=fail do state
41s) := glstate,~);
endfor;
endwhile;
end.

:=

+(statel endwhile;

Algoritllm 3.2 Construction of tlie function shiftl.
Iiiput : h~ngsigolo and 4
Output : Tu~igsisliiftl.
Metode :
I* inisialisasi sllifil ke large *I
begin
queue := empty;
for each c such that gi0,cI = s > 0 do queue.^ endfor;

while queue t empty do
let queue := =.tail;
queue := tail;
for each c such that gir,cl = s # fail do
queue := queue.^;
state := +I=);
while gist ate,^) = fail do
shiftllstate,~) : = min[shiftllstate,c),depthlrjl;
state := bistatel;
..
,.
endwhile;
if gistate,cl = 0 then
shiftl(state,cl := min[shiftlistate,cl,depthir)l;
endif;
endfor;
endwhile;
end.

Algoritlili~3.3 Colistruction of the fuuctiou sliift2

Input : Cungsi goto, depth, m d leftend
Output : fungsi shiCt2.
Mctode :
I* inisialisasi sl1ili2kc large *I
begin
for j := 1 to k do
state := mileft-endijll;
while state>O do
shiftllstate) := m i n ~ s h i f t Z ~ s t a t e l , d e p t h l l e f t ~ e n d i j l l l ;
state := +istatel;
endwhile;
endfor;
shiftZ(0) := minlen;
queue := (01;
while queue # empty do
let queue = =.tail
queue := tail;
for each c such that g(r,ci = s > 0 do
queue := queue.^;
shift2(s) := min[shiEt2(sl,shiftZir)+ll

endfor;
endwhile;
end.

Algoritlln~3.4. Coristructiori of thc failure function.
Inl~ut: Cungsi goto, shiltl, daii shir12.
Output : fungsi hilure.
~ e k d :e
for i = 0 to newstate - 1
for each c such that g10,ci < 1 do f(i,cl
endfor;

:=

min[shiEtl(i,cl, shiEtZ(il1 endfor;

Lampiran 4. Hasil Percobaa~iPengukuran Waklu.Pencark~n
(a) Tabel l~asilpengukuran vvaklu de~iganberagam input pada basis dala dengan pa~ljangratil-rata
record 10 karaklcr mengglu~akan;~lgoritmeUratani-Takeda.


(b) Tabel hasil pengukunil waklu pencarian i~lpulualua dengall pailjang 3 karakler pada beberapa
basis data menggunakan algorit~ueUratani-Takeda.

(c) Tabel hasil pengukuran waktu de11ga11beragam inpul pada basis data dengall pal~jangrala-rata
rccorcl10 karaklcr mcnggunakan a l g o r i t ~ ~Sckucnsial.
~e

(d) Tabel hasil penykurall n'aktu pencarian input llalua dengall palljang 3 karakler pada beberapa
basis dala mengg~makanalgoritme Sekuensial.

La111pi1;ln 5. per ban ding;^^^ Waktu Pcncarizln Antara Algoril~llaUralalli-Takeda dan Algoritma Sekuensial.

(a) Tabcl p e r b a ~ l d i ~ ~ waklu
g a ~ i pcncarian bcrbagtli inpot nama pad;^ basis dsla dcngan rala-rats
panjang record 10 karaklcr.

~;III
(;I) R1bc1] I C ~ ~ ; I I I ( ~ ~ I I\v;II C I I C : I ~ ~ ; Ii~ipttt
II
I~:II:I:I


(ICII~:III p:111.i;111g3 kir;lkIcr p;icI;~bcbcr;~~):~

LAMPIRAN

Input : Sebuah string T = alaz...a,,
Output : kata yang ditemukan
Metode :
I* $ n~erupakansilnbol yg tidak n~unculdi setiap kueri *I
I* nlb?lenadalall pmjang kueri terpendek *I
begin
a0 := $;

q := minlen;
while q S n d o
state := 0;
while qIstate,aq) > 0 d o
SLBLC : - g(SLdLe,ay);
if outlstate) i empty then print outlstate) endif;
ri := q

1
eiidwhile;
4 := q + f(state,aq);
endwhile;
end.

-

L a n ~ p i r a2.~ ~Isi dari Fungsi goto, ortipui, dan foilroe.

(;I) Fungsi goto (Ian output

(b) F u ~ ~ gfailure
si

Algorithm 2. C o ~ ~ s t r u c t iof
o l t~l ~ cgoto and ootput functio~is.
Illput : Sekunipulan kueri K = {al, a2, ...,ak).
Oulput : fi~ngsigoto, out, depth, dan lefcend.
Metodc :

/* large yaitu bilangan intcgcr positif yg lebih besar dari p;~~ljang
kocri-kueri */
/* I~usialisasig ke fail (10) dan out ke empty */
begin
minlen := large;
newstate := 1; depth101 := 0;
for i := 1 to k do Gnterju,i) endfor;
for each c such that g(O,cl = fail do gI0,cl : = 0 cndfor;
end

procedure Enter(ai,a;...am, i):
begin
state := 0; j := m;
while lgIstate,a,l fail1 and lj>Ol do
State := glstate,a,I;
j := j - 1;
endwhile;
while j > 0 do
glstate,a,l := newstate;
depthlnewstatel := m - j + 1;

State ;= newstate;
newstate := newstate i 1;
j : = j + 1;
endwhile;
left-endli) := state;
out Istatel : = [a,,a z...a,];
minlen := minlminlen,ml ;
end.

Algoritm 3.1 Construction of tllc fu~lctio~l
Q
Iiipul : fuligsi goto.
Oulpul : fuligsi 41
Metode :
Begin
queue : = empty;
for each c such that gt0,cl = s > 0 do
queue := queue.^;
+is, := 0;
endfor;
while queue f empty do
let queue = r.tai1;
queue := tail;
for each c such that glr,c) = s # fail do

queue :=

queue.^;

state := 4111;
while g(state,c)=fail do state
41s) := glstate,~);
endfor;
endwhile;
end.

:=

+(statel endwhile;

Algoritllm 3.2 Construction of tlie function shiftl.
Iiiput : h~ngsigolo and 4
Output : Tu~igsisliiftl.
Metode :
I* inisialisasi sllifil ke large *I
begin
queue := empty;
for each c such that gi0,cI = s > 0 do queue.^ endfor;
while queue t empty do
let queue := =.tail;
queue := tail;
for each c such that gir,cl = s # fail do
queue := queue.^;
state := +I=);
while gist ate,^) = fail do
shiftllstate,~) : = min[shiftllstate,c),depthlrjl;
state := bistatel;
..
,.
endwhile;
if gistate,cl = 0 then
shiftl(state,cl := min[shiftlistate,cl,depthir)l;
endif;
endfor;
endwhile;
end.

Algoritlili~3.3 Colistruction of the fuuctiou sliift2
Input : Cungsi goto, depth, m d leftend
Output : fungsi shiCt2.
Mctode :
I* inisialisasi sl1ili2kc large *I
begin
for j := 1 to k do
state := mileft-endijll;
while state>O do
shiftllstate) := m i n ~ s h i f t Z ~ s t a t e l , d e p t h l l e f t ~ e n d i j l l l ;
state := +istatel;
endwhile;
endfor;
shiftZ(0) := minlen;
queue := (01;
while queue # empty do
let queue = =.tail
queue := tail;
for each c such that g(r,ci = s > 0 do
queue := queue.^;
shift2(s) := min[shiEt2(sl,shiftZir)+ll
endfor;
endwhile;
end.

Algoritlln~3.4. Coristructiori of thc failure function.
Inl~ut: Cungsi goto, shiltl, daii shir12.
Output : fungsi hilure.
~ e k d :e
for i = 0 to newstate - 1
for each c such that g10,ci < 1 do f(i,cl
endfor;

:=

min[shiEtl(i,cl, shiEtZ(il1 endfor;

Lampiran 4. Hasil Percobaa~iPengukuran Waklu.Pencark~n
(a) Tabel l~asilpengukuran vvaklu de~iganberagam input pada basis dala dengan pa~ljangratil-rata
record 10 karaklcr mengglu~akan;~lgoritmeUratani-Takeda.

(b) Tabel hasil pengukunil waklu pencarian i~lpulualua dengall pailjang 3 karakler pada beberapa
basis data menggunakan algorit~ueUratani-Takeda.

(c) Tabel hasil pengukuran waktu de11ga11beragam inpul pada basis data dengall pal~jangrala-rata
rccorcl10 karaklcr mcnggunakan a l g o r i t ~ ~Sckucnsial.
~e

(d) Tabel hasil penykurall n'aktu pencarian input llalua dengall palljang 3 karakler pada beberapa
basis dala mengg~makanalgoritme Sekuensial.

La111pi1;ln 5. per ban ding;^^^ Waktu Pcncarizln Antara Algoril~llaUralalli-Takeda dan Algoritma Sekuensial.

(a) Tabcl p e r b a ~ l d i ~ ~ waklu
g a ~ i pcncarian bcrbagtli inpot nama pad;^ basis dsla dcngan rala-rats
panjang record 10 karaklcr.

~;III
(;I) R1bc1] I C ~ ~ ; I I I ( ~ ~ I I\v;II C I I C : I ~ ~ ; Ii~ipttt
II
I~:II:I:I

(ICII~:III p:111.i;111g3 kir;lkIcr p;icI;~bcbcr;~~):~

PENDAHULUAK

2.

Menlbandingkan algoritme kesalllaal~ string
yang diken~bangkal ole11 Uratani-T