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

19
LINES

< > BotCompany Repo | #1012755 // Playing with patterns v2 [OK]

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

Download Jar. Libraryless. Click here for Pure Java version (18682L/133K).

!7

p {
  ai_alternativeSmartBot();
  
  WordSequence pat = WordSequence(
    SomethingWhichIs("a noun"),
    SomethingWhichIs("a verb"));
  printStruct(pat);
  
  WordSequence real = WordSequence("plants", "grow");
  printStruct(real);
  
  new IdentityHashMap map;
  if (recursiveMatch(ll(f matchWordSequence, f matchSomethingWhichIs), pat, real, map))
    printStruct(map);
  else
    print("no match");
}

Author comment

Began life as a copy of #1012747

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: #1012755
Snippet name: Playing with patterns v2 [OK]
Eternal ID of this version: #1012755/8
Text MD5: b5a585b673a5fa62c9ee913eba0be7d1
Transpilation MD5: 5c6a3787b6aa53116e594188f265d25a
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-12-11 20:32:01
Source code size: 426 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 299 / 671
Version history: 7 change(s)
Referenced in: [show references]