Libraryless. Click here for Pure Java version (3072L/20K).
1 | // e.g. |
2 | // "pause" is usually a misrecognition of "applause" |
3 | // [Reasoning: speech log entries "pause" at 2019/12/18...] |
4 | |
5 | static L<Proposition> ai_parseStatementsWithReasoning(S text) { |
6 | LS lines = tlft_honoringBrackets(text); |
7 | new L<Proposition> out; |
8 | for i over lines: { |
9 | S next = get(lines, i+1); |
10 | S statement = lines.get(i); |
11 | new Matches m; |
12 | S reasoning = ""; |
13 | if (swicEwic_trim(next, "[Reasoning:", "]", m)) { |
14 | reasoning = m.rest(); |
15 | ++i; |
16 | } |
17 | out.add(withReasoning(statement, reasoning)); |
18 | } |
19 | ret out; |
20 | } |
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1026733 |
Snippet name: | ai_parseStatementsWithReasoning |
Eternal ID of this version: | #1026733/3 |
Text MD5: | e2b48f44e5473c73fd390314e929e6be |
Transpilation MD5: | 4ff14b7bc4a5b9aaaa96ee7f302a6308 |
Author: | stefan |
Category: | javax / ele |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-01-19 21:09:43 |
Source code size: | 565 bytes / 20 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 187 / 268 |
Version history: | 2 change(s) |
Referenced in: | [show references] |