static NLABlock nla_parse(S text) { ret nla_parse(new NLABlock(text)); } // fills and returns original object static NLABlock nla_parse(NLABlock nla) { // parse into lines (or sentences, both is OK) if (nla.lines == null) nla.lines = sentencesOrLines(nla.text); // get entities if (nla.entities == null) { new Matches m; nla.entities = linkedHashSet(); for (S s : nla.lines) if "There is...|there are..." nla.entities.add(new NLABlock.Entity(m.rest(), s)); } }