-
description
- this is an alternative of kyfd
- forked from kyfd last commit
- same version as kyfd-0.0.5
- modification
- changed default installed directory - installation files will not be located in `/usr/local` but in `pwd`/install - changed include directory structure - `include/fyfd/*` -> `include/*` - changed ostream to ostringstream for decode(in, out) - move `handleArgument()` to public - added tab separator to outputs when using `-nbest n`, `-output score` options - built libkyfd_static.a static library - executed `parseConfigFile()` before `handleArgument()` - forked from kyfd last commit
- created c and python interface based on the modified version
- this is an alternative of kyfd
-
prerequisite
- aclocal, automake, libtoolize, autoheader, autoconf
aclocal (GNU automake) 1.11.1 automake (GNU automake) 1.11.1 libtoolize (GNU libtool) 2.2.6b autoheader (GNU Autoconf) 2.63 autoconf (GNU Autoconf) 2.63$ cd xerces-c-3.1.4 $ ./configure ; make ; sudo make install# you should download 'openfst-1.3.2' $ openfst-1.3.2 $ ./configure ; make ; sudo make install -
how to compile
$ pwd
$ /home
$ git clone https://github.com/dsindex/kyfd
$ cd kyfd
$ ./buildconf
$ ./configure ; make ; make install
$ ls install
bin include lib
- how to test
- download prebuilt FST and config file
$ cd kyfd/src/bin $ curl -OL https://shleekr.github.io/public/data/rouzeta.tar.gz $ tar -zxvf rouzeta.tar.gz $ cp -rf KFST/Tagger/* . $ cat testme.txt | ./kyfd koreanuni.xml -------------------------- -- Started Kyfd Decoder -- -------------------------- Loaded configuration, initializing decoder... Loading fst korfinaluni.fst... Done initializing, took 0 seconds Decoding... λ /np λ /pt <space> ν κ΅ /nc μ μ /pa <space> 곡 λΆ /na ν /xv _γ λ λ€ /ef . /sf μ /nc μ /po <space> κΈ /irrs /vb μ΄ /ex <space> λ² λ¦¬ /vx μ /ep λ€ /ef . /sf κ³ λ§ /irrb /vj μ /ep λ€ /ef . /sf λ /np λ /pt <space> λ΅ /nc μ /po <space> λͺ¨ λ₯΄ /irrl /vb μ /ec . /sf μ§ λ /vb _γ΄ /ed <space> 1 8 /nb μΌ /nc <space> ν μ€ /nc <space> 3 /nb μ /nc <space> κ²½ λ¨ /nr <space> λ§ μ° μ /nr μ /nc μ΄ /ps <space> ν μ /irrh /vj μ΄ μ /ef <space> μ μ /vj μ /ep λ€ /ef . /sf μΌ μ° /ad <space> μΌ μ΄ λ /vb λ /ed <space> μ /nc κ° /ps <space> νΌ κ³€ /ns ν /xj λ€ /ef ( /sl μ μ /nc ) /sr . /sf κ½ /nc μ΄ /ps <space> ν /nc <space> κ³³ /nc μ /po <space> μ /vb κ³ /ec μ /vj λ€ /ef . /sf μ΄ κ² /nm μ /pt <space> μ¬ κ³Ό /nc μ΄ /pp λ€ /ef . /sf μ μ /nc λ₯Ό /po <space> μ° /nc <space> μ¬ λ /nc μ /pt <space> κ·Έ /np μ΄ /pp λ€ /ef . /sf μ¬ κ³Ό /nc _γΉ /po <space> λ¨Ή /vb κ² /ep λ€ /ef . /sf ν₯ μ½ /nc μ /pt <space> ν₯ μ΄ /nc μ /pd <space> κ΅ μ‘ /nc κ³Ό /pc <space> κ²½ μ /nc λ₯Ό /po <space> κ΄ μ₯ /nc ν΄ /nc <space> μ μ /nc μ /po <space> μ΄ μ /na ν /xv λ©΄ μ /ef <space> μ€ μ /nc <space> μ λΆ /nc <space> λ± μ© λ¬Έ /nc μΈ /nc <space> λ κ³Ό /nc <space> μ μ μ 격 /nc μ /po <space> λΆ μ¬ /na ν /xv λ /ed <space> ν₯ μ /nc λ₯Ό /po <space> μ£Ό κ΄ /nc ν κ³ /pq <space> ν λ /nc μ΄ /ps <space> λ€ /vb λ©΄ /ex <space> 곑 μ /nc μ /po <space> λ λ /vb λ /ed <space> μ νΈ λΆ μ‘° /nc μ /pc <space> μ ν© /nc μ /pa <space> λ° λ₯΄ /vb _γ΄ /ed <space> μ μ λ£ /nc <space> μ° λ μ μ© /nc μ /po <space> μ ν /vb λ κ° /ef <space> ν /vb λ©΄ /ex <space> ν μ μ¬ λ² /nc μ /pa <space> λ ν /vb μ΄ /ex <space> ν λ² /nc μ /po <space> κ° ν /vb λ /ed <space> μ¬ λ² λΆ /nc <space> μ ν /nc κΉ μ§ /px <space> λ΄ λΉ /na ν /xv μ μ /ep λ€ /ef . /sf Done decoding, took 0 seconds