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

51
LINES

< > BotCompany Repo | #1004567 // Try Column Prediction 2 (with actual text)

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

Libraryless. Click here for Pure Java version (4655L/30K/101K).

!752

static BWImage bw;
static Thread producer;
static Reproducing rp;
static ImageSurface imageSurface;

!include #1004562 // column prediction
!include #1004570 // predictors

p {
  rp = new Reproducing;
  //bw = loadBWImage("#1004541");
  //bw = makeTriangle();
  Font font = loadFont("#1004569"); // "Ticketing"
  bw = new BWImage(renderText(font, 20f, "ABC 123 + 456 = 789"));
  imageSurface = showBWImage(bw);
  rp.bw = bw;
  //rp.imageSurfaceToUpdateWithBest = showImage(bw.getBufferedImage());
  
  //rp.startProduction = r { produce() };
  //rp.search();
  
  //showColumnErrors("LookLeft(width=8)");
  
  produce();
  while licensed {
    S desc = grabFromQueue(rp.newProducts);
    Predictor p = makePredictor(desc);
    float[][] cols = rp.getCols();
    double score = testColumnRange(p, cols, 0, 15, l(cols));
    print(desc);
    print("  " + score);
    //imageSurface.setImage(renderPrediction(desc, cols));
  }
}

static void produce() {
  cancelThread(producer);
  producer = new Thread(r {
    // STRATEGY!
    
    rp.push("RepeatColumn");
    rp.push("ShiftDown");
    rp.push("LookLeft(width=7)");
    rp.push("LookLeft(width=8)");
    rp.push("LookLeft(width=9)");
    rp.push("LookLeft(width=10)");
  }, "Producer");
  producer.start();
}

Author comment

Began life as a copy of #1004563

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1004567
Snippet name: Try Column Prediction 2 (with actual text)
Eternal ID of this version: #1004567/1
Text MD5: 63e9d4fefe56d26651a8d301dab3d877
Transpilation MD5: 0edcda68a025bbe30d4f061f3d94312f
Author: stefan
Category: javax / a.i.
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-08-21 17:09:59
Source code size: 1314 bytes / 51 lines
Pitched / IR pitched: No / No
Views / Downloads: 635 / 747
Referenced in: [show references]