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).

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

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: 247 / 341
Referenced in: [show references]