Generating TDB Dataset from archive containing N-TRIPLES files

后端 未结 1 1543
终归单人心
终归单人心 2021-01-27 06:36

Apologies, in advance, for a possible duplicate.

I have an archive containing 117,426 files (each in the N-TRIPLES format) that I wish to load into the defa

相关标签:
1条回答
  • 2021-01-27 07:32

    As a genenral comment, one way is to concatenate the N-Triples files to generate one single file.

    You can load many files at once with either tdbloader or tdbloader2.

    tdbloader --loc DB ... your files ...
    

    The 117,426 may strain you OS for a single command line invocation. You can pipe the files into tdbloader (it's just like concatenating the files first)

    ... | tdbloader --loc DB -- -
    

    where ... is some way to get bash to cat the files (possible from a subshell).

    e.g. (you'll need to adjust to file all 117,426 files):

    ( for x in data*.nt
      do
        cat $x 
      done
    ) | tdbloader --loc DB -- -
    
    0 讨论(0)
提交回复
热议问题