!7 concept WordInfo { S word; int position; S fact, wordType; } cmodule InfoAboutWords > DynCRUD { S case; S text, comment; enhanceFrame { internalFramePopupMenu(f, jDynamicScrollingMenu("Select case", voidfunc(JPopupMenu menu) { for (S name : subDirectoryNames(programDir())) addMenuItem(menu, name, r { O mod = dm_startNewModule(dm_moduleLibID()); dm_set(mod, caseID := name); dm_showModule(mod); }); })); } visualize as northCenterSouthSections( "Input Text" := fontSizeTimes(1.25, dm_centeredTextField('text)), "Facts" := super.visualize(), "Tell me something about a word:" := dm_textFieldAndSubmit('comment, 'submitComment)); void submitComment { S word = unquote(firstWord(comment)); // magic int i = indexOfIC_fullWord(text, word); // magic if (i < 0) shit: quote(word) + " not found in sentence"; new Matches m; if (match_vbar("* is an adjective|* is an adjective here", comment, m)) cset(uniq_sync WordInfo(+word, position := i), wordType := "adjective", wordType_info := now()); uniq_sync WordInfo(+word, position := i, fact := comment); } }