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; }