Uses 4281K of libraries. Click here for Pure Java version (7902L/54K/196K).
1 | !7 |
2 | |
3 | static JLabel l; |
4 | static Map<S> consequentsMap = synchroCIMap(); |
5 | |
6 | p-noconsole { |
7 | autoUpdate(); |
8 | |
9 | final JFrame frame = showMaximizedFrame(jscroll_verticalExtend_trackWidth(jTiledBackground(#1007195, |
10 | setForeground(Color.white, setFontSize(120, l = jcenteredlabel()))))); |
11 | |
12 | final VF1<S> toConsequentsMap = consequentsMap_receiver(consequentsMap); |
13 | time "Loading" { |
14 | loading { |
15 | mapVoid(toConsequentsMap, dropLast(linesOfFile(speechRecognitionLog()))); |
16 | } |
17 | } |
18 | |
19 | tailFileLinewisePlusLastLine(speechRecognitionLog(), 100, voidfunc(S utterance) { |
20 | utterance = trimLastLine(utterance); |
21 | if (!isProperlyQuoted(utterance)) ret; |
22 | utterance = unquote(utterance); |
23 | if (empty(utterance)) ret; |
24 | print(">> " + utterance); |
25 | utterance = trimSubstring(utterance, indexOf(utterance, ']')+1); |
26 | |
27 | toConsequentsMap.get(utterance); |
28 | S answer = consequentsMap.get(utterance); |
29 | if (nempty(answer)) |
30 | utterance += "\n\n" + answer; |
31 | |
32 | setTitle(frame, utterance); |
33 | setText(l, jlabel_textAsHTML_center(utterance)) |
34 | }); |
35 | } |
Began life as a copy of #1014110
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1014125 |
Snippet name: | VisualKatze 2 [Association Machine, OK, run with #1013936] |
Eternal ID of this version: | #1014125/16 |
Text MD5: | 6cd66a43bb95343dd6a63b8a96a530df |
Transpilation MD5: | a0302dc8c17bdc12596ea0d567052b99 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-04-11 04:56:34 |
Source code size: | 1098 bytes / 35 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 416 / 710 |
Version history: | 15 change(s) |
Referenced in: | [show references] |