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

13
LINES

< > BotCompany Repo | #1024447 // tatoeba_parseSentencesCSV - to CloseableItIt<T3<Int, language, sentence>>

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

Libraryless. Click here for Pure Java version (2820L/17K).

static CloseableItIt<T3<Int, S, S>> tatoeba_parseSentencesCSV(File f) {
  ret mapI_notNulls_closeable(
    linesFromFile(f),
    s -> {
      LS l = splitAtTab(s);
      ret l(l) != 3 ? null : t3(
        parseInt(first(l)), // sentence ID
        intern(second(l)),  // language name, e.g. "deu" or "eng"
        third(l)            // the sentence
      );
    }
  );
}

Author comment

Began life as a copy of #1024444

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1024447
Snippet name: tatoeba_parseSentencesCSV - to CloseableItIt<T3<Int, language, sentence>>
Eternal ID of this version: #1024447/1
Text MD5: 76fe9007f575b7502e6560292b8bbd8b
Transpilation MD5: dead354b61abdc11c617dc9c93d394c5
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-08-13 09:18:30
Source code size: 383 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 246 / 340
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)