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

12
LINES

< > BotCompany Repo | #1029256 // loadOnDiskSuffixTree

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

Uses 11335K of libraries. Click here for Pure Java version (16084L/109K).

static SuffixTree_managed loadOnDiskSuffixTree(File treeFile, File textFile) {
  bool toUpper = true;
  CloseableCharSequence text1 = iso8859_readOnlyFileAsCharSequence(textFile, noToString := true);
  CharSequence text = toUpper ? virtualToUpper(text1) : text1;
  print(l(text));
  IIntMemory mem = ROMIntMemoryFromFile(treeFile);
  print(mem.size());
  SuffixTree_managed tree = new(mem, 1);
  tree.fullText = text;
  tree.dependentCloseables = ll(text1, optCast AutoCloseable(mem));
  ret tree;
}

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: #1029256
Snippet name: loadOnDiskSuffixTree
Eternal ID of this version: #1029256/9
Text MD5: aff0deaba90c644342be37d71192214f
Transpilation MD5: 97fc1f01217ef67eb4f9ba94ed793ae7
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-27 18:36:09
Source code size: 510 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 218 / 331
Version history: 8 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1029283 - loadOnDiskIntSuffixTree