Greenatic wrote:
These blocks would allow many versatile applications, such as Hangman or Scrabble games. Random sentence generators would be able to use real words, and with a little work, they could use proper grammar. Mad Libs-style games could ensure that input was both appropiate and grammatically correct (since <[ ] is a word?> would return false for inappropiate words). The possibilities are endless...these blocks would be very helpful, and unlike many block suggestions, it's virtually impossible to create workarounds for them. Therefore, we really should have these blocks.
First, this sounds impractical.
Random sentence generators need not a whole vocabulary. That would just make them unwieldy. Besides you can already classify a bunch of words into lists such as verbs, nouns, proper nouns, etc.
Mad Libs, Hangman, and Scrabble in real life all depend on the user to decide whether the input is correct or not. It isn't up to the computer to decide what's correct (it isn't up to the book of Mad Libs either), it's up to you.
Virtually impossible to create workarounds? That's not correct. I could put the whole Webster's dictionary into a list if I wanted. Or I could classify every word into verb, adjective, noun, etc. Why I wound want to, I don't know, but I could anyways. There are workarounds for every block you proposed.
Offline
Wes64 wrote:
Greenatic wrote:
These blocks would allow many versatile applications, such as Hangman or Scrabble games. Random sentence generators would be able to use real words, and with a little work, they could use proper grammar. Mad Libs-style games could ensure that input was both appropiate and grammatically correct (since <[ ] is a word?> would return false for inappropiate words). The possibilities are endless...these blocks would be very helpful, and unlike many block suggestions, it's virtually impossible to create workarounds for them. Therefore, we really should have these blocks.
First, this sounds impractical.
Random sentence generators need not a whole vocabulary. That would just make them unwieldy. Besides you can already classify a bunch of words into lists such as verbs, nouns, proper nouns, etc.
Mad Libs, Hangman, and Scrabble in real life all depend on the user to decide whether the input is correct or not. It isn't up to the computer to decide what's correct (it isn't up to the book of Mad Libs either), it's up to you.
Virtually impossible to create workarounds? That's not correct. I could put the whole Webster's dictionary into a list if I wanted. Or I could classify every word into verb, adjective, noun, etc. Why I wound want to, I don't know, but I could anyways. There are workarounds for every block you proposed.
But the the workarounds create lag. There are ways of creating dictionaries that are more lightweight and are possible to accomplish in Flash, but virtually impossible to do in Scratch. Consider this option.
Offline
Greenatic wrote:
Wes64 wrote:
Greenatic wrote:
These blocks would allow many versatile applications, such as Hangman or Scrabble games. Random sentence generators would be able to use real words, and with a little work, they could use proper grammar. Mad Libs-style games could ensure that input was both appropiate and grammatically correct (since <[ ] is a word?> would return false for inappropiate words). The possibilities are endless...these blocks would be very helpful, and unlike many block suggestions, it's virtually impossible to create workarounds for them. Therefore, we really should have these blocks.
First, this sounds impractical.
Random sentence generators need not a whole vocabulary. That would just make them unwieldy. Besides you can already classify a bunch of words into lists such as verbs, nouns, proper nouns, etc.
Mad Libs, Hangman, and Scrabble in real life all depend on the user to decide whether the input is correct or not. It isn't up to the computer to decide what's correct (it isn't up to the book of Mad Libs either), it's up to you.
Virtually impossible to create workarounds? That's not correct. I could put the whole Webster's dictionary into a list if I wanted. Or I could classify every word into verb, adjective, noun, etc. Why I wound want to, I don't know, but I could anyways. There are workarounds for every block you proposed.But the the workarounds create lag. There are ways of creating dictionaries that are more lightweight and are possible to accomplish in Flash, but virtually impossible to do in Scratch. Consider this option.
They do not create "lag", unless you used repeat or wait blocks. here
Last edited by Wes64 (2012-06-14 07:06:24)
Offline
Wes64 wrote:
Greenatic wrote:
Wes64 wrote:
First, this sounds impractical.
Random sentence generators need not a whole vocabulary. That would just make them unwieldy. Besides you can already classify a bunch of words into lists such as verbs, nouns, proper nouns, etc.
Mad Libs, Hangman, and Scrabble in real life all depend on the user to decide whether the input is correct or not. It isn't up to the computer to decide what's correct (it isn't up to the book of Mad Libs either), it's up to you.
Virtually impossible to create workarounds? That's not correct. I could put the whole Webster's dictionary into a list if I wanted. Or I could classify every word into verb, adjective, noun, etc. Why I wound want to, I don't know, but I could anyways. There are workarounds for every block you proposed.But the the workarounds create lag. There are ways of creating dictionaries that are more lightweight and are possible to accomplish in Flash, but virtually impossible to do in Scratch. Consider this option.
They do not create "lag", unless you used repeat or wait blocks. here
How are you going to check through a huge list of words without an if loop evaluated on each item? (Or do those loops not count?)
Last edited by Greenatic (2012-06-14 17:30:31)
Offline
Greenatic wrote:
Wes64 wrote:
Greenatic wrote:
But the the workarounds create lag. There are ways of creating dictionaries that are more lightweight and are possible to accomplish in Flash, but virtually impossible to do in Scratch. Consider this option.They do not create "lag", unless you used repeat or wait blocks. here
How are you going to check through a huge list of words without an if loop evaluated on each item? (Or do those loops not count?)
That is correct, "if" loops do not count. No lag whatsoever.
Offline
Wes64 wrote:
Greenatic wrote:
Wes64 wrote:
They do not create "lag", unless you used repeat or wait blocks. hereHow are you going to check through a huge list of words without an if loop evaluated on each item? (Or do those loops not count?)
That is correct, "if" loops do not count. No lag whatsoever.
Well, how would you iterate through a huge list without a repeat?
Offline
Greenatic wrote:
Wes64 wrote:
Greenatic wrote:
How are you going to check through a huge list of words without an if loop evaluated on each item? (Or do those loops not count?)That is correct, "if" loops do not count. No lag whatsoever.
Well, how would you iterate through a huge list without a repeat?
\What would the purpose of iterating said list be?
Offline
Wes64 wrote:
Greenatic wrote:
Wes64 wrote:
That is correct, "if" loops do not count. No lag whatsoever.Well, how would you iterate through a huge list without a repeat?
\What would the purpose of iterating said list be?
set [variable v] to (1) set [result v] to [false] repeat (length of [list v]) if <(item (variable) of [list v]) = (word here)> set [result v] to [true] end change [variable v] by (1) end
Offline
Greenatic wrote:
Wes64 wrote:
Greenatic wrote:
Well, how would you iterate through a huge list without a repeat?
\What would the purpose of iterating said list be?
set [variable v] to (1) set [result v] to [false] repeat (length of [list v]) if <(item (variable) of [list v]) = (word here)> set [result v] to [true] end change [variable v] by (1) end
For the example script it is just possible to use
<[list v] contains (variable)>But I understand what you mean, like for finding the exact position of a given item inside the list.
<location of [item] in [list v]>
Offline
Wes64 wrote:
Greenatic wrote:
Wes64 wrote:
\What would the purpose of iterating said list be?
set [variable v] to (1) set [result v] to [false] repeat (length of [list v]) if <(item (variable) of [list v]) = (word here)> set [result v] to [true] end change [variable v] by (1) endFor the example script it is just possible to use
<[list v] contains (variable)>But I understand what you mean, like for finding the exact position of a given item inside the list.
But still, for that purpose none of the blocks you suggested have any use. you would need a block like this:<location of [item] in [list v]>
Well, using the <[ ] contains [ ]> block would work too. But it wouldn't work for (random word).
And I still think it would be much more convenient to have this built in.
Last edited by Greenatic (2012-06-15 09:09:54)
Offline
Greenatic wrote:
Wes64 wrote:
Greenatic wrote:
set [variable v] to (1) set [result v] to [false] repeat (length of [list v]) if <(item (variable) of [list v]) = (word here)> set [result v] to [true] end change [variable v] by (1) endFor the example script it is just possible to use
<[list v] contains (variable)>But I understand what you mean, like for finding the exact position of a given item inside the list.
But still, for that purpose none of the blocks you suggested have any use. you would need a block like this:<location of [item] in [list v]>But it wouldn't work for (random word).
<[list v] contains (random word)>
Offline
Wes64 wrote:
Greenatic wrote:
Wes64 wrote:
For the example script it is just possible to use<[list v] contains (variable)>But I understand what you mean, like for finding the exact position of a given item inside the list.
But still, for that purpose none of the blocks you suggested have any use. you would need a block like this:<location of [item] in [list v]>But it wouldn't work for (random word).
<[list v] contains (random word)>
(random word) is the block we're trying to make.
I guess you could use:
(item (pick random (1) to (length of [list v])) of [list v])But I still believe that this should be built into Scratch.
Offline
Greenatic wrote:
Wes64 wrote:
Greenatic wrote:
But it wouldn't work for (random word).
<[list v] contains (random word)>(random word) is the block we're trying to make.
I guess you could use:(item (pick random (1) to (length of [list v])) of [list v])But I still believe that this should be built into Scratch.
Actually, Scratch can do this:
(item [any] of [list v])Its in the little drop down menu of the block.
Offline
the <(__ )is a word?> would be useful in chat boxes. If the words in the entry were not words (and innapropriate) it would know that and not add it. It would also check for spelling.
I support
Offline
thebriculator wrote:
the <(__ )is a word?> would be useful in chat boxes. If the words in the entry were not words (and innapropriate) it would know that and not add it. It would also check for spelling.
I support
Thanks!
@Wes64: Oh, stupid me. Regardless, I believe these features should be built-in to Scratch.
Offline
bump
Offline
zammer990 wrote:
Nah, I don't see any practical use for it and (random word) would take processing power.
Not really; even if the words were in a list (not ideal), just figure out ahead of time how long the list is and then use a random block.
(item (pick random (1) to (number)) of [list v])
Offline
or you could just use
item (any v) of [list v]or
item (pick random (1) to (length of [list v])) of [list v]
Last edited by thebriculator (2012-07-09 16:19:55)
Offline
ProgramCAT wrote:
Are you sure though? The blocks could make your project extremely slow because of the search time it might need (the English language has tens of thousands of words).
You could also just use a list instead. Search for a list of words, save as a text file, and import.
Sentence generators also already exist/can be created easily. Just have lists labelled 'nouns', 'adjectives', 'prepositions', 'verbs' etc and use the randomization blocks.
I don't think it would run slower, I tried implementing this in squeak (the language scratch is written in) and it took less than a second to evaluate if an array (squeak list) with all the words in english contained a certain string (peice of text). So it shouldn't be too different in flash.
Offline
dreamod wrote:
ProgramCAT wrote:
Are you sure though? The blocks could make your project extremely slow because of the search time it might need (the English language has tens of thousands of words).
You could also just use a list instead. Search for a list of words, save as a text file, and import.
Sentence generators also already exist/can be created easily. Just have lists labelled 'nouns', 'adjectives', 'prepositions', 'verbs' etc and use the randomization blocks.I don't think it would run slower, I tried implementing this in squeak (the language scratch is written in) and it took less than a second to evaluate if an array (squeak list) with all the words in english contained a certain string (peice of text). So it shouldn't be too different in flash.
Thanks for testing that, dreamod. I was too lazy.
Offline
bump
Offline
This can be very troublesome because there needs to be all the words in the world in the scratch database and the ( word is a verb? ) is very troublesome too. Sorry, i do not think the scratch team will approve of this suggestion.
By the way, i support.
Offline
Actually, you can look up "all verbs" "all nouns" "all prepositions" "all articles" (k it's just the, a, and an) etc. etc. and put them in lists using the "import" feature, and write a simple script.
Offline
BirdByte wrote:
Actually, you can look up "all verbs" "all nouns" "all prepositions" "all articles" (k it's just the, a, and an) etc. etc. and put them in lists using the "import" feature, and write a simple script.
I thought this then tried to find a website that listed every word in the English Language but such a website does not exist.
Offline