Giter Site home page Giter Site logo

node-migemo's Introduction

node-migemo

This is a re-implementation of migemo in NodeJS. Migemo is a tool for generating regular expressions for Japanese based on romaji input. Wapuro style input (and therefore most of Kunreishiki and Hepburn) is supported.

migemo demo using searchy

Unlike other migemos, the dictionary is based on Edict2, not SKK, which solves some problems but creates others.

To start using it right away, install together with searchy.

npm install -g migemo searchy

License

The code I have written is released under the WTFPL, do as you like. However, please note the dictionary file is based on edict2 and subject to its terms. I understand this as basically CC-BY-SA-3.0, but please see here.

Other Versions

There are many other implementations of migemo. Besides the original Ruby version you may also be interested in this browser-friendly JS version.

For reference here are the other implementations I'm aware of:

node-migemo's People

Contributors

polm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

node-migemo's Issues

split dictionary & lazy load

Currently the dictionary is one big json file and takes a few seconds to load, creating a noticeable delay. Splitting it in to many files (perhaps even one per kana) and lazy loading as required could remove or at least reduce the delay and make this suitable for non-interactive use (like with running grep repeatedly).

add incremental search at least as an option

In other migemos typically partial searches match full words, for example "toukyo" will match "東京". The obvious way to do this is by making the dictionary a recursive tree; this makes it slower (and increases spurious matches) but can be handy.

Add custom dictionary hook

In the general case you might want to search for some words not in the general dictionary.

Besides that, there are also possible specialist use cases:

  • address form only needs location names
  • cooking site only needs food
  • not strictly Japanese stuff (abbreviations etc.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.