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

[BUGS#1251][6.0][backport] fix: FindMatches#search ignore penalty when segmented matches #1215

Open
wants to merge 4 commits into
base: releases/6.0
Choose a base branch
from

Conversation

miurahr
Copy link
Member

@miurahr miurahr commented Dec 16, 2024

Backport PR #963

Pull request type

  • Bug fix -> [bug]

Which ticket is resolved?

What does this PR change?

Other information

- Backport test case of FindMatchesTest

Signed-off-by: Hiroshi Miura <[email protected]>
Minimum backport of PR#963

Signed-off-by: Hiroshi Miura <[email protected]>
@miurahr miurahr added the bug label Dec 16, 2024
@miurahr miurahr added this to the 6.0.2 milestone Dec 16, 2024
- Add BUGS#1248 which is as same bug as BUGS#1251

Signed-off-by: Hiroshi Miura <[email protected]>
@miurahr miurahr requested a review from t-cordonnier December 21, 2024 01:52
@miurahr
Copy link
Member Author

miurahr commented Dec 21, 2024

@t-cordonnier could you check the backport is as same as #1223 that your fix proposal merged into master.

@miurahr
Copy link
Member Author

miurahr commented Dec 21, 2024

This also backports the fix PR #1231 to respect foreign matches with segmented search.

@t-cordonnier
Copy link
Contributor

Since this also includes part of non-yet validated PR 1220 I think we should wait for definitive version related file name before approving this PR. Or we remove this part, validate PR 1251 and backport action about file name later.

@@ -47,23 +47,31 @@
*/
public class NearString {
public enum MATCH_SOURCE {
MEMORY, TM, FILES
MEMORY, TM, FILES, TM_SUBSEG
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
MEMORY, TM, FILES, TM_SUBSEG
MEMORY, TM, FILES, SUBSEGMENTS

@@ -301,8 +313,8 @@ public void iterate(EntryKey source, TMXEntry trans) {
String foundSrc = Core.getSegmenter().glue(sourceLang, sourceLang, fsrc, spaces, brules);
// glue found translations
String foundTrans = Core.getSegmenter().glue(sourceLang, targetLang, ftrans, spaces, brules);
processEntry(null, foundSrc, foundTrans, NearString.MATCH_SOURCE.TM, false, 0, "", "", 0, "",
0, null);
processEntry(null, foundSrc, foundTrans, NearString.MATCH_SOURCE.TM_SUBSEG, false, maxPenalty,
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
processEntry(null, foundSrc, foundTrans, NearString.MATCH_SOURCE.TM_SUBSEG, false, maxPenalty,
processEntry(null, foundSrc, foundTrans, NearString.MATCH_SOURCE.SUBSEGMENTS, false, maxPenalty,

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

Successfully merging this pull request may close these issues.

2 participants