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

39
LINES

< > BotCompany Repo | #1021839 // Gazelle: Tokenization Test Case (OK, but we should have different tokenizers for each part of the rule)

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (17806L/103K).

1  
!7
2  
3  
sS data = [[
4  
5  
  -- rule 1
6  
  
7  
  give me cake
8  
  => here is some "cake"
9  
  [tokenize with javaTokNoQuotes]
10  
  
11  
  -- rule 2
12  
  
13  
  gazelle, show me cake
14  
  => !eval gazelle_postGoogleImage("cake")
15  
  [tokenize with javaTokNoQuotes]
16  
17  
  -- test input 1
18  
  
19  
  give me food
20  
  
21  
  -- expected output 1
22  
  
23  
  here is some "food"
24  
  
25  
  -- test input 2
26  
  
27  
  gazelle, show me sausages
28  
  
29  
  -- expected output 2
30  
  
31  
  !eval gazelle_postGoogleImage("sausages")
32  
  
33  
]];
34  
35  
!include once #1021761 // Gazelle Fakery
36  
 
37  
p-exp {
38  
  gazelle_fakery_performTest(data);
39  
}

Author comment

Began life as a copy of #1021764

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1021839
Snippet name: Gazelle: Tokenization Test Case (OK, but we should have different tokenizers for each part of the rule)
Eternal ID of this version: #1021839/7
Text MD5: d73a57fcedf9f7e521e70572b9f7a902
Transpilation MD5: feef9ff0cb9d3bfb46bb534b83a278e7
Author: stefan
Category: javax / gazelle
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-03-01 23:15:55
Source code size: 573 bytes / 39 lines
Pitched / IR pitched: No / No
Views / Downloads: 226 / 638
Version history: 6 change(s)
Referenced in: [show references]