GithubHelp home page GithubHelp logo

djo42 / aromanize-js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fujaru/aromanize-js

0.0 0.0 0.0 24 KB

Korean transliteration tool for JavaScript

License: MIT License

JavaScript 95.07% HTML 4.93%

aromanize-js's Introduction

Aromanize-js

Korean transliteration utility for JavaScript

Aromanize extends the functionality of JavaScript's String class for romanizing Hangul (한글) to Latin (로마자/Romaja) script.

Usage

HTML

Include aromanize.js into your HTML page. All is set!

<script type="text/javascript" src="aromanize.js"></script>
<script type="text/javascript">

	// Converts to Latin script
	"안녕하세요?".romanize(); // annyeonghaseyo?

	// Alternative way to romanize
	Aromanize.romanize("안녕하세요?"); // annyeonghaseyo?
	
	// Romanize using RR Transliteration rule
	Aromanize.hangulToLatin("잘 먹었습니다.", 'rr-translit'); // jal meog-eoss-seubnida.

</script>

If you don't want to extend String class, include aromanize.js?base where you can still access all functions through Aromanize object.

<script type="text/javascript" src="aromanize.js?base"></script>
<script type="text/javascript">

	// Converts to Latin script
	Aromanize.romanize("안녕하세요?"); // annyeonghaseyo?

</script>

Node.js

This module can be installed via npm:

$ npm install aromanize --save
var Aromanize = require("aromanize");

// Converts to Latin script
"안녕하세요?".romanize(); // annyeonghaseyo?

// Alternative way to romanize
Aromanize.romanize("안녕하세요?"); // annyeonghaseyo?

// Romanize using RR Transliteration rule
Aromanize.hangulToLatin("잘 먹었습니다.", 'rr-translit'); // jal meog-eoss-seubnida.

If you don't want to extend String class, use var Aromanize = require("aromanize/base"); where you can still access all functions through Aromanize object.

var Aromanize = require("aromanize/base");

// Converts to Latin script
Aromanize.romanize("안녕하세요?"); // annyeonghaseyo?

Command Line

CLI is available when installed via npm:

$ npm install aromanize -g
$ aromanize

Usage:
  aromanize [TARGET] [OPTIONS] <input>

Example:
  aromanize -r "안녕하세요?"

TARGET:
  -r, --romanize,   
  -l, --latin       Converts to Latin script.
  -c, --cyrillic    Converts to Cyrillic script.

OPTIONS:
      --rule=RULE   Use specified transliteration rule.
      --help        Display this help message.
      
RULE:
  rr                Revised Romanization Transcription (default for -r)
  rr-translit       Revised Romanization Transliteration
  skats             SKATS Coding
  ebi               Indonesian Transcription
  konsevich         Konsevich (default for -c)
		

Documentation

A complete documentation is available at GitHub Wiki

License

Aromanize-js is released under the MIT License.
© 2017 Fajar Chandra

Changelog

  • Added Konsevich for Cyrillic transcription.
  • Fixed ㄹㄹ syllable pairing (e.g. 떨리다)

0.1.5

  • Added an option for hyphenating syllables.
  • Added SKATS transliteration and Indonesian transcription rules.
  • Updated demo page.

0.1.4

  • Added Revised Romanization transliteration rule (rr-translit) for academic application in addition to Revised Romanization transcription rule (rr).
  • Added an option to prevent extending String class.

0.1

  • First pre-release

aromanize-js's People

Contributors

fujaru avatar

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.