Skip to content

TM management improvement #15316

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

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

gersona
Copy link
Contributor

@gersona gersona commented Jun 30, 2025

Addtional question

  • What would be a reasonable value for the penalty factor ?

origin=origin,
source_language_id=source_language_id,
target_language_id=target_language_id,
).delete() # delete old entries, including those with different targets
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has risk of deleting unrelated entries as it matches only based on the source:

  • There can be different entries from different components.
  • There can be multiple same strings in one component, differing in key/context only.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't filtering by origin exclude entries from different components ?

Copy link
Contributor Author

@gersona gersona Jun 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As for the same string but different key/context, we can introduce a context variable to the Memory.
But going this route raises another question:

  • Should we suggest a memory if it has a different key/context than the unit being translated ?
  • If so, should we also apply another penalty factor for those ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right with origin, sorry for not realizing that.

Either context or a foreign key to Unit is needed to not delete entries for other strings. #9947 also describes a feature request to include context, so that is probably a better approach. Therefore, I've assigned it to you. Using the penalty approach for context mismatch is probably a good idea. I think 0.95 would work well in this case. We still want a 100% source match with context mismatch to rank above any machine translation.

@gersona gersona force-pushed the 7346_TM_management_improvement branch from 03317c8 to 0062486 Compare June 30, 2025 12:06
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

Successfully merging this pull request may close these issues.

Improve translation memory management
2 participants