!7 set flag NoFancyMechParsing. sclass WordType extends DynModule { S word; // input L wordTypes; // output JComponent visualize() { ret jSection("WORD TYPE", jCenteredMultiLineLiveValueLabel(dm_calculatedLiveValue(this, S, func -> S { word + " -> " + or2(joinWithComma(wordTypes), "?") }))); } void update { S s = trim(dm_getInterestingString()); if (nempty(s) && setField(word := s)) { Set types = treeSet(); SS map = mechMapCI("Singular => Plural"); if (nempty(map.get(word))) types.add("noun (singular)"); if (nempty(reverseLookupCI(map, word))) types.add("noun (plural)"); if (contains(mechSetCI("Adjectives"), word)) types.add("adjective"); setField(wordTypes := asList(types)); } } }