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

18
LINES

< > BotCompany Repo | #1026691 // ai_misrecognitionCandidates2 (as propositions)

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

Libraryless. Click here for Pure Java version (3844L/25K).

static L<WithReasoning<S>> ai_misrecognitionCandidates2() {
  L<WithTimestamp<S>> l = speechLogWithDates();
  new L<WithReasoning<S>> out;
  for i over l: {
    WithTimestamp<S> p = l.get(i);
    continue unless dm_isVoiceCommand(p!);
    int j = i-1;
    while ping (j >= 0 && l.get(j).timestamp >= l.get(j+1).timestamp-10*1000) {
      out.add(WithReasoning(
        format_quoteAll("* is usually a misrecognition of *", l.get(j)!, p!),
        format_noQuote("speech log entries * and *",
          l.get(j).toStringQuoted(),
          p.toStringQuoted())));
      j--;
    }
  }
  ret out;
}

Author comment

Began life as a copy of #1026687

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: #1026691
Snippet name: ai_misrecognitionCandidates2 (as propositions)
Eternal ID of this version: #1026691/4
Text MD5: a7c933df6f4bca2bafa79ba7a9ad1808
Transpilation MD5: 18236f263daa66baafe00b47c4898f82
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-01-19 00:32:03
Source code size: 612 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 120 / 185
Version history: 3 change(s)
Referenced in: [show references]