This package has been deprecated

Author message:

Please use @birchill/jpdict-idb instead

@birchill/hikibiki-data
TypeScript icon, indicating that this package has built-in type declarations

7.5.1 • Public • Published

Usage

NOTE: There are TWO versions of the database:

  • JpdictDatabase which does not allow searching for words by their glosses (e.g. searching for "eat" to find 食べる) or searching for words that contain particular a particular kanji.

    i.e. getWordsWithGloss and getWordsWithKanji will always return an empty result when using this database.

  • JpdictFullTextDatabase which does allow searching for words on gloss or kanji.

Currently you need to decide once when you create the database which version you need. There is no facility to switch between the two.

The reason is that the indices for searching for glosses / kanji are expensive to create and take up disk space, and some applications (e.g. Rikaichamp) simply don't need them.

Furthermore, hopefully the project is structured such that if you only use JpdictDatabase then after tree-shaking your final bundle should not include all the tokenization / stop word code for generating and querying the gloss indices.

Building

yarn build

Running tests

yarn test

Testing a specific browser:

yarn test --browsers FirefoxNightly

In test watch mode:

npx karma start --browsers FirefoxNightly

The version of karma-firefox-launcher used here should work under WSL but for Chrome you'll want to use something like:

CHROME_BIN=/mnt/c/Program\ Files\ \(x86\)/Google/Chrome/Application/chrome.exe npx karma start --browsers Chrome

That will complain about not being able to write to the temp directory but otherwise should be fine.

Publishing

yarn release
git push --follow-tags origin main
yarn publish

Readme

Keywords

none

Package Sidebar

Install

npm i @birchill/hikibiki-data

Weekly Downloads

17

Version

7.5.1

License

none

Unpacked Size

968 kB

Total Files

47

Last publish

Collaborators

  • birtles