Warning: session_start(): open(/var/lib/php/sessions/sess_83k7juuqdnloubvs7o3422muha, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
persistable sclass NLABlock {
S text; // original text
LS lines; // same, split into lines
Set entities; // entities
L parsedLines;
sclass Line {
S text;
int index;
Entity introducedEntity;
L proposition; // fragments
toString {
ret joinWithSpace(proposition)
+ (introducedEntity == null ? "" : " => " + introducedEntity);
}
}
sclass Entity extends Cluster {
S definedInLine;
*(S name, S *definedInLine) { addSynonym(name); }
}
*(S *text) {}
bool isParsed() { ret parsedLines != null; }
toString {
ret !isParsed() ? text : lines_rtrim(parsedLines);
}
L withoutIntros() {
ret filter(parsedLines, line -> line.introducedEntity == null);
}
}