Neofox / KoreanConjugatorServer

JavaScript server for conjugating Korean words. Uses the algorithm built by Dan Bravender.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Korean Conjugator Server

A JavaScript server for conjugating Korean words. Uses the algorithm built by Dan Bravender. This is the same server used by Hanji, but with sensistive data removed.

Usage

First instal the required node packages:

npm install

Then launch main.js:

node main.js

You should get a 'listening' message if everything is working correctly.

Routes

/stem

Takes a word in conjugated form and returns it's infinitive form.

/conjugate

Takes a word in infinitive form and returns a JSON array of conjugation objects.

/searchKor

This is the main route for Korean searches. It takes a word in either infinitive or conjugated form. If the infinitive form is given or found, it will redirect to /conjugate and display the word's conjugations. If more than one infinitive form is found, then it will display a JSON array of the forms.

/defineKor

Takes a Korean word in infinitive form and returns it's definition. Since this repo isn't connected to the database, this route will not work by default.

/defineEng

Takes an English word and returns a list of possible Korean matches. Since this repo isn't connected to the database, this route will not work by default.

Acknowledgements

This project could not have been done without the initial algorithm built by Dan Bravender. This project is basically a server wrapper around his code, most of it hasn't been modified.

The database I use with this server is kengdic. While this repo is not connected to it by default, it's pretty easy to modify the source code to work with a local PostgreSQL server.

About

JavaScript server for conjugating Korean words. Uses the algorithm built by Dan Bravender.

License:GNU Affero General Public License v3.0


Languages

Language:JavaScript 100.0%