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

23
LINES

< > BotCompany Repo | #1034373 // aic_testSkipSameSizeShorteningsParam

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (14698L/87K).

svoid aic_testSkipSameSizeShorteningsParam() {
  new AICDemo demo;
  //demo.inputText("xx a xx b c xx b a xx xx a a");
  //demo.inputText("xx xx xx xx");
  //print(demo.inputText);
  new L<LPairS> tokenByToken;
  for (param : ll(false, true)) {
    demo.adapt = aic -> aic.skipSameSizeShortenings(param);
    int l = l(demo.compress());
    tokenByToken.add(demo.tokenByToken);
    printVars(+param, +l, escapeWordsUsed := demo.aicComp.escapeWordsUsed);
    demo.decompress();
    assertTrue(demo.decompressedOK);
  }
  int nTok = l(first(tokenByToken));
  for i to nTok: {
    var p1 = first(tokenByToken).get(i);
    var p2 = second(tokenByToken).get(i);
    //if (!eq(p1, p2))
    if (l(p1.b) != l(p2.b))
      printVars(+i, +p1, +p2);
  }
}

Author comment

Began life as a copy of #1016056

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1034373
Snippet name: aic_testSkipSameSizeShorteningsParam
Eternal ID of this version: #1034373/1
Text MD5: 696b85b8e7c14afd8584b6de59cd3428
Transpilation MD5: be35fbaa49c07dea3b54dc4bbbf03871
Author: stefan
Category: javax / compressing text
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-02-03 12:03:16
Source code size: 766 bytes / 23 lines
Pitched / IR pitched: No / No
Views / Downloads: 174 / 241
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1034534 - AIC_EvaluateParameter