Uses 911K of libraries. Click here for Pure Java version (7989L/40K).
1 | !7 |
2 | |
3 | cprint { |
4 | start-thread { |
5 | dm_useLocalMechListCopies(); |
6 | |
7 | S s = "if a snippet contains token X, it also contains token Y"; |
8 | LS tok = javaTok(s); |
9 | L<ParsedWithTokens<S>> pronouns = pwt_allPronouns(tok); |
10 | print("Pronouns", pronouns); |
11 | for (ParsedWithTokens<S> p : pronouns) p.replaceTokens("bla"); |
12 | print(join(tok)); |
13 | //print(first(ai_pronounResolvedToNLA(s))); |
14 | //ret ai_parseIfThen(s); |
15 | |
16 | new RecordCalls rec; |
17 | for (PairS p : getVars(ai_findNounPlusVar(s))) |
18 | rec.get("addEntity", joinPairWithSpace(p)); |
19 | for (DeterminerPlusNoun x : getVars(ai_findSimplestNounPhrases(s))) |
20 | rec.get("addEntity", x.render()); |
21 | |
22 | print(rec); |
23 | LS entities = secondOfListsWhereFirstEqic("addEntity", rec.calls); |
24 | |
25 | VarMaker entityNameMaker = entityNameMaker(s); |
26 | SS map = freshVarsMap(entities, entityNameMaker); |
27 | print(s = replacePhrases(s, map)); |
28 | |
29 | print(ai_parseIfThen(s)); |
30 | } |
31 | } |
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: | #1028892 |
Snippet name: | Find Entities Spike |
Eternal ID of this version: | #1028892/1 |
Text MD5: | 7625883901caa95560f5a2692d935895 |
Transpilation MD5: | 0606d3e1b9e9ed359157430b277f8f96 |
Author: | stefan |
Category: | javax |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-07-10 19:55:26 |
Source code size: | 973 bytes / 31 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 228 / 310 |
Referenced in: | [show references] |