diff --git a/stages-tlr/model-provider/src/main/java/edu/kit/kastel/mcse/ardoco/tlr/models/informants/LLMArchitectureProviderInformant.java b/stages-tlr/model-provider/src/main/java/edu/kit/kastel/mcse/ardoco/tlr/models/informants/LLMArchitectureProviderInformant.java index f8ded47..76f0ee1 100644 --- a/stages-tlr/model-provider/src/main/java/edu/kit/kastel/mcse/ardoco/tlr/models/informants/LLMArchitectureProviderInformant.java +++ b/stages-tlr/model-provider/src/main/java/edu/kit/kastel/mcse/ardoco/tlr/models/informants/LLMArchitectureProviderInformant.java @@ -91,14 +91,16 @@ protected void process() { buildModel(componentNames); } - private static List mergeViaSimilarity(List componentNamesDocumentation, List componentNamesCode) { + private List mergeViaSimilarity(List componentNamesDocumentation, List componentNamesCode) { WordSimUtils simUtils = new WordSimUtils(); simUtils.setMeasures(Collections.singletonList(new LevenshteinMeasure(CommonTextToolsConfig.LEVENSHTEIN_MIN_LENGTH, - CommonTextToolsConfig.LEVENSHTEIN_MAX_DISTANCE, 0.8))); + CommonTextToolsConfig.LEVENSHTEIN_MAX_DISTANCE, 0.5))); List componentNames = new ArrayList<>(); for (String componentName : Stream.concat(componentNamesDocumentation.stream(), componentNamesCode.stream()).toList()) { if (componentNames.stream().noneMatch(it -> simUtils.areWordsSimilar(it, componentName))) { componentNames.add(componentName); + } else { + logger.info("Similar component name found (skipping): {}", componentName); } } return componentNames;