Uses 911K of libraries. Click here for Pure Java version (10273L/51K).
1 | !7 |
2 | |
3 | cmodule ELECorrectMisrecognitions > ELESuggester { |
4 | transient MultiMap<S> data; // replacement map |
5 | |
6 | void process_impl(S input) { |
7 | if (data == null) loadData(); |
8 | showSuggestions(input, data.get(input)); |
9 | } |
10 | |
11 | void loadData() { |
12 | MultiMap<S> mm = ciMultiMap(); |
13 | S pat = "* is usually a misrecognition of *"; |
14 | LS propositions = map getVar(map getVar(pairsB(ai_findConfirmedPropositionsWithPattern(pat)))); |
15 | L<Matches> l = mapNotNulls(propositions, s -> getMatches(pat, s)); |
16 | for (Matches m : l) |
17 | mm.put($1, $2); |
18 | data = mm; |
19 | } |
20 | } |
Began life as a copy of #1026727
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: | #1026748 |
Snippet name: | ELE: Correct misrecognitions |
Eternal ID of this version: | #1026748/4 |
Text MD5: | fc15fd9e89fb3252f77486f82f2e56b5 |
Transpilation MD5: | 1fe9646d97446f1595442ef0d1c4d73c |
Author: | stefan |
Category: | javax / ele |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-01-19 22:12:17 |
Source code size: | 587 bytes / 20 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 255 / 457 |
Version history: | 3 change(s) |
Referenced in: | [show references] |