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

10
LINES

< > BotCompany Repo | #1028740 // test_nla_parse (OK)

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (4893L/30K).

svoid test_nla_parse() {
  NLABlock nla = nla_parse("There is a plan. The plan works.");
  assertEqualsVerbose(1, l(nla.entities));
  NLABlock.Entity thePlan = first(nla.entities);
  assertEqualsVerbose(litciset("a plan", "the plan"), thePlan.synonyms);
  assertEqualsVerbose(2, l(nla.parsedLines));
  assertEqualsVerbose(ll(thePlan, null), collect introducedEntity(nla.parsedLines));
  assertEqualsVerbose(ll(thePlan, Fragment("works")), second(nla.parsedLines).proposition);
  pnl(nla.parsedLines);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1028740
Snippet name: test_nla_parse (OK)
Eternal ID of this version: #1028740/5
Text MD5: 7ae91d6d4c37d5b9b6505058aae9d760
Transpilation MD5: d9b0639140f2fa39481dc4d128f7639b
Author: stefan
Category: javax / natural language assembly
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-06 21:11:28
Source code size: 511 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 122 / 202
Version history: 4 change(s)
Referenced in: [show references]