Giter Site home page Giter Site logo

loretoparisi / kakasi Goto Github PK

View Code? Open in Web Editor NEW
36.0 3.0 7.0 1.28 MB

KAKASI - Kanji Kana Simple Inverter (code mirror)

License: MIT License

Makefile 11.30% Shell 37.50% C 46.69% Objective-C 4.51%
japanese kanji kana transliterator transliterate-japanese

kakasi's Introduction

kakasi

KAKASI - Kanji Kana Simple Inverter

Version 2.3.6 (Code Mirror)

Copyright (C) 1992-1999 Hironobu Takahashi. All rights reserved.

Web site: http://kakasi.namazu.org/index.html.en

Disclaimer

Porting by Loreto Parisi.

Installation

git clone https://github.com/loretoparisi/kakasi.git
cd kakasi
./configure && make
make install

Installation to local folder

mkdir -p build
./configure --prefix=$(PWD)/build
make
make install

Usage

echo "日本が好きです。" | iconv -f utf8 -t eucjp | kakasi -i euc -Ha -Ka -Ja -Ea -ka
nippongasukidesu.

echo "日本が好きです。" | iconv -f utf8 -t eucjp | kakasi -i euc -w | kakasi -i euc -Ha -Ka -Ja -Ea -ka
nippon ga suki desu .

Examples

Conversion using iconv

echo "退屈であくびばっかしていた毎日" | iconv -f utf8 -t eucjp | kakasi -i euc -Ha -Ka -Ja -Ea -ka -s
taikutsu deakubibakkashiteita mainichi

Convertion from Unicode to Shift-JIS

echo "7月31日" | iconv -f utf8 -t shift-jis | kakasi -Ja -Ha -Ka -Ea -s 

Conversion from Shift-JIS to Unicode

echo "7月31日" | iconv -f utf8 -t shift-jis | kakasi -Ja -Ha -Ka -Ea -s | iconv -f shift-jis -t utf8

7 gatsu 31 nichi

To convert into Hiragana:

echo "7月31日" | iconv -f utf8 -t shift-jis | kakasi -JH -KH -Ea -s | iconv -f shift-jis -t utf8

7 がつ 31 にち

Using utf-8 input and output parameters

echo "7月31日" | kakasi -JH -KH -Ea -s -iutf8 -outf8

7 がつ 31 にち

Supported Charset

Character Sets:

a: ascii j: jisroman g: graphic k: kana (j,k defined in jisx0201)

E: kigou K: katakana H: hiragana J: kanji(E,K,H,J defined in jisx0208)

Dictionaries

Dictionaries after installation with make install are available at /usr/local/share/kakasi/kanwadict and /usr/local/share/kakasi/itaijidict. To copy the dictionaries in another location, please set your env:

export ITAIJIDICTPATH=./itaijidict
export KANWADICTPATH=./kanwadict

Help

Usage: kakasi -a[jE] -j[aE] -g[ajE] -k[ajKH] -E[aj] -K[ajkH] -H[ajkKH] -J[ajkKH]
              -i{oldjis,newjis,dec,euc,sjis,utf8} -o{oldjis,newjis,dec,euc,sjis,utf8}
              -r{hepburn,kunrei} -p -s -f -c"chars"  [jisyo1, jisyo2,,,]

      Character Sets:
       a: ascii  j: jisroman  g: graphic  k: kana (j,k     defined in jisx0201)
       E: kigou  K: katakana  H: hiragana J: kanji(E,K,H,J defined in jisx0208)

      Options:
      -i: input coding system    -o: output coding system
      -r: romaji conversion system
      -p: list all readings (with -J option)
      -s: insert separate characters (with -J option)  -S"chars": set separator
      -f: furigana mode (with -J option)
      -F[rl]"chars": set parentheses around furigana
      -c: skip chars within jukugo (with -J option: default TAB CR LF BLANK)
      -C: romaji Capitalize (with -Ja or -Jj option)
      -U: romaji Upcase     (with -Ja or -Jj option)
      -u: call fflush() after 1 character output
      -t: use old romaji table
      -w: wakatigaki mode
      -{l,L}: level {hiragana,furigana} mode (-{l,L}[123456jn])
      -y: display yomi of each kanji characters

Report bugs to <[email protected]>.

kakasi's People

Contributors

loretoparisi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.