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

40
LINES

< > BotCompany Repo | #1014772 // Snippet Title Reasoning v2 [OK, shortened]

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

Download Jar. Uses 3874K of libraries. Click here for Pure Java version (9936L/65K).

!7

sS inspiration = [[
  snippet titles
  "[OK]"
]];

sS program = [[
  // check inspiration :o)
  assert(inspired "snippet titles")
  assert(inspired "\"[OK]\"")

  // phrases
  phrase "snippet titles"
  phrase "a list of strings"
  phrase "a quoted string"
  
  // synonyms
  "the snippet titles" = "snippet titles"
  
  // grammar
  singular_plural("snippet title", "snippet titles")
  
  // test parsing
  assert_parse("snippet titles are a list of strings", "snippet titles", "are", "a list of strings")
  
  // facts
  snippet titles are a list of strings
  "[OK]" is a quoted string
  
  // rule to answer a question
  fact_question_answer_upperCaseVars("X are Y", "what are X?", "Y")
  
  // check the rule
  assert_answer("what are snippet titles?", "a list of strings")
]];

p-experiment-tt {
  new RuleEngine(inspiration, program).printStuff();
}

Author comment

Began life as a copy of #1014753

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: #1014772
Snippet name: Snippet Title Reasoning v2 [OK, shortened]
Eternal ID of this version: #1014772/7
Text MD5: da6cf4f694b738b9632a4cb719371be6
Transpilation MD5: 5b8957750b278545c80bc4decc628123
Author: stefan
Category: javax / a.i.
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-02 09:10:01
Source code size: 897 bytes / 40 lines
Pitched / IR pitched: No / No
Views / Downloads: 450 / 1565
Version history: 6 change(s)
Referenced in: [show references]