Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.
/ hikibiki-data Public archive

Common package for synchronizing with and reading hikibiki data sources

Notifications You must be signed in to change notification settings

birchill/hikibiki-data

Repository files navigation

⚠️ Obsolete: This has been replaced by the @birchill/jpdict-idb package ⚠️

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

About

Common package for synchronizing with and reading hikibiki data sources

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •  

Languages