@ts4nfdi/terminology-service-suite 6.2.3 → 6.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Gets the best matching synonym from a list based on similarity to search value
3
+ * @param synonyms - Array of synonym strings
4
+ * @param searchValue - The search string to match against
5
+ * @returns The best matching synonym, or empty string if no synonyms
6
+ */
7
+ export declare const getBestMatchingSynonym: (synonyms: string[], searchValue: string) => string;
8
+ /**
9
+ * Selects a synonym based on strict searchValue inclusion rules for both the label and the synonym.
10
+ *
11
+ * Rules:
12
+ * 1. If the label contains the searchValue, return empty string.
13
+ * 2. Only consider synonyms that contain the searchValue.
14
+ *
15
+ * @param label - The original label to check against
16
+ * @param synonyms - The list of potential synonyms
17
+ * @param searchValue - The string that must/must not be present
18
+ * @returns The best matching valid synonym, or empty string
19
+ */
20
+ export declare const getConstrainedSynonym: (label: string, synonyms: string[], searchValue: string) => string;