// e.g."if a snippet contains token X, it also contains token Y"; static NLABlock ai_pronounResolvedToNLA(S s) { s = ai_dropFillers1(s); print(s); AI_PronounResolver1 resolver = new(s); resolver.run(); print(resolver.nounPhrases); print(resolver.pronouns); for (Map mapping : resolver.allMappings()) { L pwt = replaceElementsUsingMap(resolver.pwt, mapping); pnl(pwt); new NLABlock nla; new Map entityMapping; for (ParsedWithToken p : values(mapping)) { S name = (S) t!; NLABlock.Line line = nla.new Line("there is " + name); nla.lines.add(line); NLABlock.Entity e = nla.new Entity(name, line); nla.entities.add(e); entityMapping.put(p, e); } replaceElementsUsingMap(pwt, entityMapping); nla.lines.add(); } }