hfstol
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

hfst-optimized-lookup

An npm-installable library version of hfst-optimized-lookup, originally built for itwêwina.

Installation

yarn add hfstol

Usage

const { Transducer } = require('hfstol');
const fst = new Transducer('crk-analyzer.hfstol');
fst.lookup('atim')
// ⇒ ["atim+N+A+Sg", "atimêw+V+TA+Imp+Imm+2Sg+3SgO"]
fst.lookup_symbols('atim')
// ⇒ [["a", "t", "i", "m", "+N", "+A", "+Sg"],
//    ["a", "t", "i", "m", "ê", "w", "+V", "+TA", "+Imp", "+Imm", "+2Sg", "+3SgO"]]
fst.lookup_lemma_with_affixes('atim')
// ⇒ [
//     [[], "atim", ["+N", "+A", "+Sg"]],
//     [[], "atimêw", ["+V", "+TA", "+Imp", "+Imm", "+2Sg", "+3SgO"]],
//   ];

Windows support

This package has been successfully run on Windows, but we do not currently include pre-built binaries in the npm package or test it in CI.

You will need to follow the [NodeJS windows instructions] to install Python and C++ build tools for the package installation to succeed.

[NodeJS windows instructions] https://github.com/nodejs/node-gyp#on-windows

Development notes

Largely based on the python version, the node-addon-api docs, and node-addon-examples.

Readme

Keywords

none

Package Sidebar

Install

npm i hfstol

Weekly Downloads

0

Version

0.0.3

License

Apache-2.0

Unpacked Size

108 kB

Total Files

11

Last publish

Collaborators

  • nienna73
  • andrewdotn
  • dwhieb
  • madoshakalaka
  • eddieantonio