Uses 911K of libraries. Click here for Pure Java version (16572L/91K).
!7 concept WordInfo { S word; int position; S fact, wordType; } cmodule InfoAboutWords > DynCRUD<WordInfo> { S text, comment; 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); } }
download show line numbers debug dex old transpilations
Travelled to 9 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1021017 |
Snippet name: | Info about words |
Eternal ID of this version: | #1021017/30 |
Text MD5: | c7638d3a42a20eb97c4cbdc8379d1301 |
Transpilation MD5: | 69797d7858f850dae7c4262b7b943007 |
Author: | stefan |
Category: | javax |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-01-18 04:45:57 |
Source code size: | 902 bytes / 26 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 418 / 4393 |
Version history: | 29 change(s) |
Referenced in: | [show references] |