io.github.nicheapplab.tcodeengine

Members list

Type members

Classlikes

class BatchEngine

Generates Japanese characters from key strokes defined by T-Code

Generates Japanese characters from key strokes defined by T-Code

BatchEngine provides batched conversion into Japanese. Prefix key strokes should be handled outside of the library. The other engine, io.github.nicheapplab.tcodeengine.InteractiveEngine will handle prefix key strokes and inflex specification.

scala> import io.github.nicheapplab.tcodeengine._
scala> val engine = new BatchEngine with QwertyLayout
scala> engine.convert("hgjdkdhgjdhgjgjd;gjdkd;gjdja;g")
val res0: String = "で、ので、では、を、のを、とを"

Alternatively, a predefined DvorakLayout can be specified.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
trait Combinator

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
class Object
trait Matchable
class Any
trait DvorakLayout extends Layout

Provides validation of Dvorak key stroke for T-Code

Provides validation of Dvorak key stroke for T-Code

Attributes

Companion
object
Supertypes
trait Layout
class Object
trait Matchable
class Any
object DvorakLayout

Defines the keyboard layout of DvorakLayout

Defines the keyboard layout of DvorakLayout

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type

Generates Japanese characters from key cordinates or Qwerty key chars with T-Code

Generates Japanese characters from key cordinates or Qwerty key chars with T-Code

InteractiveEngine provides batched conversion into Japanese. Prefix key strokes should be included in the input key strokes. In the following example, "fj" indicates entering Mixed Conversion mode (as "△", internally). In this mode, user can feed kanji and hiragana mixed input and generates conversion candidates through convert() function.

scala> import io.github.nicheapplab.tcodeengine._
scala> val engine = new InteractiveEngine with QwertyLayout
scala> "fjyijstt".foreach(ie.put(_))
scala> ie.inflexRight()
scala> ie.convert()
scala> ie.selectCandidate(0)
scala> ie.commit()
val res0: String = "記者"

To use kanji composition, type the prefix "jf" to enter Composition mode (as "▲", internally). Composition mode can be nested as well as inside of Mixed Conversion mode. In the following example, after typing "fjjfpw", its internal buffer will be "△▲木". Followed by ".v" (corresponds to "目"), "▲木" will be popped and composition consumes them, generating "相". The internal buffer will be "△相". Then typing ".d" ("つ") and "dt"("ぐ") will make the internal buffer to "△相つぐ". InteractiveEngine.inflexLeft() makes it to "△相つ|ぐ", which indicates "ぐ" is the inflex for the conversion. InteractiveEngine.convert() will clear the buffer and put the candidates into InteractiveEngine.candidates buffer. The user then can choose the desired candidate with its index of the buffer, such as ie.selectCandidates(3). This will clear the candidates buffer and put the converted text "相次ぐ" into outputBuffer. To extract text from outputBuffer, call InteractiveEngine.commit().

scala> val ie = new InteractiveEngine with QwertyLayout
scala> "fjjfpw.v.ddt".foreach(ie.put(_))
scala> ie.inflexLeft()
scala> ie.convert()
scala> ie.selectCandidates(0)
scala> "fjjeux".foreach(ie.put(_))
scala> ie.inflexRight()
scala> ie.convert()
scala> ie.selectCandidate(3)
scala> "kgjwjc".foreach(ie.put(_))
scala> ie.commit()
val res0: String = "相次ぐ火事により"

Alternatively, a predefined DvorakLayout can be specified.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
abstract trait Layout

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
class Object
trait Matchable
class Any
trait QwertyLayout extends Layout

Provides validation of Qwerty keys stroke for T-Code

Provides validation of Qwerty keys stroke for T-Code

Attributes

Companion
object
Supertypes
trait Layout
class Object
trait Matchable
class Any
object QwertyLayout

Defines the keyboard layout of QwertyLayout

Defines the keyboard layout of QwertyLayout

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
object Strokes

Provides the map of Qwerty two-keys-stroke to Japanese character

Provides the map of Qwerty two-keys-stroke to Japanese character

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Strokes.type