Hiroyuki Komatsu
komat****@users*****
2004年 12月 10日 (金) 20:23:56 JST
Index: suikyo/ruby/src/suikyo-composer.rb diff -u suikyo/ruby/src/suikyo-composer.rb:1.4 suikyo/ruby/src/suikyo-composer.rb:1.5 --- suikyo/ruby/src/suikyo-composer.rb:1.4 Thu Dec 9 18:22:22 2004 +++ suikyo/ruby/src/suikyo-composer.rb Fri Dec 10 20:23:56 2004 @@ -1,6 +1,6 @@ # suikyo-composer.rb: Preedition composer using Suikyo. # This library is for input methods such as PRIME. -# $Id: suikyo-composer.rb,v 1.4 2004/12/09 09:22:22 komatsu Exp $ +# $Id: suikyo-composer.rb,v 1.5 2004/12/10 11:23:56 komatsu Exp $ # # Copyright (C) 2004 Hiroyuki Komatsu <komat****@taiya*****> # All rights reserved. @@ -346,6 +346,7 @@ flag_valid = true flag_original = true + original = "" until chunk.chunk_next == @tail_chunk do chunk = chunk.chunk_next @@ -362,12 +363,21 @@ ## input becomes false. if chunk.original.nil? then flag_original = false + else + original += chunk.original.join() end end if flag_valid == false and flag_original == true then return false end + + ## If the original string has capital characters in the middle of the + ## string, the validation will be false. + ## ex). "FreeWnn" => false, "PRIME" => false, "Anthy" => true + if original =~ /.+[A-Z]/ then + return false + end return true end