!7 sclass NounNotANoun > DynModule { InputChooser inputChooser = new(this); transient SingleComponentPanel form; visualize { ret northAndCenter(wrap(inputChooser), form = singleComponentPanel()); } void update { if (form == null || !inputChooser.update()) ret; L words = words(inputChooser.input()); form.setComponent(makeForm(pairsToParams(map(words, func(S word) -> Pair { ButtonGroup buttons = jradiobuttons("noun", "not a noun", "unclear"); L defs = generalDefinition_get(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); ret pair(setFontSize(18, jRightAlignedLabel(quote(word))), hstack(buttonsInGroup(buttons))); })))); } }