1 | scope ai_wordCategoriesWithElements. |
2 | |
3 | static TimedCache<Map<S, Map<S, Set<S>>>> #cache = new TimedCache(f ciMap, 10.0); // language -> category -> words |
4 | |
5 | static Map<S, Set<S>> ai_wordCategoriesWithElements() { |
6 | Map<S, Map<S, Set<S>>> languages = cache!; |
7 | Map<S, Set<S>> map = languages.get(ai_language()); |
8 | if (map == null) |
9 | languages.put(ai_language(), map = make()); |
10 | ret map; |
11 | } |
12 | |
13 | static Map<S, Set<S>> #make() { |
14 | final Map<S, Set<S>> wordCategories = ciMap(); |
15 | for (S cat : mL("All " + ai_language() + " word categories")) |
16 | putIfValueNempty(wordCategories, cat, combinedMechSetsCI(ai_mechListNamesForAngleBracketCategory(cat))); |
17 | ret wordCategories; |
18 | } |
19 | |
20 | end scope |
Began life as a copy of #1017343
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1017360 |
Snippet name: | ai_wordCategoriesWithElements - for ai_language() |
Eternal ID of this version: | #1017360/7 |
Text MD5: | 6abd1dfbb56280f1b0273d567bbe2a15 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-08-08 14:29:40 |
Source code size: | 696 bytes / 20 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 439 / 500 |
Version history: | 6 change(s) |
Referenced in: | [show references] |