Discuss Scratch

ajskateboarder
Scratcher
1000+ posts

Text similarity

Bump
-Expo
Scratcher
1000+ posts

Text similarity

KingRat_1 wrote:

no support
not sure how this would work or where itd be necessary.

cookieclickerer33 wrote:

Seems a little too complex and vague for scratch
I mean, it could be useful for some, but would the majority of Scratch use a block like
(similarity between () and ())
?
ajskateboarder
Scratcher
1000+ posts

Text similarity

KingRat_1 wrote:

no support
not sure how this would work or where itd be necessary.

cookieclickerer33 wrote:

Seems a little too complex and vague for scratch
Proposition: make it an extension
cookieclickerer33
Scratcher
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)

ajskateboarder
Scratcher
1000+ posts

Text similarity

Bump
ajskateboarder
Scratcher
1000+ posts

Text similarity

Bump
cookieclickerer33
Scratcher
1000+ posts

Text similarity

cookieclickerer33 wrote:

(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))
i still think this is much better
ajskateboarder
Scratcher
1000+ posts

Text similarity

cookieclickerer33 wrote:

cookieclickerer33 wrote:

(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))
i still think this is much better
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.

Last edited by ajskateboarder (Dec. 10, 2023 22:07:29)

cookieclickerer33
Scratcher
1000+ posts

Text similarity

ajskateboarder wrote:

cookieclickerer33 wrote:

cookieclickerer33 wrote:

(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))
i still think this is much better
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 dont, its too specific to be used. my version has more use cases and provides a more intuitive return
ajskateboarder
Scratcher
1000+ posts

Text similarity

cookieclickerer33 wrote:

ajskateboarder wrote:

cookieclickerer33 wrote:

cookieclickerer33 wrote:

(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))
i still think this is much better
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 dont, its too specific to be used. my version has more use cases and provides a more intuitive return
I'll include it in the OP for reference, but what does your reporter do that the current one doesn't?
cookieclickerer33
Scratcher
1000+ posts

Text similarity

ajskateboarder wrote:

cookieclickerer33 wrote:

ajskateboarder wrote:

cookieclickerer33 wrote:

cookieclickerer33 wrote:

(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))
i still think this is much better
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 dont, its too specific to be used. my version has more use cases and provides a more intuitive return
I'll include it in the OP for reference, but what does your reporter do that the current one doesn't?
it lets you do rejix matching, list matching,
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
Scratcher
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
cookieclickerer33
Scratcher
1000+ posts

Text similarity

the new version seems to just be mine with length of
why not have mine, it allows that and more
ajskateboarder
Scratcher
1000+ posts

Text similarity

cookieclickerer33 wrote:

the new version seems to just be mine with length of
why not have mine, it allows that and more
At this point, the two blocks report different information, so I have just decided to include both

(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
Scratcher
1000+ posts

Text similarity

ajskateboarder wrote:

cookieclickerer33 wrote:

the new version seems to just be mine with length of
why not have mine, it allows that and more
At this point, the two blocks report different information, so I have just decided to include both

(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
Scratcher
1000+ posts

Text similarity

cookieclickerer33 wrote:

ajskateboarder wrote:

cookieclickerer33 wrote:

the new version seems to just be mine with length of
why not have mine, it allows that and more
At this point, the two blocks report different information, so I have just decided to include both

(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)))
You are very smart

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)

ajskateboarder
Scratcher
1000+ posts

Text similarity

Bump..?
roofogato
Scratcher
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
Scratcher
1000+ posts

Text similarity

roofogato wrote:

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
By text similarity do you mean the first two blocks?
cookieclickerer33
Scratcher
1000+ posts

Text similarity

If we want diffrent letters then it should be a drop-down with “same” and “diffrent”

Also renamed list blocks

(The () item most similar to [] in [list v]::list)

(The () closest item to [] from [list v]::list)
Id somewhat prefer
(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)

Powered by DjangoBB