dawgjs
v0.1.4
Published
DAWG reader for node.js and the browser
Downloads
9
Maintainers
Readme
dawgjs reads DAWG files created by dawgdic C++ library or DAWG python package.
DAWG (directed acyclic word graph, also called DAFSA) is a data structure that lets you efficiently store sets of strings and also provides prefix search.
Installation
npm install dawgjs
Usage
typescript
import { readStringMapDawgSync } from 'dawgjs'
let dawg = readStringMapDawgSync('dawg-file.dawg', bytes => {
let view = new DataView(bytes.buffer)
return {
paradigmId: view.getUint16(0, true),
indexInParadigm: view.getUint8(2)
}
})
let morphologicalInterpretations = [...dawg.get('pierogi')]
es6
// todo