[Prime-cvs] CVS update: prime/lib/makedict

Back to archive index

Hiroyuki Komatsu komat****@users*****
2004年 12月 22日 (水) 03:25:16 JST


Index: prime/lib/makedict/dictformat-usage.rb
diff -u /dev/null prime/lib/makedict/dictformat-usage.rb:1.1.2.1
--- /dev/null	Wed Dec 22 03:25:16 2004
+++ prime/lib/makedict/dictformat-usage.rb	Wed Dec 22 03:25:16 2004
@@ -0,0 +1,32 @@
+# dictformat-usage.rb: Converter module for my usage dict.
+# $Id: dictformat-usage.rb,v 1.1.2.1 2004/12/21 18:25:16 komatsu Exp $
+#
+# Copyright (C) 2004 Hiroyuki Komatsu <komat****@taiya*****>
+#     All rights reserved.
+#     This is free software with ABSOLUTELY NO WARRANTY.
+#
+# You can redistribute it and/or modify it under the terms of 
+# the GNU General Public License version 2.
+
+require 'prime/makedict/dictformat'
+$KCODE = 'e'
+
+class DictFormatUsage < DictFormat
+  def initialize (is_interactive = true)
+    super(is_interactive)
+    @default_pos  = nil
+    @default_freq = 0
+    @default_attr = nil
+  end
+
+  def parse (line)
+    if line =~ /^ *;/ then
+      return nil
+    end
+    line.chomp!
+    (reading, pos, literal, comment) = line.split(/\t/)
+    comment = "usage=" + comment
+    result = [reading, pos, literal, @default_freq, comment]
+    return [result]
+  end
+end
Index: prime/lib/makedict/.cvsignore
diff -u prime/lib/makedict/.cvsignore:1.2 prime/lib/makedict/.cvsignore:1.2.4.1
--- prime/lib/makedict/.cvsignore:1.2	Fri Mar 26 02:19:51 2004
+++ prime/lib/makedict/.cvsignore	Wed Dec 22 03:25:16 2004
@@ -1,2 +1,3 @@
 Makefile
 Makefile.in
+*.dict


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