property of class JsNgramReader
Description
Store indexes from json files as the same structure as JsNgram.db
.
Example
# This is meant to compare to the original in a test. # where ix is the original, and src is a json directory: chk = jsngram.jsngram.JsNgramReader(src) chk.read_files(True) res = 'OK' if chk.db == ix.db else 'NG'
Usage
Data structure is as followings: { index-key: [ [doc-path, start-position], [doc-path, start-position] ], index-key: [ [doc-path, start-position] ] }