mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 19:51:00 +00:00
(improvement)(Headless) One detect word only matches one most similar dimension value instead of many. (#1068)
Co-authored-by: jolunoluo
This commit is contained in:
@@ -115,7 +115,7 @@ public class HanlpDictMatchStrategy extends BaseMatchStrategy<HanlpMapResult> {
|
||||
if (oneRoundResults.size() < oneDetectionSize) {
|
||||
List<HanlpMapResult> additionalResults = hanlpMapResults.stream()
|
||||
.filter(entry -> !mapperHelper.existDimensionValues(entry.getNatures())
|
||||
|| !oneRoundResults.contains(entry))
|
||||
&& !oneRoundResults.contains(entry))
|
||||
.limit(oneDetectionSize - oneRoundResults.size())
|
||||
.collect(Collectors.toList());
|
||||
oneRoundResults.addAll(additionalResults);
|
||||
|
||||
Reference in New Issue
Block a user