formosa.rb

Path: lib/formosa.rb
Last Update: Fri Mar 09 22:11:03 +0000 2012
Authors:Lukhnos D. Liu (lukhnos@handlino.com)
Copyright:Copyright (c) 2007 Lukhnos D. Liu
License:Distributed under the New BSD License

Formosa is a Ruby library for processing Taiwanese languages. Major languages spoken in Taiwan include Holo, Hakka, Mandarin and those of the indigenous people. Formosa is the Ruby branch of the lib-formosa project (code.google.com/p/lib-formosa/).

Currently, we focus on the processing of the Holo (Southern Min) language, with necessary tools such as SyllableComposer available for general use.

The following example shows how to use Formosa:

  $KCODE="u"          # set the Ruby environment to use UTF-8
  require "rubygems"
  require "formosa"
  include Formosa::Holo
  poj = SyllableType::POJ
  tl = SyllableType::TL
  SyllableUtility.compose_syllable(poj, tl, "goa2")  # => guá
  SyllableUtility.compose_syllable(tl, poj, "gua2")  # => goá

Required files

active_support   formosa/version   native_syllable_composer/native_syllable_composer   formosa/syllable_utility  

[Validate]