(improvement)(Chat)Integration of tags into chat. (#798)

This commit is contained in:
lexluo09
2024-03-08 16:59:51 +08:00
committed by GitHub
parent 9d27031543
commit 3ad18b0ee0
20 changed files with 108 additions and 69 deletions

View File

@@ -31,7 +31,7 @@ public class KnowledgeServiceImpl implements KnowledgeService {
public void updateSemanticKnowledge(List<DictWord> natures) {
List<DictWord> prefixes = natures.stream()
.filter(entry -> !entry.getNatureWithFrequency().contains(DictWordType.SUFFIX.getType()))
.filter(entry -> !entry.getNatureWithFrequency().contains(DictWordType.SUFFIX.getTypeWithSpilt()))
.collect(Collectors.toList());
for (DictWord nature : prefixes) {
@@ -39,7 +39,7 @@ public class KnowledgeServiceImpl implements KnowledgeService {
}
List<DictWord> suffixes = natures.stream()
.filter(entry -> entry.getNatureWithFrequency().contains(DictWordType.SUFFIX.getType()))
.filter(entry -> entry.getNatureWithFrequency().contains(DictWordType.SUFFIX.getTypeWithSpilt()))
.collect(Collectors.toList());
SearchService.loadSuffix(suffixes);
@@ -80,7 +80,7 @@ public class KnowledgeServiceImpl implements KnowledgeService {
}
public List<HanlpMapResult> prefixSearchByModel(String key, int limit,
Map<Long, List<Long>> modelIdToDataSetIds) {
Map<Long, List<Long>> modelIdToDataSetIds) {
return SearchService.prefixSearch(key, limit, modelIdToDataSetIds);
}