Create a random word generator for a new language?

  • (2 Pages)
  • +
  • 1
  • 2

18 Replies - 3480 Views - Last Post: 13 February 2012 - 09:10 AM Rate Topic: -----

#16 Radi0actvChickn  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 18-January 12

Re: Create a random word generator for a new language?

Posted 12 February 2012 - 07:33 PM

I'm trying to create a word generator in Javascript and I have this in my code:

for (x=1;x<cbv.length;x++;y=0;z=0)
{if (y==70)
	{
	document.write(cbv[x] + vow[y] + cav[z] + "<br />");
	(x=1;y=0;z++);
	}
else if (x==48)	
	{
	document.write(cbv[x] + vow[y] + cav[z] + "<br />");
	(x=1;y++);
	}
else
	{
	document.write(cbv[x] + vow[y] + cav[z] + "<br />");
	(x++);
	}
}


I know these probably contradict each other and I know this won't work. Basically what I'm trying to do is create words using a list of consonant sounds that can come before a vowel sound (cbv), vowel sounds (vow), and consonant sounds that can come after a vowel sound (cav). I have already made lists of all possibilities for each and I put each of those lists in three seperate arrays. (Those arrays are written above the code you see here in the master code I have saved on my computer.) I'm trying to make it so the program will write cbv[1] + vow[0] + cav[0] onto the document, then go back and write cbv[2] + vow[0] + cav[0] and continue that trend until it reaches cbv[70], then it is supposed to reset to cbv[1] and change vow[0] to vow[1] (so it would be cbv[1] + vow[1] + cav[0]) and repeat the process again. After getting to vow[48], it would change cav[0] to cav[1] and reset to cbv[1] and vow[0] (so it would be cbv[1] + vow[0] + cav[1]). The program would then end when it ran out of cav's. (Hopefully that wasn't too confusing.) So, I'm wondering if there's a way to achieve this effect in Javascript, or, if not, a way to achieve this effect in another language. Thanks in advance for the help!
Was This Post Helpful? 0
  • +
  • -

#17 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3719
  • View blog
  • Posts: 5,990
  • Joined: 08-June 10

Re: Create a random word generator for a new language?

Posted 12 February 2012 - 07:54 PM

* Threads merged *

Please don't double post your questions.
Was This Post Helpful? 0
  • +
  • -

#18 Radi0actvChickn  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 18-January 12

Re: Create a random word generator for a new language?

Posted 12 February 2012 - 09:51 PM

View PostAtli, on 12 February 2012 - 07:54 PM, said:

* Threads merged *

Please don't double post your questions.

Ok, any way to delete these threads and ask again? I need this answered, I've been working on it for a while.
Was This Post Helpful? 0
  • +
  • -

#19 ishkabible  Icon User is offline

  • spelling expret
  • member icon




Reputation: 1622
  • View blog
  • Posts: 5,709
  • Joined: 03-August 09

Re: Create a random word generator for a new language?

Posted 13 February 2012 - 09:10 AM

You can ask your question in this thread.

If your issue is more JS specific in which case you could create a minimal test case that shows your issue and post the problem in the JS forum.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2