en-japan-air / scala-juman-knp   0.0.8

GitHub

Scala wrapper around JUMAN and KNP.

Scala versions: 2.10 2.11

scala-juman-knp

Build Status Coverage Status

Scala wrapper around JUMAN and KNP.

How to install

In your build.sbt:

resolvers += "en-japan Maven OSS" at "http://dl.bintray.com/en-japan/maven-oss"

libraryDependencies += "com.enjapan" %% "scala-juman-knp" % "0.0.5"

How to use

Normal mode

Example:

import com.enjapan.knp.KNP

val knp = new KNPCli()
val blist = knp("京都大学に行った。")

blist.root.traverse(println)

Server mode

import com.enjapan.knp.KNP

KNP.withServerBackedClient { knp =>
  (1 to 1000).foreach { _ =>
    val blist = knp.parse("京都大学に行った。")
    blist.root.traverse(println)
  }
}