Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

30
LINES

< > BotCompany Repo | #1011161 // Get correct parses from Auto GAC 2 & upload them [OK]

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (15636L/111K).

1  
!759
2  
3  
p {
4  
  autoRestart();
5  
  Map<Pair<S, T3<S>>, Bool> parseOKMap = persistentHashMapFromOtherProgram(#1011156, 'parseOKMap);
6  
  print(l(parseOKMap));
7  
  new TreeMap<S, Web> webs;
8  
  for (Pair<S, T3<S>> p : keysWithValueTrue(parseOKMap)) {
9  
    Float value = gac36k().get(p.a);
10  
    if (value == null) continue with print("huh? " + p.a);
11  
    Web web = webFromTriple(p.b);
12  
    WebRelation rel = web_firstRelation(web);
13  
    S verb = web_text(rel);
14  
    verb = dropSuffix(" (?)", dropSuffix("?", verb));
15  
    bool negate = value < 0.5;
16  
    if (negate) verb = ai_negateVerb(verb);
17  
    web_replaceFirstText(rel, verb);
18  
    int percent = toIntPercent(value);
19  
    if (percent > 0 && percent < 100)
20  
      web_addLabel(rel, "[" + (negate ? "n, " : "") + "p=" + percent + "%]");
21  
    webs.put(verb, web);
22  
  }
23  
  showWebs(mapToParams(webs));
24  
  int posted = postSoftwareMadeWebs(values(webs));
25  
  print("Posted " + n(posted, "new web"));
26  
  if (posted != 0) uploadWebs();
27  
}
28  
29  
// We don't need this
30  
static S conceptLanguageToEnglish(O o) { fail(); }

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1011161
Snippet name: Get correct parses from Auto GAC 2 & upload them [OK]
Eternal ID of this version: #1011161/21
Text MD5: 1ff784fdf4184438887757cfa8726977
Transpilation MD5: bbb89ebb19afe6162ea7c6e54aee16eb
Author: stefan
Category: javax / a.i.
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-10-16 23:58:17
Source code size: 1053 bytes / 30 lines
Pitched / IR pitched: No / No
Views / Downloads: 502 / 2554
Version history: 20 change(s)
Referenced in: [show references]