Libraryless. Click here for Pure Java version (3127L/19K).
// returns all the pairs, but best matches first // second part of pair is similarity score (0-100) static LPair<PairS, Int> mostRelativelySimilarLevenICPairs(Cl<S> words, O... _) { optPar int minScore = 0; new Map<PairS, Int> map; for (LS l : allSubsetsOfSize_iterator(2, words)) { int sim = levenSimilarityIntIC(first(l), second(l)); if (sim >= minScore) map.put(listToPair(l), sim); } ret pairsSortedByBDesc(mapToPairs(map)); }
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1027920 |
| Snippet name: | mostRelativelySimilarLevenICPairs |
| Eternal ID of this version: | #1027920/7 |
| Text MD5: | 9f9994e28a8124358fc4a977f07646c5 |
| Transpilation MD5: | b3c294ff5bb9865bf403ef142a29fd3b |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-04-21 10:33:50 |
| Source code size: | 458 bytes / 11 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 376 / 532 |
| Version history: | 6 change(s) |
| Referenced in: | [show references] |