hdt-java
hdt-java copied to clipboard
Add methods to HDTManager store an index at custom place
Currently, a index created with HDTManager::doIndexedHDT
will automatically be storied to a default path (the working directory). It would be very helpful to provide methods to
- create an index in memory, without writing them to the file system; current workaround:
((TriplesPrivate) hdt.getTriples()).generateIndex(null);
- store a existing index into a provided
OutputStream out
; current workaround:
((TriplesPrivate) hdt.getTriples()).saveIndex(out, new ControlInformation(), null);
- Load an earlier created index from a provided
InputStream in
; current workaround:
ControlInformation ci = new ControlInformation();
ci.load(in);
((TriplesPrivate) hdt.getTriples()).loadIndex(in, ci, null);
I think, a user of the library should not need to go that deep into the implementation to do this.
Hi @jmkeil would you mind opening a PR for this?
Hi @jmkeil would you mind opening a PR for this?
As I decided against using HDT in my project, I don't have time to do that. Sorry.