Libraryless. Click here for Pure Java version (4949L/31K).
static NLABlock nla_simplifyIntroductions(S text) { ret nla_simplifyIntroductions(nla_parse(text)); } static NLABlock nla_simplifyIntroductions(NLABlock nla) { nla_parse(nla); for (NLABlock.Line line : nla.introductions()) { // simplify introduction line.proposition = frag("var *", line.introducedEntity); // introduce a new proposition NLABlock.Line prop = nla.new Line; prop.proposition // = frag("* is *", line.introducedEntity, line.introducedEntity.firstSynonym()); = frag("* is " + line.introducedEntity.firstSynonym(), line.introducedEntity); nla.parsedLines.add(line.index()+1, prop); } ret nla; }
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: | #1028749 |
Snippet name: | nla_simplifyIntroductions |
Eternal ID of this version: | #1028749/8 |
Text MD5: | d21c2b24830fbcc7b2af6221e75448bc |
Transpilation MD5: | 6e66d1da679b6f50fe9e82a1f1d397f1 |
Author: | stefan |
Category: | javax / nla |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-07-07 00:41:53 |
Source code size: | 676 bytes / 19 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 227 / 333 |
Version history: | 7 change(s) |
Referenced in: | [show references] |