Skip to content

LoadOptions

Defined in: node.ts:26

nlpgraph — offline, deterministic Universal-Dependencies parsing in TypeScript.

This is the default (Node) entry. For the browser, import ‘nlpgraph/browser’.

import { NlpGraph } from ‘nlpgraph’; const nlp = await NlpGraph.load(); const doc = await nlp.parse(‘The system shall enforce access control.’);

optional modelDir?: string

Defined in: node.ts:33

Directory with config.json, tokenizer files and the model ONNX. If omitted, resolves in order: NLPGRAPH_MODEL_DIR → a local ./models dir → the on-disk cache → download from R2 on first use (then cached). Preload for CI/Docker with npx nlpgraph download.


optional onnxFile?: string

Defined in: node.ts:35

ONNX filename. Defaults to model.fp16.onnx.