Warning: session_start(): open(/var/lib/php/sessions/sess_8h0s4ifq03gbs3a2ld79ducskf, 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
!7
set flag DynModule.
cmodule InputTokenizer > DynBigInputAndSections {
S functions = joinWithComma(
f javaTok,
f javaTokWithBrackets,
f javaTokNPunct,
f javaTokWithAngleBrackets);
JComponent wrapTextArea(JTextArea textArea) {
ret centerAndSouthWithMargins(textArea,
withLabel("Tokenization functions:", dm_textField('functions));
}
void makeSections_impl() {
S text = this.text;
JTextPane tp = fontSizePlus(5, setFont(typeWriterFont(), jTextPane()));
bool first = true;
LPair toks = map_pcall(functions(), fn -> pair(fn, (LS) callAndMake(fn, text)));
// find out max width
int maxWidth = 0;
for (LS tok : pairsB(toks)) {
ai_tokenizationToTextPane(jTextPane(), tok);
maxWidth = max(maxWidth, ai_tokenizationToTextPane_charsWritten!);
}
for (Pair fAndTok : toks) pcall {
if (!first) appendToTextPane(tp, "\n"); else first = false;
ai_tokenizationToTextPane(tp, fAndTok.b);
appendToTextPane(tp, spaces(maxWidth-ai_tokenizationToTextPane_charsWritten!+1) + "[" + fAndTok.a + "]");
}
addSection("Tokenizations", tp);
}
LS functions() { ret tok_allIdentifiers(functions); }
}