Discuss Scratch
- -Expo
-
1000+ posts
Text similarity
no support
not sure how this would work or where itd be necessary.
I mean, it could be useful for some, but would the majority of Scratch use a block like Seems a little too complex and vague for scratch
(similarity between () and ())?
- ajskateboarder
-
1000+ posts
Text similarity
no support
not sure how this would work or where itd be necessary.
Proposition: make it an extension Seems a little too complex and vague for scratch
- cookieclickerer33
-
1000+ posts
Text similarity
(what % of () and () are the same::operators)i support if its like this. much clearer
maybe it could also be
(same letters in () and ()::operators)and it would return what letters both strings contain. so something like
(same letters in (hello) and (how are you)::operators)would return heo
then you could get the amount of letters by doing
(length of (same letters in (hello) and (how are you)::operators))
Last edited by cookieclickerer33 (Nov. 11, 2023 20:13:14)
- cookieclickerer33
-
1000+ posts
Text similarity
i still think this is much better(what % of () and () are the same::operators)i support if its like this. much clearer
maybe it could also be(same letters in () and ()::operators)and it would return what letters both strings contain. so something like(same letters in (hello) and (how are you)::operators)would return heo
then you could get the amount of letters by doing(length of (same letters in (hello) and (how are you)::operators))
- ajskateboarder
-
1000+ posts
Text similarity
I do agree with the first reporter you gave (though it might be weird to translate it into other languages) but the others kind of miss the point. Those are comparatively easier to workaround.i still think this is much better(what % of () and () are the same::operators)i support if its like this. much clearer
maybe it could also be(same letters in () and ()::operators)and it would return what letters both strings contain. so something like(same letters in (hello) and (how are you)::operators)would return heo
then you could get the amount of letters by doing(length of (same letters in (hello) and (how are you)::operators))
Last edited by ajskateboarder (Dec. 10, 2023 22:07:29)
- cookieclickerer33
-
1000+ posts
Text similarity
i dont, its too specific to be used. my version has more use cases and provides a more intuitive returnI do agree with the first reporter you gave (though it might be weird to translate it into other languages) but the others kind of miss the point. Those are comparatively easier to workaround.i still think this is much better(what % of () and () are the same::operators)i support if its like this. much clearer
maybe it could also be(same letters in () and ()::operators)and it would return what letters both strings contain. so something like(same letters in (hello) and (how are you)::operators)would return heo
then you could get the amount of letters by doing(length of (same letters in (hello) and (how are you)::operators))
- ajskateboarder
-
1000+ posts
Text similarity
I'll include it in the OP for reference, but what does your reporter do that the current one doesn't?i dont, its too specific to be used. my version has more use cases and provides a more intuitive returnI do agree with the first reporter you gave (though it might be weird to translate it into other languages) but the others kind of miss the point. Those are comparatively easier to workaround.i still think this is much better(what % of () and () are the same::operators)i support if its like this. much clearer
maybe it could also be(same letters in () and ()::operators)and it would return what letters both strings contain. so something like(same letters in (hello) and (how are you)::operators)would return heo
then you could get the amount of letters by doing(length of (same letters in (hello) and (how are you)::operators))
- cookieclickerer33
-
1000+ posts
Text similarity
it lets you do rejix matching, list matching,I'll include it in the OP for reference, but what does your reporter do that the current one doesn't?i dont, its too specific to be used. my version has more use cases and provides a more intuitive returnI do agree with the first reporter you gave (though it might be weird to translate it into other languages) but the others kind of miss the point. Those are comparatively easier to workaround.i still think this is much better(what % of () and () are the same::operators)i support if its like this. much clearer
maybe it could also be(same letters in () and ()::operators)and it would return what letters both strings contain. so something like(same letters in (hello) and (how are you)::operators)would return heo
then you could get the amount of letters by doing(length of (same letters in (hello) and (how are you)::operators))
and also fulfils this because doing “LENGTH OF” would return the amount of letters both strings have in common. this will have more use cases than a percent and is easier to understand and convert to a percent
its also a much more intuitive name than the other block which is always an upside
as for the workaround, while there is one it requires using lists and multple variables, both of wich i dont really consider a workaround worthy of this not being added
Last edited by cookieclickerer33 (Dec. 10, 2023 22:26:22)
- ajskateboarder
-
1000+ posts
Text similarity
I made changes to the first block
It now reports the edit distance to the two texts rather than how similar they are. It's possibly more intuitive
It now reports the edit distance to the two texts rather than how similar they are. It's possibly more intuitive
- cookieclickerer33
-
1000+ posts
Text similarity
the new version seems to just be mine with length of
why not have mine, it allows that and more
why not have mine, it allows that and more
- ajskateboarder
-
1000+ posts
Text similarity
At this point, the two blocks report different information, so I have just decided to include both the new version seems to just be mine with length of
why not have mine, it allows that and more
(length of (same letters in [cat] and [act] ::operators)) // 3
(length of (different letters in [cat] and [act] ::operators)) // 0
(# of edits between [cat] and [act] ::operators) // 2
Assuming that's how it would behave
- cookieclickerer33
-
1000+ posts
Text similarity
At this point, the two blocks report different information, so I have just decided to include both the new version seems to just be mine with length of
why not have mine, it allows that and more(length of (same letters in [cat] and [act] ::operators)) // 3
(length of (different letters in [cat] and [act] ::operators)) // 0
(# of edits between [cat] and [act] ::operators) // 2
Assuming that's how it would behave
((length of [text]) - (length of (same letters in [text] and [foo]::operators)))
- ajskateboarder
-
1000+ posts
Text similarity
You are very smartAt this point, the two blocks report different information, so I have just decided to include both the new version seems to just be mine with length of
why not have mine, it allows that and more(length of (same letters in [cat] and [act] ::operators)) // 3
(length of (different letters in [cat] and [act] ::operators)) // 0
(# of edits between [cat] and [act] ::operators) // 2
Assuming that's how it would behave((length of [text]) - (length of (same letters in [text] and [foo]::operators)))
Well uh most of the blocks are obsoleted now, as you can apply this block to list matching as well :P
Never mind, the workaround for making list matching is still unbearably complicated, especially without a min/max block for lists. So now we have reporters for same/different letters and nth most similar blocks for lists.
Last edited by ajskateboarder (Dec. 11, 2023 05:22:32)
- roofogato
-
1000+ posts
Text similarity
Actually, support. At least for the text simaliarity thing. I can imagine it being useful for a game I'm working on RN. Very useful
- ajskateboarder
-
1000+ posts
Text similarity
Very usefulBy text similarity do you mean the first two blocks? Actually, support. At least for the text simaliarity thing. I can imagine it being useful for a game I'm working on RN.
- cookieclickerer33
-
1000+ posts
Text similarity
If we want diffrent letters then it should be a drop-down with “same” and “diffrent”
Also renamed list blocks
Also renamed list blocks
(The () item most similar to [] in [list v]::list)Id somewhat prefer
(The () closest item to [] from [list v]::list)
(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
Last edited by cookieclickerer33 (Dec. 11, 2023 14:56:34)