Skip to content

dsindex/kyfd

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

39 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

kyfd

  • description

    • this is an alternative of kyfd
      - 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()`
      
    • created c and python interface based on the modified version
  • 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
    

About

kyfd alternative

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 97.7%
  • Makefile 1.1%
  • Other 1.2%