Libraryless. Click here for Pure Java version (4893L/30K).
1 | svoid test_nla_parse() { |
2 | NLABlock nla = nla_parse("There is a plan. The plan works."); |
3 | assertEqualsVerbose(1, l(nla.entities)); |
4 | NLABlock.Entity thePlan = first(nla.entities); |
5 | assertEqualsVerbose(litciset("a plan", "the plan"), thePlan.synonyms); |
6 | assertEqualsVerbose(2, l(nla.parsedLines)); |
7 | assertEqualsVerbose(ll(thePlan, null), collect introducedEntity(nla.parsedLines)); |
8 | assertEqualsVerbose(ll(thePlan, Fragment("works")), second(nla.parsedLines).proposition); |
9 | pnl(nla.parsedLines); |
10 | } |
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: | 236 / 347 |
Version history: | 4 change(s) |
Referenced in: | [show references] |