Uses 11335K of libraries. Click here for Pure Java version (16084L/109K).
1 | static SuffixTree_managed loadOnDiskSuffixTree(File treeFile, File textFile) { |
2 | bool toUpper = true; |
3 | CloseableCharSequence text1 = iso8859_readOnlyFileAsCharSequence(textFile, noToString := true); |
4 | CharSequence text = toUpper ? virtualToUpper(text1) : text1; |
5 | print(l(text)); |
6 | IIntMemory mem = ROMIntMemoryFromFile(treeFile); |
7 | print(mem.size()); |
8 | SuffixTree_managed tree = new(mem, 1); |
9 | tree.fullText = text; |
10 | tree.dependentCloseables = ll(text1, optCast AutoCloseable(mem)); |
11 | ret tree; |
12 | } |
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: | 219 / 333 |
Version history: | 8 change(s) |
Referenced in: | [show references] |