1 | static <A> S levenClosest(Map<S, A> map, S s) { |
2 | int limit = Integer.MAX_VALUE-1; |
3 | new Lowest<S> best; |
4 | for (S key : keys(map)) { |
5 | limit = leven_limited(s, key, limit); |
6 | best.put(key, limit); |
7 | } |
8 | ret best!; |
9 | } |
Began life as a copy of #1008052
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1008384 |
Snippet name: | levenClosest - get Levenshtein-closest key in map (case-sensitive) |
Eternal ID of this version: | #1008384/1 |
Text MD5: | 2c9f46aa4722db219bc615e1358237cf |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-05-10 02:02:28 |
Source code size: | 227 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 535 / 531 |
Referenced in: | [show references] |