Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

32
LINES

< > BotCompany Repo | #1027125 // Winograd Multi-Stage Base Code [dev.]

JavaX (incomplete)

1  
S input = "Bob paid for Charlie's college education. He is very [generous/grateful]. Who is [generous/grateful]?";
2  
S multiStage = dm_showNewModule("#1027106/MultiStageProcessing");
3  
4  
// Stage 1: take first option out of square brackets
5  
S input2 = winograd_takeFirstOption(input);
6  
dm_call(multiStage, 'addStage, "Take first option", input2);
7  
8  
// Stage 1b: Split off 's
9  
S input2b = ai_splitOffApostropheS(input);
10  
dm_call(multiStage, 'addStage, "Split off 's", input2b);
11  
12  
// Stage 2: Split into sentences
13  
LS sentences = sentences(input2b);
14  
dm_call(multiStage, 'addStage, "Split into sentences", sentences);
15  
16  
// Stage 2b: Apply patterns to sentences
17  
S parser = dm_makeModule("#1027108/TopDownParsing");
18  
L<virtual TryPatterns> parsed = map(sentences, s -> dm_call(parser, 'parse, s));
19  
dm_call(multiStage, 'addStage, "Apply patterns", parsed);
20  
21  
// Stage 2c: Ask user questions to check validity of assumptions
22  
23  
// Stage 3: Find strong words in input
24  
// [Stage 3: Identify actors in input (people or things)]
25  
26  
// Stage 4: Find a useful scenario in DB
27  
28  
// Stage 5: Map scenario to input
29  
30  
// Stage 6: Identify and answer question
31  
32  
//dm_showListWithFeedback(func -> LS { sentences(input) }, info := litorderedmap(+input));

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: #1027125
Snippet name: Winograd Multi-Stage Base Code [dev.]
Eternal ID of this version: #1027125/1
Text MD5: 655ea2cd82fedadaf75c2137748f0491
Author: stefan
Category: javax / a.i.
Type: JavaX (incomplete)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-02-21 12:58:03
Source code size: 1242 bytes / 32 lines
Pitched / IR pitched: No / No
Views / Downloads: 159 / 185
Referenced in: [show references]