c4cfbe2
libkkc - Japanese Kana Kanji conversion library
c4cfbe2
======
c4cfbe2
[![Build Status](https://travis-ci.org/ueno/libkkc.svg?branch=master)](https://travis-ci.org/ueno/libkkc) [![Coverage Status](https://img.shields.io/coveralls/ueno/libkkc.svg)](https://coveralls.io/r/ueno/libkkc)
c4cfbe2
c4cfbe2
What's this?
c4cfbe2
------
c4cfbe2
c4cfbe2
libkkc provides a converter from Kana-string to
c4cfbe2
Kana-Kanji-mixed-string.  It was named after kkc.el in GNU Emacs, a
c4cfbe2
simple Kana Kanji converter, while libkkc tries to convert sentences
c4cfbe2
in a bit more complex way using N-gram language models.
c4cfbe2
c4cfbe2
Install
c4cfbe2
------
c4cfbe2
c4cfbe2
1. compile and install [marisa-trie](https://code.google.com/p/marisa-trie/)
c4cfbe2
c4cfbe2
2. compile and install
c4cfbe2
c4cfbe2
```
c4cfbe2
$ ./autogen.sh
c4cfbe2
$ make
c4cfbe2
$ make install
c4cfbe2
```
c4cfbe2
c4cfbe2
3. run kkc program
c4cfbe2
c4cfbe2
```
c4cfbe2
$ kkc
c4cfbe2
Type kana sentence in the following form:
c4cfbe2
SENTENCE [N-BEST [SEGMENT-BOUNDARY...]]
c4cfbe2
c4cfbe2
>> わたしのなまえはなかのです
c4cfbe2
0: <わたし/わたし><の/の><名前/なまえ><は/は><中野/なかの><で/で><す/す>
c4cfbe2
c4cfbe2
# get 3 matches instead of 1
c4cfbe2
>> わたしのなまえはなかのです 3
c4cfbe2
0: <わたし/わたし><の/の><名前/なまえ><は/は><中野/なかの><で/で><す/す>
c4cfbe2
1: <私/わたし><の/の><名前/なまえ><は/は><中野/なかの><で/で><す/す>
c4cfbe2
2: <わたし/わたし><の/の><名前/なまえ><は/は><中野/なかの><デス/です>
c4cfbe2
c4cfbe2
# enlarge the second segment (の -> のな)
c4cfbe2
>> わたしのなまえはなかのです 1 3 5
c4cfbe2
0: <わたし/わたし><のな/のな><前/まえ><は/は><中野/なかの><で/で><す/す>
c4cfbe2
c4cfbe2
# shrink the fourth segment (なかの -> なか)
c4cfbe2
>> わたしのなまえはなかのです 1 3 4 7 8 10
c4cfbe2
0: <わたし/わたし><の/の><名前/なまえ><は/は><中/なか><の/の><で/で><す/す>
c4cfbe2
```
c4cfbe2
c4cfbe2
License
c4cfbe2
------
c4cfbe2
```
c4cfbe2
GPLv3+
c4cfbe2
c4cfbe2
Copyright (C) 2011-2014 Daiki Ueno <ueno@gnu.org>
c4cfbe2
Copyright (C) 2011-2014 Red Hat, Inc.
c4cfbe2
c4cfbe2
This file is free software; as a special exception the author gives
c4cfbe2
unlimited permission to copy and/or distribute it, with or without
c4cfbe2
modifications, as long as this notice is preserved.
c4cfbe2
c4cfbe2
This file is distributed in the hope that it will be useful, but
c4cfbe2
WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
c4cfbe2
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
c4cfbe2
```