How to use the kuroshiro/src/core-sync function in kuroshiro

To help you get started, we’ve selected a few kuroshiro examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github retorquere / zotero-better-bibtex / content / key-manager / kuroshiro.ts View on Github external
public async init() {
    log.debug('kuroshiro: initializing...')

    if (!Prefs.get('kuroshiro')) {
      log.debug('kuroshiro: disabled')
      return
    }

    try {
      this.kuroshiro = new Kuroshiro()
      await this.kuroshiro.init(new KuromojiAnalyzer('resource://zotero-better-bibtex/kuromoji'))
    } catch (err) {
      log.error('kuroshiro: initializing failed')
      throw err
    }

    log.debug('kuroshiro: ready')
    this.enabled = true
  }

kuroshiro

kuroshiro is a Japanese language library for converting Japanese sentence to Hiragana, Katakana or Romaji with furigana and okurigana modes supported.

MIT
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis