[Prime-cvs] CVS update: suikyo/ruby/src

Back to archive index

Hiroyuki Komatsu komat****@users*****
2004年 12月 14日 (火) 17:21:09 JST


Index: suikyo/ruby/src/suikyo-composer.rb
diff -u suikyo/ruby/src/suikyo-composer.rb:1.7 suikyo/ruby/src/suikyo-composer.rb:1.8
--- suikyo/ruby/src/suikyo-composer.rb:1.7	Mon Dec 13 18:06:02 2004
+++ suikyo/ruby/src/suikyo-composer.rb	Tue Dec 14 17:21:09 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.7 2004/12/13 09:06:02 komatsu Exp $
+# $Id: suikyo-composer.rb,v 1.8 2004/12/14 08:21:09 komatsu Exp $
 #
 # Copyright (C) 2004 Hiroyuki Komatsu <komat****@taiya*****>
 #     All rights reserved.
@@ -103,6 +103,13 @@
     }
   end
 
+  def set_table_entry (input, output, pending = nil, unescape = true)
+    @suikyo.table.set(input, output, pending, unescape)
+  end
+  def set_reverse_table_entry (input, output, pending = nil, unescape = true)
+    @suikyo_reverse.table.set(input, output, pending, unescape)
+  end
+
   ###
   ### Undo operations
   ###
@@ -307,11 +314,11 @@
     until chunk.chunk_next == @tail_chunk do 
       chunk = chunk.chunk_next
       if chunk.original.nil? then
-        return nil
+        return []
       end
       original += chunk.original
     end
-    return original
+    return [ original.join() ]
   end
 
   ## This method returns a translated string under the current mode.
@@ -450,6 +457,21 @@
     end
   end
 
+  ## This returns a list which has two entries, the raw input and
+  ## the converted string.  ex). "kom" => ["kom", "こm"]
+  def edit_get_conversion ()
+    conversions = []
+    raw_input  = edit_get_raw_input()
+    if raw_input then
+      conversions += raw_input
+    end
+
+    conversion = edit_get_surface_string()
+    if conversion != raw_input then
+      conversions.push(conversion)
+    end
+    return conversions
+  end
 
   ## This method returns a list of candidate strings completed from the 
   ## preedition string.  For example, in the case the preedition is "sh",


Prime-cvs メーリングリストの案内
Back to archive index