mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-13 21:17:08 +00:00
[improvement] supersonic adapt checkstyle (#451)
This commit is contained in:
@@ -19,7 +19,6 @@ public interface FileHandler {
|
||||
*/
|
||||
void createDir(String path);
|
||||
|
||||
|
||||
Boolean existPath(String path);
|
||||
|
||||
/**
|
||||
|
||||
@@ -106,7 +106,6 @@ public class LocalFileHandler implements FileHandler {
|
||||
return Paths.get(path).toAbsolutePath().toString();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getDictRootPath() {
|
||||
return Paths.get(localFileConfig.getDictDirectoryLatest()).toAbsolutePath().toString();
|
||||
|
||||
@@ -22,7 +22,6 @@ public class DimensionWordBuilder extends BaseWordBuilder {
|
||||
@Value("${nlp.dimension.use.suffix:true}")
|
||||
private boolean nlpDimensionUseSuffix = true;
|
||||
|
||||
|
||||
@Override
|
||||
public List<DictWord> doGet(String word, SchemaElement schemaElement) {
|
||||
List<DictWord> result = Lists.newArrayList();
|
||||
|
||||
@@ -44,7 +44,6 @@ public class DictRepositoryImpl implements DictRepository {
|
||||
return dictTaskDO.getId();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Boolean updateDictTaskStatus(Integer status, DictTaskDO dictTaskDO) {
|
||||
dictTaskDO.setStatus(status);
|
||||
|
||||
@@ -31,7 +31,6 @@ public class KnowledgeServiceImpl implements KnowledgeService {
|
||||
SearchService.loadSuffix(suffixes);
|
||||
}
|
||||
|
||||
|
||||
public void reloadAllData(List<DictWord> natures) {
|
||||
// 1. reload custom knowledge
|
||||
try {
|
||||
|
||||
@@ -21,7 +21,6 @@ public class LoadRemoveService {
|
||||
@Value("${mapper.remove.nature.prefix:}")
|
||||
private String mapperRemoveNaturePrefix;
|
||||
|
||||
|
||||
public List removeNatures(List value, Integer agentId, Set<Long> detectModelIds) {
|
||||
if (CollectionUtils.isEmpty(value)) {
|
||||
return value;
|
||||
@@ -52,4 +51,4 @@ public class LoadRemoveService {
|
||||
return resultList;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,7 +118,6 @@ public class SearchService {
|
||||
trie.put(key, getValue(attribute.nature));
|
||||
}
|
||||
|
||||
|
||||
public static void loadSuffix(List<DictWord> suffixes) {
|
||||
if (CollectionUtils.isEmpty(suffixes)) {
|
||||
return;
|
||||
|
||||
@@ -104,7 +104,6 @@ public class NatureHelper {
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
private static long getModelCount(List<Term> terms) {
|
||||
return terms.stream().filter(term -> isModelOrEntity(term, getModelByNature(term.nature))).count();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user