Warning: session_start(): open(/var/lib/php/sessions/sess_nrklr37qf28c8i9drbsff6qg37, 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
sclass NounNotANoun > DynModule {
InputChooser inputChooser = new(this);
transient SingleComponentPanel form;
visualize {
ret northAndCenter(wrap(inputChooser),
jfullcenter(form = singleComponentPanel()));
}
void update {
if (form == null || !inputChooser.update()) ret;
L words = words(inputChooser.input());
form.setComponent(makeForm(pairsToParams(map(words,
func(fS word) -> Pair {
ButtonGroup buttons = jradiobuttons("noun", "not a noun", "unclear");
L defs = generalDefinition_texts(word);
bool a = cic(defs, "a noun");
bool b = cic(defs, "not a noun");
bool c = a == b;
selectRadioButton(buttons, c ? 2 : b ? 1 : 0);
onRadioButtonChange(buttons, voidfunc(int i) {
print(word + " => " + i);
});
ret pair(setFontSize(18, jRightAlignedLabel(quote(word))), hstack(buttonsInGroup(buttons)));
}))));
}
}