Post by bluatigro on Jul 2, 2018 10:19:19 GMT
vortaro is a verry simple machine translator
from Esperanto to dutch or english
the dictonary is far from complete
instructions :
choise b
and type 'malsanulej'
it shoot respond whit '[not>healt<dude]<home]'
from Esperanto to dutch or english
the dictonary is far from complete
instructions :
choise b
and type 'malsanulej'
it shoot respond whit '[not>healt<dude]<home]'
''bluatigro 2 jun 2018
''vortaro 1.0
dim w$( 20000 ) , l$( 20 ) , r$( 20 )
global wordtel , lefttel , righttel , nederlands , english
nederlands = 1
english = 2
open "vortaro.txt" for input as #in
wordtel = 0
lefttel = 0
righttel = 0
while not( eof( #in ) )
line input #in , q$
a$ = word$( q$ , 1 , "," )
if left$( a$ , 1 ) = "@" then
l$( lefttel ) = q$
lefttel = lefttel + 1
else
if right$( a$ , 1 ) = "#" then
r$( righttel ) = q$
righttel = righttel + 1
else
w$( wordtel ) = q$
wordtel = wordtel + 1
end if
end if
wend
close #in
[info]
print "bluatigro presents vortaro ."
print "a AI tranlator ."
print "a : esperanto -> nederlands ."
print "b : esperanto -> english ."
print "x : quit voratro ."
input "choise [ a , b , x ] = " ; in$
in$ = left$( lower$( in$ ) , 1 )
if instr( "abx" , in$ ) = 0 then goto [info]
select case in$
case "a"
call esperanto nederlands
case "b"
call esperanto english
case else
nomainwin
end
end select
goto [info]
sub esperanto lingvo
[sekva]
tel = 0
input "vorto = " ; in$
fl = 0
voor$ = ""
while fl = 0
fl = 1
for i = 0 to lefttel
ql$ = word$( l$( i ) , 1 , "," )
ql$ = right$( ql$ , len( ql$ ) - 1 )
if left$( in$ , len( ql$ ) ) = ql$ then
a$ = word$( l$( i ) , lingvo , "," )
voor$ = voor$ + a$
in$ = right$( in$ , len( in$ ) - len( ql$ ) )
end if
next i
wend
after$ = ""
while fl = 0
fl = 1
for i = 0 to righttel
qr$ = word$( r$( i ) , 1 , "," )
qr$ = right$( ql$ , len( qr$ ) - 1 )
if right$( in$ , len( qr$ ) - 1 ) = qr$ then
a$ = word$( l$( i ) , lingvo , "," )
achter$ = a$ + achter$
in$ = left$( in$ , len( in$ ) - len( qr$ ) )
end if
next i
wend
tel = 0
for i = 0 to wordtel
esp$ = word$( q$( i ) , 1 , "," )
uit$ = word$( q$( i ) , lingvo , "," )
if in$ = left$( esp$ , len( in$ ) ) then
taal$ = uit$
tel = tel + 1
end if
next i
taal$ = voor$ + taal$ + achter$
if taal$ = "" then
print "vorto ne en vortaro !"
print "woord miet in wordenboek !"
print "word not in dictonary !"
else
print "mi trovis " ; tel ; " vorto[j] ."
print "ik heb " ; tel ; " word[en] gevonden ."
print "i have " ; tel ; " word[s] found ."
if tel = 1 then
print taal$
else
input "[ j , n ] = " ; in$
if lower$( in$ ) = "j" then goto [sekva]
end if
end if
end sub