From 1af8a8d5b9a61d5138f862a5fa9b624c75e6cb9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Fuch=C3=9F?= Date: Thu, 26 Sep 2024 14:15:20 +0200 Subject: [PATCH] Just some information --- .../models/informants/LLMArchitectureProviderInformant.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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;