Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Culture > Artificial Language > Re: FOSS tools ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 10 Topic 610 of 651
Post > Topic >>

Re: FOSS tools for lexicon generation?

by Rick Harrison <not@[EMAIL PROTECTED] > Mar 7, 2008 at 03:16 PM

Below is a program I whipped up to show how you can generate a list of
all possible syllables using BASIC. It took about 8 minutes to write
this, which shows how easy BASIC is to use. Feel free to modify this
and use it however you wish. Obvioulsy doing all possible _words_ would
be more complex than doing all possible syllables, but you have to
start somewhere...

REM * this program generates all possible syllables *
REM * first we create arrays to hold our strings *
DIM a$(50)
DIM b$(50)
DIM c$(50)

REM * put permitted initial consonants into a$ array *
Initials:
READ y$
IF y$ = "xxx" THEN GOTO Vowels
counta = counta + 1
a$(counta) = y$
GOTO Initials

REM * put permitted vowels into b$ array *
Vowels:
READ y$
IF y$ = "xxx" THEN GOTO Finals
countb = countb + 1
b$(countb) = y$
GOTO Vowels

REM * put permitted finals into b$ array *
Finals:
READ y$
IF y$ = "xxx" THEN GOTO Wrap
countc = countc + 1
c$(countc) = y$
GOTO Finals

REM * create the syllables and output them to a textfile *
Wrap:
OPEN "syllables.txt" FOR OUTPUT AS #1
FOR i = 1 TO counta
  FOR j = 1 TO countb
    FOR k = 1 TO countc
      sa$ = a$(i)
      sb$ = b$(j)
      sc$ = c$(k)
      IF sc$ = "zero" THEN sc$ = ""
      syllable$ = sa$ + sb$ + sc$
      PRINT #1, syllable$
    NEXT k
  NEXT j
NEXT i
CLOSE #1
PRINT "Finished. It was a pleasure to serve you."
END

REM * below is where the intials, medials, and finals are stored *
REM * xxx marks the end of each list *
DATA b, ch, d, xxx
DATA a, i, u, xxx
DATA zero, n, s, xxx

- - - - - that's the end of the program - - - - -

- - - - - below is what the output file looks like - - - - - 

ba
ban
bas
bi
bin
bis
bu
bun
bus
cha
chan
chas
chi
chin
chis
chu
chun
chus
da
dan
das
di
din
dis
du
dun
dus
 




 10 Posts in Topic:
FOSS tools for lexicon generation?
martinobal <martinobal  2008-03-07 11:29:26 
Re: FOSS tools for lexicon generation?
Anonymous <anyone@[EMA  2008-03-07 14:46:12 
Re: FOSS tools for lexicon generation?
Rick Harrison <not@[EM  2008-03-07 15:16:31 
Re: FOSS tools for lexicon generation?
"John W. Kennedy&quo  2008-03-09 00:55:15 
Re: FOSS tools for lexicon generation?
Rick Harrison <not@[EM  2008-03-09 10:56:31 
Re: FOSS tools for lexicon generation?
martinobal <martinobal  2008-03-08 10:05:22 
Re: FOSS tools for lexicon generation?
martinobal <martinobal  2008-03-09 19:05:04 
Re: FOSS tools for lexicon generation? - 2 attachments
Rick Harrison <not@[EM  2008-04-09 05:14:05 
Re: FOSS tools for lexicon generation? - 2 attachments
lenadi_moucina <lenadi  2008-05-15 10:56:11 
Re: FOSS tools for lexicon generation? - 2 attachments
Rick Harrison <not@[EM  2008-05-18 14:10:47 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Fri Jul 25 14:14:17 CDT 2008.