Discuss Scratch
- ajskateboarder
-
Scratcher
1000+ posts
Text similarity
If we want diffrent letters then it should be a drop-down with “same” and “diffrent”I do like having less blocks. Thanks again

Id somewhat preferMight be confusing to have a single reporter that returns an iterator when nearly every other list-related reporters don't return them(Closest to [text] in [list v]Because then you could Itterate it by removing the item and rerunning it and whatnot while also looking cleaner
I want to keep things consistent until Scratch adds first-class lists, or somethingI'm planning on making a Scratch extension for this soon, mostly for proof-of-concept, and I'll put it in OP
Last edited by ajskateboarder (Dec. 11, 2023 15:54:07)
- cookieclickerer33
-
Scratcher
1000+ posts
Text similarity
The block would return the item in the list that is most similar to the provided string.
To get a specific one like 3rd most similar you could do this
To get a specific one like 3rd most similar you could do this
define The (num) most similar to (text) in (list)That’s what I ment by Itterate
Copy (list::custom) to [copied v]::list
Set [output v] to (closest to (text::custom) in [copied v]::list)
repeat ((num::custom) - (1))
Delete (item # of (closest to (text::custom) in [copied v]::list)) of [copied v]
Set [output v] to (closest to (text::custom) in [copied v]::list)
end
Return (output)::custom cap
- ajskateboarder
-
Scratcher
1000+ posts
Text similarity
Bump
So we should have a similar block to what people already use, for consistency
The block would return the item in the list that is most similar to the provided string.Yeah I know, but it may be confusing when people iterate over lists with this block:
To get a specific one like 3rd most similar you could do thisdefine The (num) most similar to (text) in (list)That’s what I ment by Itterate
Copy (list::custom) to [copied v]::list
Set [output v] to (closest to (text::custom) in [copied v]::list)
repeat ((num::custom) - (1))
Delete (item # of (closest to (text::custom) in [copied v]::list)) of [copied v]
Set [output v] to (closest to (text::custom) in [copied v]::list)
end
Return (output)::custom cap
(item (n) of [list v] :: list)
So we should have a similar block to what people already use, for consistency
- cookieclickerer33
-
Scratcher
1000+ posts
Text similarity
I don’t agree because it’s much smaller and easier to understand than whatever that big list block is


