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

24
LINES

< > TinyBrain | #1008867 - class WoodyBot

JavaX fragment (include)

sclass WoodyBot {
  SS files = new TreeMap;
  new TreeMap<S, WoodyRule> rules;
  SS globals = new TreeMap;
  SS regexpMacros = new TreeMap;
  new HashMap<S, Pattern> compiledPatterns;
  S jumpawayRule = "Agent#Agent.01_WEB-CONTENT.Vorschlaege";
  new TreeSet<S> disabledFolders;
  
  Collection<S> fileNames() {
    ret keys(files);
  }
  
  S getFile(S fileName) {
    ret lookupPossiblyIgnoringCase(files, fileName);
  }
  
  WoodyRule getRule(S ruleName) {
    ruleName = replacePrefix("PHRASEKNOWLEDGE#", "Agent#COMMON.", ruleName);
    ret ruleName == null ? null : lookupPossiblyIgnoringCase(rules, ruleName);
  }
  
  void cleanMeUp() { cleanUp(files); }
}

download  show line numbers  debug dex   

Travelled to 3 computer(s): cfunsshuasjs, onxytkatvevr, tvejysmllsmz

No comments. add comment

Snippet ID: #1008867
Snippet name: class WoodyBot
Eternal ID of this version: #1008867/18
Text MD5: 935121a73bd621dfa104d5e5752a9f88
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-07-14 20:01:46
Source code size: 686 bytes / 24 lines
Pitched / IR pitched: No / No
Views / Downloads: 79 / 486
Version history: 17 change(s)
Referenced in: [show]