Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small edge case in Select Word in Context #586

Open
tfnribeiro opened this issue Oct 7, 2024 · 1 comment
Open

Small edge case in Select Word in Context #586

tfnribeiro opened this issue Oct 7, 2024 · 1 comment

Comments

@tfnribeiro
Copy link
Contributor

  • When the word appears twice in the same span it can give rise to strange occurrences:

{CD47B88E-B5AC-40D8-A79D-7A0BD9F39E30}

@tfnribeiro
Copy link
Contributor Author

We only consider the first occurrence of the word as the correct one in the TranslatableText. This means there is the underlying assumption that the first occurrence of the bookmark should be assumed to be the one in the text. However, the correction looks at the transtadedWords and check if the bookmark is in that list, so it will still find it to be correct.

This can lead to some exploits where users could translate a later occurrence of the word if present in the same context. This is not likely to happen often, but it's something we might want to look at.

A possible solution is to update the current foundInstances to track all the instances of the word in the span, rather than the first ocurrence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant