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

16
LINES

< > BotCompany Repo | #1021518 // dm_gazelle_linesToIgnoreForSimpleWikipediaTopic

JavaX fragment (include)

1  
static LPair<S, Int> dm_gazelle_linesToIgnoreForSimpleWikipediaTopic(S topic) {
2  
  L<T3<S>> rules = dm_allRulesFromRulesModuleWithCommentsAndIDs();
3  
  new Matches m;
4  
  new LPair<S, Int> out;
5  
  for (T3<S> t : rules) {
6  
    S text = t.a;
7  
    LS comment = lines(t.b);
8  
    if (neqic(lastLine(text), "=> ignore")) continue;
9  
    if (!matchAny("from simple wikipedia topic *", comment, m)) continue;
10  
    if (neqic($1, topic)) continue;
11  
    if (!jmatchAny("previous lines = *", comment, m)) continue;
12  
    int lineIndex = countLines($1);
13  
    out.add(pair(firstLine(t.a), lineIndex));
14  
  }
15  
  ret out;
16  
}

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: #1021518
Snippet name: dm_gazelle_linesToIgnoreForSimpleWikipediaTopic
Eternal ID of this version: #1021518/9
Text MD5: 3f5277bae22c3af0830a906b30a23b93
Author: stefan
Category: javax / a.i
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-02-16 14:10:24
Source code size: 603 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 287 / 324
Version history: 8 change(s)
Referenced in: [show references]