Warning: session_start(): open(/var/lib/php/sessions/sess_ujm11k2pu77f51tc696de68ro3, 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
static ReadingComprehensionTest ai_parseReadingComprehensionTest_v1(S rawText, O... _) {
optPar bool printText = true;
new ReadingComprehensionTest test;
LS paragraphs = pnlStructIf(printText, paragraphsTokC(rawText));
L isQ = map(rcurry_swic("Question"), paragraphs);
int idx = falsesFollowedByTrues_changeIndex_assertNotNull(isQ);
LS textPart = takeFirst_clone(paragraphs, idx);
LS questionsPart = sublist(paragraphs, idx);
if (isPreciseMultiDashesHeading(first(textPart))) popFirst(textPart);
test.text = joinWithEmptyLines(textPart);
test.sentences = pnlIf(printText, sentences(test.text));
for (S s : questionsPart) {
LS lines = tlft(s);
assertEquals(4, l(lines));
assertStartsWith(first(lines), "Question ");
S q = second(lines);
LS answersOnLine = regexpGroups("^1(.+)2(.+)$", third(lines));
assertNempty(answersOnLine);
LS answersOnLine2 = regexpGroups("^3(.+)4(.+)$", last(lines));
assertNempty(answersOnLine2);
LS answers = trimAll(concatLists(answersOnLine, answersOnLine2));
add(test.questions, nu(ReadingComprehensionTest.Question.class, question := q, +answers));
print(q);
printStruct(answers);
}
ret test;
}