You can subscribe to this list here.
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
(58) |
May
(28) |
Jun
(308) |
Jul
(11) |
Aug
(1) |
Sep
|
Oct
(3) |
Nov
(4) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(4) |
Feb
(8) |
Mar
(3) |
Apr
(3) |
May
(8) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
| 2009 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <ik...@us...> - 2007-06-12 01:34:58
|
Revision: 1412
http://tomoe.svn.sourceforge.net/tomoe/?rev=1412&view=rev
Author: ikezoe
Date: 2007-06-11 18:34:58 -0700 (Mon, 11 Jun 2007)
Log Message:
-----------
ext -> bindings.
spec -> test.
Modified Paths:
--------------
tomoe/trunk/benchmark/convert-char.rb
tomoe/trunk/benchmark/load-dict.rb
tomoe/trunk/benchmark/search-by-dict.rb
tomoe/trunk/benchmark/search-by-recognizer.rb
Modified: tomoe/trunk/benchmark/convert-char.rb
===================================================================
--- tomoe/trunk/benchmark/convert-char.rb 2007-06-12 01:28:47 UTC (rev 1411)
+++ tomoe/trunk/benchmark/convert-char.rb 2007-06-12 01:34:58 UTC (rev 1412)
@@ -3,11 +3,11 @@
benchmark_dir = File.expand_path(File.dirname(__FILE__))
top_dir = File.expand_path(File.join(benchmark_dir, ".."))
test_dir = File.join(top_dir, "test")
-$LOAD_PATH.unshift(File.join(top_dir, "ext", "ruby", ".libs"))
-$LOAD_PATH.unshift(File.join(top_dir, "ext", "ruby"))
+$LOAD_PATH.unshift(File.join(top_dir, "bindings", "ruby", ".libs"))
+$LOAD_PATH.unshift(File.join(top_dir, "bindings", "ruby"))
$LOAD_PATH.unshift(File.join(test_dir))
-require "tomoe-spec-utils"
+require "tomoe-test-utils"
xml = <<-XML
<character>
Modified: tomoe/trunk/benchmark/load-dict.rb
===================================================================
--- tomoe/trunk/benchmark/load-dict.rb 2007-06-12 01:28:47 UTC (rev 1411)
+++ tomoe/trunk/benchmark/load-dict.rb 2007-06-12 01:34:58 UTC (rev 1412)
@@ -3,15 +3,15 @@
benchmark_dir = File.expand_path(File.dirname(__FILE__))
top_dir = File.expand_path(File.join(benchmark_dir, ".."))
test_dir = File.join(top_dir, "test")
-$LOAD_PATH.unshift(File.join(top_dir, "ext", "ruby", ".libs"))
-$LOAD_PATH.unshift(File.join(top_dir, "ext", "ruby"))
+$LOAD_PATH.unshift(File.join(top_dir, "bindings", "ruby", ".libs"))
+$LOAD_PATH.unshift(File.join(top_dir, "bindings", "ruby"))
$LOAD_PATH.unshift(File.join(test_dir))
-require "tomoe-spec-utils"
+require "tomoe-test-utils"
n = 3
Benchmark.bmbm do |x|
- dictionary = TomoeSpecUtils::Path.dictionary
+ dictionary = TomoeTestUtils::Path.dictionary
x.report(File.basename(dictionary)) do
n.times {Tomoe::DictXML.new("filename" => dictionary,
"editable" => false)}
Modified: tomoe/trunk/benchmark/search-by-dict.rb
===================================================================
--- tomoe/trunk/benchmark/search-by-dict.rb 2007-06-12 01:28:47 UTC (rev 1411)
+++ tomoe/trunk/benchmark/search-by-dict.rb 2007-06-12 01:34:58 UTC (rev 1412)
@@ -3,15 +3,15 @@
benchmark_dir = File.expand_path(File.dirname(__FILE__))
top_dir = File.expand_path(File.join(benchmark_dir, ".."))
test_dir = File.join(top_dir, "test")
-$LOAD_PATH.unshift(File.join(top_dir, "ext", "ruby", ".libs"))
-$LOAD_PATH.unshift(File.join(top_dir, "ext", "ruby"))
+$LOAD_PATH.unshift(File.join(top_dir, "bindings", "ruby", ".libs"))
+$LOAD_PATH.unshift(File.join(top_dir, "bindings", "ruby"))
$LOAD_PATH.unshift(File.join(test_dir))
-require "tomoe-spec-utils"
+require "tomoe-test-utils"
n = 10
dict_type = ARGV.shift
-tmp_dir = TomoeSpecUtils::Path.tmp_dir
+tmp_dir = TomoeTestUtils::Path.tmp_dir
Benchmark.bmbm do |x|
dictionary = TomoeSpecUtils::Path.dictionary
case dict_type
Modified: tomoe/trunk/benchmark/search-by-recognizer.rb
===================================================================
--- tomoe/trunk/benchmark/search-by-recognizer.rb 2007-06-12 01:28:47 UTC (rev 1411)
+++ tomoe/trunk/benchmark/search-by-recognizer.rb 2007-06-12 01:34:58 UTC (rev 1412)
@@ -4,13 +4,13 @@
benchmark_dir = File.expand_path(File.dirname(__FILE__))
top_dir = File.expand_path(File.join(benchmark_dir, ".."))
test_dir = File.join(top_dir, "test")
-$LOAD_PATH.unshift(File.join(top_dir, "ext", "ruby", ".libs"))
-$LOAD_PATH.unshift(File.join(top_dir, "ext", "ruby"))
+$LOAD_PATH.unshift(File.join(top_dir, "bindings", "ruby", ".libs"))
+$LOAD_PATH.unshift(File.join(top_dir, "bindings", "ruby"))
$LOAD_PATH.unshift(File.join(test_dir))
-require 'tomoe-spec-utils'
+require 'tomoe-test-utils'
-data_dir = TomoeSpecUtils::Path.data_dir
+data_dir = TomoeTestUtils::Path.data_dir
use_est = false
if use_est
database = File.join(data_dir, "handwriting")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2007-06-12 01:28:46
|
Revision: 1411
http://tomoe.svn.sourceforge.net/tomoe/?rev=1411&view=rev
Author: makeinu
Date: 2007-06-11 18:28:47 -0700 (Mon, 11 Jun 2007)
Log Message:
-----------
Replace ext with bindings.
Modified Paths:
--------------
tomoe/trunk/ChangeLog
tomoe/trunk/benchmark/Makefile.am
Modified: tomoe/trunk/ChangeLog
===================================================================
--- tomoe/trunk/ChangeLog 2007-06-12 01:27:25 UTC (rev 1410)
+++ tomoe/trunk/ChangeLog 2007-06-12 01:28:47 UTC (rev 1411)
@@ -1,6 +1,6 @@
2007-06-12 Takuro Ashie <as...@ho...>
- * module/dict/Makefile.am: Replace ext with bindings.
+ * module/dict/Makefile.am, benchmark/Makefile.am: Replace ext with bindings.
2007-06-12 Kouhei Sutou <ko...@co...>
Modified: tomoe/trunk/benchmark/Makefile.am
===================================================================
--- tomoe/trunk/benchmark/Makefile.am 2007-06-12 01:27:25 UTC (rev 1410)
+++ tomoe/trunk/benchmark/Makefile.am 2007-06-12 01:28:47 UTC (rev 1411)
@@ -8,7 +8,7 @@
search-by-dict.rb \
convert-char.rb
-benchmark: $(top_builddir)/ext/ruby/tomoe.la
+benchmark: $(top_builddir)/bindings/ruby/tomoe.la
for bench in $(benchmark_files); \
do \
echo "running benchmark: $$bench"; \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ik...@us...> - 2007-06-12 01:27:23
|
Revision: 1410
http://tomoe.svn.sourceforge.net/tomoe/?rev=1410&view=rev
Author: ikezoe
Date: 2007-06-11 18:27:25 -0700 (Mon, 11 Jun 2007)
Log Message:
-----------
add one more ja-on reading.
Modified Paths:
--------------
tomoe/trunk/test/python/test_dict_xml.py
Modified: tomoe/trunk/test/python/test_dict_xml.py
===================================================================
--- tomoe/trunk/test/python/test_dict_xml.py 2007-06-12 01:26:33 UTC (rev 1409)
+++ tomoe/trunk/test/python/test_dict_xml.py 2007-06-12 01:27:25 UTC (rev 1410)
@@ -17,6 +17,7 @@
<utf8>池</utf8>
<number-of-strokes>6</number-of-strokes>
<readings>
+ <reading type="ja_on">タ</reading>
<reading type="ja_on">チ</reading>
<reading type="ja_kun">いけ</reading>
<reading type="ja_unknown">あんのうん</reading>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ik...@us...> - 2007-06-12 01:26:32
|
Revision: 1409
http://tomoe.svn.sourceforge.net/tomoe/?rev=1409&view=rev
Author: ikezoe
Date: 2007-06-11 18:26:33 -0700 (Mon, 11 Jun 2007)
Log Message:
-----------
* module/dict-tomoe-dict-mysql.c: Suport prefix search.
Modified Paths:
--------------
tomoe/trunk/ChangeLog
tomoe/trunk/module/dict/tomoe-dict-mysql.c
Modified: tomoe/trunk/ChangeLog
===================================================================
--- tomoe/trunk/ChangeLog 2007-06-12 01:24:41 UTC (rev 1408)
+++ tomoe/trunk/ChangeLog 2007-06-12 01:26:33 UTC (rev 1409)
@@ -13,6 +13,7 @@
* module/dict/tomoe-dict-est.c, module/dict/tomoe-dict-ptr-array.c:
Now reading search is prefix search.
* test/test_context.rb: Fix test results suited for prefix search.
+ * module/dict-tomoe-dict-mysql.c: Suport prefix search.
2007-06-11 Kouhei Sutou <ko...@co...>
Modified: tomoe/trunk/module/dict/tomoe-dict-mysql.c
===================================================================
--- tomoe/trunk/module/dict/tomoe-dict-mysql.c 2007-06-12 01:24:41 UTC (rev 1408)
+++ tomoe/trunk/module/dict/tomoe-dict-mysql.c 2007-06-12 01:26:33 UTC (rev 1409)
@@ -796,8 +796,11 @@
reading = tomoe_reading_get_reading (tomoe_reading);
if (reading) {
- g_string_append (sql, " AND reading = ");
- append_string_value (dict, sql, reading);
+ gchar *tmp;
+ g_string_append (sql, " AND reading LIKE ");
+ tmp = g_strdup_printf ("%s%%", reading);
+ append_string_value (dict, sql, tmp);
+ g_free (tmp);
g_string_append (sql, "\n");
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2007-06-12 01:24:48
|
Revision: 1408
http://tomoe.svn.sourceforge.net/tomoe/?rev=1408&view=rev
Author: makeinu
Date: 2007-06-11 18:24:41 -0700 (Mon, 11 Jun 2007)
Log Message:
-----------
Update.
Modified Paths:
--------------
tomoe/trunk/module/dict/tomoe-unihan-data.h
Modified: tomoe/trunk/module/dict/tomoe-unihan-data.h
===================================================================
--- tomoe/trunk/module/dict/tomoe-unihan-data.h 2007-06-12 01:24:14 UTC (rev 1407)
+++ tomoe/trunk/module/dict/tomoe-unihan-data.h 2007-06-12 01:24:41 UTC (rev 1408)
@@ -1,4 +1,3 @@
-
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
DO NOT EDIT!
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2007-06-12 01:24:18
|
Revision: 1407
http://tomoe.svn.sourceforge.net/tomoe/?rev=1407&view=rev
Author: makeinu
Date: 2007-06-11 18:24:14 -0700 (Mon, 11 Jun 2007)
Log Message:
-----------
Update.
Modified Paths:
--------------
tomoe/trunk/module/dict/tomoe-unihan-data.h
Modified: tomoe/trunk/module/dict/tomoe-unihan-data.h
===================================================================
--- tomoe/trunk/module/dict/tomoe-unihan-data.h 2007-06-12 01:22:43 UTC (rev 1406)
+++ tomoe/trunk/module/dict/tomoe-unihan-data.h 2007-06-12 01:24:14 UTC (rev 1407)
@@ -1,3 +1,4 @@
+
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
DO NOT EDIT!
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2007-06-12 01:22:41
|
Revision: 1406
http://tomoe.svn.sourceforge.net/tomoe/?rev=1406&view=rev
Author: makeinu
Date: 2007-06-11 18:22:43 -0700 (Mon, 11 Jun 2007)
Log Message:
-----------
Replace ext with bindings.
Modified Paths:
--------------
tomoe/trunk/ChangeLog
tomoe/trunk/module/dict/Makefile.am
Modified: tomoe/trunk/ChangeLog
===================================================================
--- tomoe/trunk/ChangeLog 2007-06-12 01:05:22 UTC (rev 1405)
+++ tomoe/trunk/ChangeLog 2007-06-12 01:22:43 UTC (rev 1406)
@@ -1,3 +1,7 @@
+2007-06-12 Takuro Ashie <as...@ho...>
+
+ * module/dict/Makefile.am: Replace ext with bindings.
+
2007-06-12 Kouhei Sutou <ko...@co...>
* db/init.rb, db/xml2db.rb, module/dict/unihan-compiler.rb:
Modified: tomoe/trunk/module/dict/Makefile.am
===================================================================
--- tomoe/trunk/module/dict/Makefile.am 2007-06-12 01:05:22 UTC (rev 1405)
+++ tomoe/trunk/module/dict/Makefile.am 2007-06-12 01:22:43 UTC (rev 1406)
@@ -25,7 +25,7 @@
-DRUBY_LIBDIR=\""$(ruby_libdir)"\"
INCLUDES = \
- -I$(top_srcdir)/ext/ruby \
+ -I$(top_srcdir)/bindings/ruby \
$(TOMOE_CFLAGS) \
$(EST_CFLAGS) \
$(SVN_CFLAGS) \
@@ -91,7 +91,7 @@
cd $(top_builddir)/data && $(MAKE) $(AM_MAKEFLAGS) kanjidic2.xml
tomoe-unihan-data.h: unihan-compiler.rb Unihan.stamp $(top_builddir)/data/kanjidic2.xml
- $(RUBY) -I$(top_srcdir)/ext/ruby -I$(top_builddir)/ext/ruby/.libs \
+ $(RUBY) -I$(top_srcdir)/bindings/ruby -I$(top_builddir)/bindings/ruby/.libs \
-I$(top_srcdir)/test unihan-compiler.rb \
Unihan.txt $(top_srcdir)/data/kanjidic2.xml > $@.tmp || exit 1;
mv $@.tmp $@
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2007-06-12 01:05:22
|
Revision: 1405
http://tomoe.svn.sourceforge.net/tomoe/?rev=1405&view=rev
Author: makeinu
Date: 2007-06-11 18:05:22 -0700 (Mon, 11 Jun 2007)
Log Message:
-----------
Call tomoe_gtk_init() and tomoe_gtk_quit().
Modified Paths:
--------------
scim-tomoe/trunk/ChangeLog
scim-tomoe/trunk/src/scim_tomoe.cpp
Modified: scim-tomoe/trunk/ChangeLog
===================================================================
--- scim-tomoe/trunk/ChangeLog 2007-06-12 00:54:08 UTC (rev 1404)
+++ scim-tomoe/trunk/ChangeLog 2007-06-12 01:05:22 UTC (rev 1405)
@@ -1,3 +1,7 @@
+2007-06-12 Takuro Ashie <as...@ho...>
+
+ * src/scim_tomoe.cpp: Call tomoe_gtk_init() and tomoe_gtk_quit().
+
2007-05-07 Takuro Ashie <as...@ho...>
* src/scim_tomoe_prefs_widget.cpp: Check TOMOE_GTK_HAS_GUCHARMAP flag.
Modified: scim-tomoe/trunk/src/scim_tomoe.cpp
===================================================================
--- scim-tomoe/trunk/src/scim_tomoe.cpp 2007-06-12 00:54:08 UTC (rev 1404)
+++ scim-tomoe/trunk/src/scim_tomoe.cpp 2007-06-12 01:05:22 UTC (rev 1405)
@@ -205,7 +205,7 @@
setenv ("DISPLAY", display.c_str (), 1);
gtk_init (&argc, &argv);
- //tomoe_gtk_init ();
+ tomoe_gtk_init ();
helper_agent.signal_connect_exit (slot (slot_exit));
helper_agent.signal_connect_update_screen (slot (slot_update_screen));
@@ -307,7 +307,7 @@
// run
gtk_main ();
- //tomoe_gtk_quit ();
+ tomoe_gtk_quit ();
}
static void
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kt...@us...> - 2007-06-12 00:54:08
|
Revision: 1404
http://tomoe.svn.sourceforge.net/tomoe/?rev=1404&view=rev
Author: ktou
Date: 2007-06-11 17:54:08 -0700 (Mon, 11 Jun 2007)
Log Message:
-----------
* module/dict/unihan-compiler.rb: followed the current changes.
Modified Paths:
--------------
tomoe/trunk/ChangeLog
tomoe/trunk/module/dict/unihan-compiler.rb
Modified: tomoe/trunk/ChangeLog
===================================================================
--- tomoe/trunk/ChangeLog 2007-06-12 00:46:46 UTC (rev 1403)
+++ tomoe/trunk/ChangeLog 2007-06-12 00:54:08 UTC (rev 1404)
@@ -1,6 +1,7 @@
2007-06-12 Kouhei Sutou <ko...@co...>
- * db/init.rb, db/xml2db.rb: followed the current changes.
+ * db/init.rb, db/xml2db.rb, module/dict/unihan-compiler.rb:
+ followed the current changes.
2007-06-12 Hiroyuki Ikezoe <poi...@ik...>
Modified: tomoe/trunk/module/dict/unihan-compiler.rb
===================================================================
--- tomoe/trunk/module/dict/unihan-compiler.rb 2007-06-12 00:46:46 UTC (rev 1403)
+++ tomoe/trunk/module/dict/unihan-compiler.rb 2007-06-12 00:54:08 UTC (rev 1404)
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
-require 'tomoe-spec-utils'
+require 'tomoe-test-utils'
require 'uconv'
require 'suikyo/suikyo'
@@ -45,11 +45,11 @@
end
def ucs4_to_utf8(ucs4)
- TomoeSpecUtils::Unicode.ucs4_to_utf8(Integer("0x#{ucs4}"))
+ TomoeTestUtils::Unicode.ucs4_to_utf8(Integer("0x#{ucs4}"))
end
def utf8_to_ucs4(utf8)
- "%X" % TomoeSpecUtils::Unicode.utf8_to_ucs4(utf8)
+ "%X" % TomoeTestUtils::Unicode.utf8_to_ucs4(utf8)
end
def cache(filename)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kt...@us...> - 2007-06-12 00:46:43
|
Revision: 1403
http://tomoe.svn.sourceforge.net/tomoe/?rev=1403&view=rev
Author: ktou
Date: 2007-06-11 17:46:46 -0700 (Mon, 11 Jun 2007)
Log Message:
-----------
* db/xml2db.rb: followed the current changes.
Modified Paths:
--------------
tomoe/trunk/ChangeLog
tomoe/trunk/db/xml2db.rb
Modified: tomoe/trunk/ChangeLog
===================================================================
--- tomoe/trunk/ChangeLog 2007-06-12 00:44:14 UTC (rev 1402)
+++ tomoe/trunk/ChangeLog 2007-06-12 00:46:46 UTC (rev 1403)
@@ -1,6 +1,6 @@
2007-06-12 Kouhei Sutou <ko...@co...>
- * db/init.rb: followed the current mail.
+ * db/init.rb, db/xml2db.rb: followed the current changes.
2007-06-12 Hiroyuki Ikezoe <poi...@ik...>
Modified: tomoe/trunk/db/xml2db.rb
===================================================================
--- tomoe/trunk/db/xml2db.rb 2007-06-12 00:44:14 UTC (rev 1402)
+++ tomoe/trunk/db/xml2db.rb 2007-06-12 00:46:46 UTC (rev 1403)
@@ -9,7 +9,7 @@
def utf8_to_ucs4(utf8)
if utf8
- TomoeSpecUtils::Unicode.utf8_to_ucs4(utf8)
+ TomoeTestUtils::Unicode.utf8_to_ucs4(utf8)
else
nil
end
@@ -24,10 +24,10 @@
`#{migrate}`
puts "done."
-filename = TomoeSpecUtils::Path.dictionary
+filename = TomoeTestUtils::Path.dictionary
dict = Tomoe::DictXML.new("filename" => filename,
"editable" => false)
-config = TomoeSpecUtils::Config.db_config.merge("editable" => true)
+config = TomoeTestUtils::Config.db_config.merge("editable" => true)
mysql_dict = Tomoe::DictMySQL.new(config)
cands = dict.search(Tomoe::Query.new)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kt...@us...> - 2007-06-12 00:44:14
|
Revision: 1402
http://tomoe.svn.sourceforge.net/tomoe/?rev=1402&view=rev
Author: ktou
Date: 2007-06-11 17:44:14 -0700 (Mon, 11 Jun 2007)
Log Message:
-----------
* db/init.rb: followed the current mail.
Modified Paths:
--------------
tomoe/trunk/ChangeLog
tomoe/trunk/db/init.rb
Modified: tomoe/trunk/ChangeLog
===================================================================
--- tomoe/trunk/ChangeLog 2007-06-11 23:51:22 UTC (rev 1401)
+++ tomoe/trunk/ChangeLog 2007-06-12 00:44:14 UTC (rev 1402)
@@ -1,3 +1,7 @@
+2007-06-12 Kouhei Sutou <ko...@co...>
+
+ * db/init.rb: followed the current mail.
+
2007-06-12 Hiroyuki Ikezoe <poi...@ik...>
* lib/tomoe-reading.[ch]: Add tomoe_reading_has_prefix().
Modified: tomoe/trunk/db/init.rb
===================================================================
--- tomoe/trunk/db/init.rb 2007-06-11 23:51:22 UTC (rev 1401)
+++ tomoe/trunk/db/init.rb 2007-06-12 00:44:14 UTC (rev 1402)
@@ -10,9 +10,9 @@
$LOAD_PATH.unshift(File.join(top, "ext", "ruby", ".libs"))
$LOAD_PATH.unshift(File.join(top, "ext", "ruby"))
-require 'tomoe-spec-utils'
+require 'tomoe-test-utils'
-config = TomoeSpecUtils::Config.db_config_for_active_record(ENV["TOMOE_ENV"])
+config = TomoeTestUtils::Config.db_config_for_active_record
ActiveRecord::Base.establish_connection(config)
logger = Logger.new($stdout)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ik...@us...> - 2007-06-11 23:51:24
|
Revision: 1401
http://tomoe.svn.sourceforge.net/tomoe/?rev=1401&view=rev
Author: ikezoe
Date: 2007-06-11 16:51:22 -0700 (Mon, 11 Jun 2007)
Log Message:
-----------
* lib/tomoe-reading.[ch]: Add tomoe_reading_has_prefix().
* module/dict/tomoe-dict-est.c, module/dict/tomoe-dict-ptr-array.c:
Now reading search is prefix search.
* test/test_context.rb: Fix test results suited for prefix search.
Modified Paths:
--------------
tomoe/trunk/ChangeLog
tomoe/trunk/lib/tomoe-reading.c
tomoe/trunk/lib/tomoe-reading.h
tomoe/trunk/module/dict/tomoe-dict-est.c
tomoe/trunk/module/dict/tomoe-dict-ptr-array.c
tomoe/trunk/test/test_context.rb
Modified: tomoe/trunk/ChangeLog
===================================================================
--- tomoe/trunk/ChangeLog 2007-06-11 11:15:49 UTC (rev 1400)
+++ tomoe/trunk/ChangeLog 2007-06-11 23:51:22 UTC (rev 1401)
@@ -1,3 +1,10 @@
+2007-06-12 Hiroyuki Ikezoe <poi...@ik...>
+
+ * lib/tomoe-reading.[ch]: Add tomoe_reading_has_prefix().
+ * module/dict/tomoe-dict-est.c, module/dict/tomoe-dict-ptr-array.c:
+ Now reading search is prefix search.
+ * test/test_context.rb: Fix test results suited for prefix search.
+
2007-06-11 Kouhei Sutou <ko...@co...>
* test/tomoe-test-utils.rb, test/test_context.rb: fixed test when
Modified: tomoe/trunk/lib/tomoe-reading.c
===================================================================
--- tomoe/trunk/lib/tomoe-reading.c 2007-06-11 11:15:49 UTC (rev 1400)
+++ tomoe/trunk/lib/tomoe-reading.c 2007-06-11 23:51:22 UTC (rev 1401)
@@ -262,6 +262,28 @@
return strcmp (priv_a->reading, priv_b->reading);
}
+gboolean
+tomoe_reading_has_prefix (TomoeReading *reading, const TomoeReading *prefix_reading)
+{
+ TomoeReadingPrivate *priv_a, *priv_b;
+
+ if (!reading || !prefix_reading) return TRUE;
+
+ priv_a = TOMOE_READING_GET_PRIVATE (reading);
+ priv_b = TOMOE_READING_GET_PRIVATE (prefix_reading);
+ if (!priv_a || !priv_b) return 0;
+
+ if (!priv_a->reading || !priv_b->reading) return TRUE;
+
+ if (priv_a->type != priv_b->type &&
+ (priv_a->type != TOMOE_READING_UNKNOWN &&
+ priv_b->type != TOMOE_READING_UNKNOWN)) {
+ return FALSE;
+ }
+
+ return g_str_has_prefix (priv_a->reading, priv_b->reading);
+}
+
/*
vi:ts=4:nowrap:ai:expandtab
*/
Modified: tomoe/trunk/lib/tomoe-reading.h
===================================================================
--- tomoe/trunk/lib/tomoe-reading.h 2007-06-11 11:15:49 UTC (rev 1400)
+++ tomoe/trunk/lib/tomoe-reading.h 2007-06-11 23:51:22 UTC (rev 1401)
@@ -67,6 +67,9 @@
gint tomoe_reading_compare (const TomoeReading *a,
const TomoeReading *b);
+gboolean tomoe_reading_has_prefix (TomoeReading *reading,
+ const TomoeReading *prefix_reading);
+
G_END_DECLS
#endif /* __TOMOE_READING_H__ */
Modified: tomoe/trunk/module/dict/tomoe-dict-est.c
===================================================================
--- tomoe/trunk/module/dict/tomoe-dict-est.c 2007-06-11 11:15:49 UTC (rev 1400)
+++ tomoe/trunk/module/dict/tomoe-dict-est.c 2007-06-11 23:51:22 UTC (rev 1401)
@@ -617,7 +617,7 @@
case TOMOE_READING_INVALID:
case TOMOE_READING_UNKNOWN:
default:
- expr = g_strdup_printf ("all_readings STRRX (\\s|^)%s(\\s|$)", read_str);
+ expr = g_strdup_printf ("all_readings STRRX (\\s|^)%s", read_str);
est_cond_add_attr (cond, expr);
g_free (expr);
break;
Modified: tomoe/trunk/module/dict/tomoe-dict-ptr-array.c
===================================================================
--- tomoe/trunk/module/dict/tomoe-dict-ptr-array.c 2007-06-11 11:15:49 UTC (rev 1400)
+++ tomoe/trunk/module/dict/tomoe-dict-ptr-array.c 2007-06-11 23:51:22 UTC (rev 1401)
@@ -149,7 +149,7 @@
static gint
reading_compare_func (gconstpointer a, gconstpointer b)
{
- return tomoe_reading_compare (TOMOE_READING (a), TOMOE_READING (b));
+ return tomoe_reading_has_prefix (TOMOE_READING (a), TOMOE_READING (b)) ? 0 : -1;
}
static gboolean
Modified: tomoe/trunk/test/test_context.rb
===================================================================
--- tomoe/trunk/test/test_context.rb 2007-06-11 11:15:49 UTC (rev 1400)
+++ tomoe/trunk/test/test_context.rb 2007-06-11 23:51:22 UTC (rev 1401)
@@ -46,7 +46,7 @@
query = Tomoe::Query.new
query.add_reading(Tomoe::Reading.new(Tomoe::Reading::JA_KUN, "せい"))
cands = context.search(query)
- assert_equal(["汐", "背", "脊"].sort,
+ assert_equal(["汐", "背", "脊", "醎", "鈼", "鮬", "鹹"].sort,
cands.collect {|cand| cand.char.utf8}.sort)
end
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ik...@us...> - 2007-06-11 11:15:54
|
Revision: 1400
http://tomoe.svn.sourceforge.net/tomoe/?rev=1400&view=rev
Author: ikezoe
Date: 2007-06-11 04:15:49 -0700 (Mon, 11 Jun 2007)
Log Message:
-----------
* module/dict/tomoe-dict-est.c: Insert a space before append
on_readings and kun_readings string to all_readings. Now all tests
passed!
Modified Paths:
--------------
tomoe/trunk/ChangeLog
tomoe/trunk/module/dict/tomoe-dict-est.c
Modified: tomoe/trunk/ChangeLog
===================================================================
--- tomoe/trunk/ChangeLog 2007-06-11 11:07:48 UTC (rev 1399)
+++ tomoe/trunk/ChangeLog 2007-06-11 11:15:49 UTC (rev 1400)
@@ -28,6 +28,9 @@
handled as TOMOE_READING_UNKNOWN type.
* module/dict/tomoe-dict-est.c: Use STRRX flag for searching readings.
It brings the result that includes readings matched exactly with queries.
+ * module/dict/tomoe-dict-est.c: Insert a space before append
+ on_readings and kun_readings string to all_readings. Now all tests
+ passed!
2007-06-10 Hiroyuki Ikezoe <poi...@ik...>
Modified: tomoe/trunk/module/dict/tomoe-dict-est.c
===================================================================
--- tomoe/trunk/module/dict/tomoe-dict-est.c 2007-06-11 11:07:48 UTC (rev 1399)
+++ tomoe/trunk/module/dict/tomoe-dict-est.c 2007-06-11 11:15:49 UTC (rev 1400)
@@ -405,12 +405,14 @@
if (on_readings) {
est_doc_add_attr (doc, "ja_on_readings", on_readings->str);
+ all_readings = g_string_append_c (all_readings, ' ');
all_readings = g_string_append (all_readings, on_readings->str);
g_string_free (on_readings, TRUE);
}
all_readings = g_string_append_c (all_readings, ' ');
if (kun_readings) {
est_doc_add_attr (doc, "ja_kun_readings", kun_readings->str);
+ all_readings = g_string_append_c (all_readings, ' ');
all_readings = g_string_append (all_readings, kun_readings->str);
g_string_free (kun_readings, TRUE);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ik...@us...> - 2007-06-11 11:07:54
|
Revision: 1399
http://tomoe.svn.sourceforge.net/tomoe/?rev=1399&view=rev
Author: ikezoe
Date: 2007-06-11 04:07:48 -0700 (Mon, 11 Jun 2007)
Log Message:
-----------
* module/dict/tomoe-dict-est.c: Use STRRX flag for searching readings.
It brings the result that includes readings matched exactly with queries.
Modified Paths:
--------------
tomoe/trunk/ChangeLog
tomoe/trunk/module/dict/tomoe-dict-est.c
Modified: tomoe/trunk/ChangeLog
===================================================================
--- tomoe/trunk/ChangeLog 2007-06-11 08:32:30 UTC (rev 1398)
+++ tomoe/trunk/ChangeLog 2007-06-11 11:07:48 UTC (rev 1399)
@@ -26,6 +26,8 @@
in attribute area of document.
* module/dict/tomoe-dict-est.c: Query of search by reading is always
handled as TOMOE_READING_UNKNOWN type.
+ * module/dict/tomoe-dict-est.c: Use STRRX flag for searching readings.
+ It brings the result that includes readings matched exactly with queries.
2007-06-10 Hiroyuki Ikezoe <poi...@ik...>
Modified: tomoe/trunk/module/dict/tomoe-dict-est.c
===================================================================
--- tomoe/trunk/module/dict/tomoe-dict-est.c 2007-06-11 08:32:30 UTC (rev 1398)
+++ tomoe/trunk/module/dict/tomoe-dict-est.c 2007-06-11 11:07:48 UTC (rev 1399)
@@ -615,7 +615,7 @@
case TOMOE_READING_INVALID:
case TOMOE_READING_UNKNOWN:
default:
- expr = g_strdup_printf ("all_readings STRINC %s", read_str);
+ expr = g_strdup_printf ("all_readings STRRX (\\s|^)%s(\\s|$)", read_str);
est_cond_add_attr (cond, expr);
g_free (expr);
break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2007-06-11 08:32:28
|
Revision: 1398
http://tomoe.svn.sourceforge.net/tomoe/?rev=1398&view=rev
Author: makeinu
Date: 2007-06-11 01:32:30 -0700 (Mon, 11 Jun 2007)
Log Message:
-----------
Add a comment.
Modified Paths:
--------------
tomoe-gtk/trunk/src/tomoe-window.c
Modified: tomoe-gtk/trunk/src/tomoe-window.c
===================================================================
--- tomoe-gtk/trunk/src/tomoe-window.c 2007-06-11 08:28:09 UTC (rev 1397)
+++ tomoe-gtk/trunk/src/tomoe-window.c 2007-06-11 08:32:30 UTC (rev 1398)
@@ -150,6 +150,7 @@
GtkWidget *widget, *notebook, *vbox;
TomoeWindowPrivate *priv = TOMOE_WINDOW_GET_PRIVATE (window);
+ // for backward compatibility
tomoe_gtk_init ();
priv->context = tomoe_context_new ();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2007-06-11 08:28:13
|
Revision: 1397
http://tomoe.svn.sourceforge.net/tomoe/?rev=1397&view=rev
Author: makeinu
Date: 2007-06-11 01:28:09 -0700 (Mon, 11 Jun 2007)
Log Message:
-----------
Add G_BEGIN_DECLS and G_END_DECLS to export functions to C++ code.
Modified Paths:
--------------
tomoe-gtk/trunk/ChangeLog
tomoe-gtk/trunk/src/tomoe-gtk.h
Modified: tomoe-gtk/trunk/ChangeLog
===================================================================
--- tomoe-gtk/trunk/ChangeLog 2007-06-11 07:58:50 UTC (rev 1396)
+++ tomoe-gtk/trunk/ChangeLog 2007-06-11 08:28:09 UTC (rev 1397)
@@ -1,5 +1,10 @@
2007-06-11 Takuro Ashie <as...@ho...>
+ * src/tomoe-gtk.h: Add G_BECIN_DECLS and G_END_DECLS to export functions
+ to C++ code.
+
+2007-06-11 Takuro Ashie <as...@ho...>
+
* src/Makefile.am: Install tomoe-gtk-enum-types.h
2007-06-08 Hiroyuki Ikezoe <poi...@ik...>
Modified: tomoe-gtk/trunk/src/tomoe-gtk.h
===================================================================
--- tomoe-gtk/trunk/src/tomoe-gtk.h 2007-06-11 07:58:50 UTC (rev 1396)
+++ tomoe-gtk/trunk/src/tomoe-gtk.h 2007-06-11 08:28:09 UTC (rev 1397)
@@ -40,9 +40,13 @@
#include <tomoe-edit-meta.h>
#include <tomoe-edit-strokes.h>
+G_BEGIN_DECLS
+
void tomoe_gtk_init (void);
void tomoe_gtk_quit (void);
+G_END_DECLS
+
#endif /* __TOMOE_GTK_H_INCLUDED__ */
/*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ik...@us...> - 2007-06-11 07:58:50
|
Revision: 1396
http://tomoe.svn.sourceforge.net/tomoe/?rev=1396&view=rev
Author: ikezoe
Date: 2007-06-11 00:58:50 -0700 (Mon, 11 Jun 2007)
Log Message:
-----------
module/dict/tomoe-dict-est.c: Query of search by reading is always
handled as TOMOE_READING_UNKNOWN type.
Modified Paths:
--------------
tomoe/trunk/ChangeLog
tomoe/trunk/module/dict/tomoe-dict-est.c
Modified: tomoe/trunk/ChangeLog
===================================================================
--- tomoe/trunk/ChangeLog 2007-06-11 07:24:58 UTC (rev 1395)
+++ tomoe/trunk/ChangeLog 2007-06-11 07:58:50 UTC (rev 1396)
@@ -24,6 +24,8 @@
attribute.
* module/dict/tomoe-dict-est.c: Reading data is separated by a space
in attribute area of document.
+ * module/dict/tomoe-dict-est.c: Query of search by reading is always
+ handled as TOMOE_READING_UNKNOWN type.
2007-06-10 Hiroyuki Ikezoe <poi...@ik...>
Modified: tomoe/trunk/module/dict/tomoe-dict-est.c
===================================================================
--- tomoe/trunk/module/dict/tomoe-dict-est.c 2007-06-11 07:24:58 UTC (rev 1395)
+++ tomoe/trunk/module/dict/tomoe-dict-est.c 2007-06-11 07:58:50 UTC (rev 1396)
@@ -375,6 +375,7 @@
readings = tomoe_char_get_readings (chr);
if (readings) {
GString *on_readings = NULL, *kun_readings = NULL, *all_readings = NULL;
+ all_readings = g_string_new (NULL);
for (node = readings; node; node = g_list_next (node)) {
TomoeReading *reading = TOMOE_READING (node->data);
const gchar *read_str = tomoe_reading_get_reading (reading);
@@ -395,17 +396,19 @@
break;
case TOMOE_READING_UNKNOWN:
case TOMOE_READING_INVALID:
+ all_readings = g_string_append_c (all_readings, ' ');
+ all_readings = g_string_append (all_readings, read_str);
default:
break;
}
}
- all_readings = g_string_new (NULL);
if (on_readings) {
est_doc_add_attr (doc, "ja_on_readings", on_readings->str);
all_readings = g_string_append (all_readings, on_readings->str);
g_string_free (on_readings, TRUE);
}
+ all_readings = g_string_append_c (all_readings, ' ');
if (kun_readings) {
est_doc_add_attr (doc, "ja_kun_readings", kun_readings->str);
all_readings = g_string_append (all_readings, kun_readings->str);
@@ -589,22 +592,32 @@
gchar *expr;
switch (tomoe_reading_get_reading_type (reading)) {
+#if 0
case TOMOE_READING_JA_ON:
expr = g_strdup_printf ("ja_on_readings STRINC %s", read_str);
est_cond_add_attr (cond, expr);
g_free (expr);
+ expr = g_strdup_printf ("all_readings STRINC %s", read_str);
+ est_cond_add_attr (cond, expr);
+ g_free (expr);
break;
case TOMOE_READING_JA_KUN:
expr = g_strdup_printf ("ja_kun_readings STRINC %s", read_str);
est_cond_add_attr (cond, expr);
g_free (expr);
+ expr = g_strdup_printf ("all_readings STRINC %s", read_str);
+ est_cond_add_attr (cond, expr);
+ g_free (expr);
break;
+#endif
+ case TOMOE_READING_JA_ON:
+ case TOMOE_READING_JA_KUN:
case TOMOE_READING_INVALID:
case TOMOE_READING_UNKNOWN:
+ default:
expr = g_strdup_printf ("all_readings STRINC %s", read_str);
est_cond_add_attr (cond, expr);
g_free (expr);
- default:
break;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ik...@us...> - 2007-06-11 07:24:55
|
Revision: 1395
http://tomoe.svn.sourceforge.net/tomoe/?rev=1395&view=rev
Author: ikezoe
Date: 2007-06-11 00:24:58 -0700 (Mon, 11 Jun 2007)
Log Message:
-----------
foge.
Modified Paths:
--------------
tomoe/trunk/ChangeLog
Modified: tomoe/trunk/ChangeLog
===================================================================
--- tomoe/trunk/ChangeLog 2007-06-11 07:24:46 UTC (rev 1394)
+++ tomoe/trunk/ChangeLog 2007-06-11 07:24:58 UTC (rev 1395)
@@ -22,6 +22,8 @@
* test/python/runtests.py: test_dict_est.py is now avairable.
* module/dict/tomoe-dict-est.c: Readings is set into document
attribute.
+ * module/dict/tomoe-dict-est.c: Reading data is separated by a space
+ in attribute area of document.
2007-06-10 Hiroyuki Ikezoe <poi...@ik...>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ik...@us...> - 2007-06-11 07:24:45
|
Revision: 1394
http://tomoe.svn.sourceforge.net/tomoe/?rev=1394&view=rev
Author: ikezoe
Date: 2007-06-11 00:24:46 -0700 (Mon, 11 Jun 2007)
Log Message:
-----------
* module/dict/tomoe-dict-est.c: Reading data is separated by a space
in attribute area of document.
Modified Paths:
--------------
tomoe/trunk/module/dict/tomoe-dict-est.c
Modified: tomoe/trunk/module/dict/tomoe-dict-est.c
===================================================================
--- tomoe/trunk/module/dict/tomoe-dict-est.c 2007-06-11 06:47:17 UTC (rev 1393)
+++ tomoe/trunk/module/dict/tomoe-dict-est.c 2007-06-11 07:24:46 UTC (rev 1394)
@@ -333,7 +333,6 @@
gchar *value;
gint n_strokes;
const GList *readings, *node;
- GList *on_readings = NULL, *kun_readings = NULL;
ESTDOC *doc;
g_return_val_if_fail (TOMOE_IS_DICT_EST (dict), success);
@@ -375,15 +374,24 @@
readings = tomoe_char_get_readings (chr);
if (readings) {
+ GString *on_readings = NULL, *kun_readings = NULL, *all_readings = NULL;
for (node = readings; node; node = g_list_next (node)) {
TomoeReading *reading = TOMOE_READING (node->data);
const gchar *read_str = tomoe_reading_get_reading (reading);
switch (tomoe_reading_get_reading_type (reading)) {
case TOMOE_READING_JA_ON:
- on_readings = g_list_prepend (on_readings, (gchar *) read_str);
+ if (on_readings)
+ on_readings = g_string_append_c (on_readings, ' ');
+ else
+ on_readings = g_string_new (NULL);
+ on_readings = g_string_append (on_readings, read_str);
break;
case TOMOE_READING_JA_KUN:
- kun_readings = g_list_prepend (kun_readings, (gchar *) read_str);
+ if (kun_readings)
+ kun_readings = g_string_append_c (kun_readings, ' ');
+ else
+ kun_readings = g_string_new (NULL);
+ kun_readings = g_string_append (kun_readings, read_str);
break;
case TOMOE_READING_UNKNOWN:
case TOMOE_READING_INVALID:
@@ -391,14 +399,20 @@
break;
}
}
- for (node = on_readings; node; node = g_list_next (node)) {
- est_doc_add_attr (doc, "ja_on_readings", node->data);
- est_doc_add_attr (doc, "all_readings", node->data);
+
+ all_readings = g_string_new (NULL);
+ if (on_readings) {
+ est_doc_add_attr (doc, "ja_on_readings", on_readings->str);
+ all_readings = g_string_append (all_readings, on_readings->str);
+ g_string_free (on_readings, TRUE);
}
- for (node = kun_readings; node; node = g_list_next (node)) {
- est_doc_add_attr (doc, "ja_kun_readings", node->data);
- est_doc_add_attr (doc, "all_readings", node->data);
+ if (kun_readings) {
+ est_doc_add_attr (doc, "ja_kun_readings", kun_readings->str);
+ all_readings = g_string_append (all_readings, kun_readings->str);
+ g_string_free (kun_readings, TRUE);
}
+ est_doc_add_attr (doc, "all_readings", all_readings->str);
+ g_string_free (all_readings, TRUE);
}
value = tomoe_char_to_xml (chr);
@@ -576,18 +590,18 @@
switch (tomoe_reading_get_reading_type (reading)) {
case TOMOE_READING_JA_ON:
- expr = g_strdup_printf ("ja_on_readings STREQ %s", read_str);
+ expr = g_strdup_printf ("ja_on_readings STRINC %s", read_str);
est_cond_add_attr (cond, expr);
g_free (expr);
break;
case TOMOE_READING_JA_KUN:
- expr = g_strdup_printf ("ja_kun_readings STREQ %s", read_str);
+ expr = g_strdup_printf ("ja_kun_readings STRINC %s", read_str);
est_cond_add_attr (cond, expr);
g_free (expr);
break;
case TOMOE_READING_INVALID:
case TOMOE_READING_UNKNOWN:
- expr = g_strdup_printf ("all_readings STREQ %s", read_str);
+ expr = g_strdup_printf ("all_readings STRINC %s", read_str);
est_cond_add_attr (cond, expr);
g_free (expr);
default:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kt...@us...> - 2007-06-11 06:48:02
|
Revision: 1393
http://tomoe.svn.sourceforge.net/tomoe/?rev=1393&view=rev
Author: ktou
Date: 2007-06-10 23:47:17 -0700 (Sun, 10 Jun 2007)
Log Message:
-----------
* test/tomoe-test-utils.rb, test/test_context.rb: fixed test when
TOMOE_DICT_MODULE=est.
Modified Paths:
--------------
tomoe/trunk/ChangeLog
tomoe/trunk/test/test_context.rb
tomoe/trunk/test/tomoe-test-utils.rb
Modified: tomoe/trunk/ChangeLog
===================================================================
--- tomoe/trunk/ChangeLog 2007-06-11 06:46:21 UTC (rev 1392)
+++ tomoe/trunk/ChangeLog 2007-06-11 06:47:17 UTC (rev 1393)
@@ -1,3 +1,8 @@
+2007-06-11 Kouhei Sutou <ko...@co...>
+
+ * test/tomoe-test-utils.rb, test/test_context.rb: fixed test when
+ TOMOE_DICT_MODULE=est.
+
2007-06-11 Hiroyuki Ikezoe <poi...@ik...>
* test/python/test_dict_xml.py: Unlink temporary file only if the file
Modified: tomoe/trunk/test/test_context.rb
===================================================================
--- tomoe/trunk/test/test_context.rb 2007-06-11 06:46:21 UTC (rev 1392)
+++ tomoe/trunk/test/test_context.rb 2007-06-11 06:47:17 UTC (rev 1393)
@@ -130,6 +130,8 @@
dict = Tomoe::DictXML.new(config)
recognizer = Tomoe::RecognizerSimple.new("dictionary" => dict)
@@context = Tomoe::Context.new("recognizer" => recognizer)
+ ensure_dict = "ensure_dict_#{dict_module_type}"
+ __send__(ensure_dict) if respond_to?(ensure_dict, true)
@@context.load_config(@config_file.path)
@@context
end
Modified: tomoe/trunk/test/tomoe-test-utils.rb
===================================================================
--- tomoe/trunk/test/tomoe-test-utils.rb 2007-06-11 06:46:21 UTC (rev 1392)
+++ tomoe/trunk/test/tomoe-test-utils.rb 2007-06-11 06:47:17 UTC (rev 1393)
@@ -96,8 +96,8 @@
def setup
super
+ FileUtils.mkdir_p(tmp_dir)
@config_file = make_config_file
- FileUtils.mkdir_p(tmp_dir)
end
def teardown
@@ -136,12 +136,33 @@
EOC
end
+ def est_db
+ File.join(tmp_dir, File.basename(dictionary).sub(/\.xml$/, ''))
+ end
+
+ def ensure_dict_est
+ unless File.exists?(est_db)
+ tmp_est_db = "#{est_db}.tmp"
+ FileUtils.rm_rf(tmp_est_db)
+ xml_dict = Tomoe::DictXML.new("filename" => dictionary,
+ "editable" => false)
+ est_dict = Tomoe::DictEst.new("database" => tmp_est_db,
+ "editable" => true)
+ xml_dict.search(Tomoe::Query.new).each_with_index do |cand, i|
+ est_dict.register(cand.char)
+ end
+ est_dict.flush
+ FileUtils.cp_r(tmp_est_db, est_db)
+ end
+ end
+
def make_config_file_for_est
+ dict_basename = File.basename(dictionary).sub(/\.xml$/, '')
<<-EOC
-[#{File.basename(dictionary)}-dictionary]
+[#{dict_basename}-dictionary]
type = est
-name = #{File.basename(dictionary)}
-database = #{dictionary.sub(/\.xml$/, '')}
+name = #{dict_basename}
+database = #{est_db}
EOC
end
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ik...@us...> - 2007-06-11 06:46:20
|
Revision: 1392
http://tomoe.svn.sourceforge.net/tomoe/?rev=1392&view=rev
Author: ikezoe
Date: 2007-06-10 23:46:21 -0700 (Sun, 10 Jun 2007)
Log Message:
-----------
* module/dict/tomoe-dict-est.c: Readings is set into document
attribute.
Modified Paths:
--------------
tomoe/trunk/ChangeLog
tomoe/trunk/module/dict/tomoe-dict-est.c
Modified: tomoe/trunk/ChangeLog
===================================================================
--- tomoe/trunk/ChangeLog 2007-06-11 06:36:15 UTC (rev 1391)
+++ tomoe/trunk/ChangeLog 2007-06-11 06:46:21 UTC (rev 1392)
@@ -15,6 +15,8 @@
* test/python/test_dict_est.py: Remove the directory which stores est
databse whenever each test exits
* test/python/runtests.py: test_dict_est.py is now avairable.
+ * module/dict/tomoe-dict-est.c: Readings is set into document
+ attribute.
2007-06-10 Hiroyuki Ikezoe <poi...@ik...>
Modified: tomoe/trunk/module/dict/tomoe-dict-est.c
===================================================================
--- tomoe/trunk/module/dict/tomoe-dict-est.c 2007-06-11 06:36:15 UTC (rev 1391)
+++ tomoe/trunk/module/dict/tomoe-dict-est.c 2007-06-11 06:46:21 UTC (rev 1392)
@@ -332,6 +332,8 @@
const gchar *original_value;
gchar *value;
gint n_strokes;
+ const GList *readings, *node;
+ GList *on_readings = NULL, *kun_readings = NULL;
ESTDOC *doc;
g_return_val_if_fail (TOMOE_IS_DICT_EST (dict), success);
@@ -371,6 +373,34 @@
est_doc_add_attr (doc, "variant", original_value);
}
+ readings = tomoe_char_get_readings (chr);
+ if (readings) {
+ for (node = readings; node; node = g_list_next (node)) {
+ TomoeReading *reading = TOMOE_READING (node->data);
+ const gchar *read_str = tomoe_reading_get_reading (reading);
+ switch (tomoe_reading_get_reading_type (reading)) {
+ case TOMOE_READING_JA_ON:
+ on_readings = g_list_prepend (on_readings, (gchar *) read_str);
+ break;
+ case TOMOE_READING_JA_KUN:
+ kun_readings = g_list_prepend (kun_readings, (gchar *) read_str);
+ break;
+ case TOMOE_READING_UNKNOWN:
+ case TOMOE_READING_INVALID:
+ default:
+ break;
+ }
+ }
+ for (node = on_readings; node; node = g_list_next (node)) {
+ est_doc_add_attr (doc, "ja_on_readings", node->data);
+ est_doc_add_attr (doc, "all_readings", node->data);
+ }
+ for (node = kun_readings; node; node = g_list_next (node)) {
+ est_doc_add_attr (doc, "ja_kun_readings", node->data);
+ est_doc_add_attr (doc, "all_readings", node->data);
+ }
+ }
+
value = tomoe_char_to_xml (chr);
est_doc_add_hidden_text (doc, value);
g_free (value);
@@ -540,12 +570,29 @@
{
GList *node;
for (node = (GList *)readings; node; node = g_list_next (node)) {
- TomoeReading *reading = node->data;
- gchar *xml;
+ TomoeReading *reading = TOMOE_READING (node->data);
+ const gchar *read_str = tomoe_reading_get_reading (reading);
+ gchar *expr;
- xml = tomoe_reading_to_xml (reading);
- g_string_append_printf (phrase, " %s", xml);
- g_free (xml);
+ switch (tomoe_reading_get_reading_type (reading)) {
+ case TOMOE_READING_JA_ON:
+ expr = g_strdup_printf ("ja_on_readings STREQ %s", read_str);
+ est_cond_add_attr (cond, expr);
+ g_free (expr);
+ break;
+ case TOMOE_READING_JA_KUN:
+ expr = g_strdup_printf ("ja_kun_readings STREQ %s", read_str);
+ est_cond_add_attr (cond, expr);
+ g_free (expr);
+ break;
+ case TOMOE_READING_INVALID:
+ case TOMOE_READING_UNKNOWN:
+ expr = g_strdup_printf ("all_readings STREQ %s", read_str);
+ est_cond_add_attr (cond, expr);
+ g_free (expr);
+ default:
+ break;
+ }
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ik...@us...> - 2007-06-11 06:36:15
|
Revision: 1391
http://tomoe.svn.sourceforge.net/tomoe/?rev=1391&view=rev
Author: ikezoe
Date: 2007-06-10 23:36:15 -0700 (Sun, 10 Jun 2007)
Log Message:
-----------
add a ja_on reading.
Modified Paths:
--------------
tomoe/trunk/test/python/test_dict_est.py
Modified: tomoe/trunk/test/python/test_dict_est.py
===================================================================
--- tomoe/trunk/test/python/test_dict_est.py 2007-06-11 04:57:33 UTC (rev 1390)
+++ tomoe/trunk/test/python/test_dict_est.py 2007-06-11 06:36:15 UTC (rev 1391)
@@ -17,6 +17,8 @@
tomoe_char.add_reading(reading)
reading = tomoe.Reading(tomoe.READING_JA_ON, 'チ')
tomoe_char.add_reading(reading)
+ reading = tomoe.Reading(tomoe.READING_JA_ON, 'タ')
+ tomoe_char.add_reading(reading)
reading = tomoe.Reading(tomoe.READING_UNKNOWN, 'あんのうん')
tomoe_char.add_reading(reading)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ik...@us...> - 2007-06-11 04:57:31
|
Revision: 1390
http://tomoe.svn.sourceforge.net/tomoe/?rev=1390&view=rev
Author: ikezoe
Date: 2007-06-10 21:57:33 -0700 (Sun, 10 Jun 2007)
Log Message:
-----------
* test/python/test_dict_est.py: Remove the directory which stores est
databse whenever each test exits
* test/python/runtests.py: test_dict_est.py is now avairable.
Modified Paths:
--------------
tomoe/trunk/ChangeLog
tomoe/trunk/test/python/runtests.py
tomoe/trunk/test/python/test_dict_est.py
Modified: tomoe/trunk/ChangeLog
===================================================================
--- tomoe/trunk/ChangeLog 2007-06-11 04:01:06 UTC (rev 1389)
+++ tomoe/trunk/ChangeLog 2007-06-11 04:57:33 UTC (rev 1390)
@@ -12,6 +12,9 @@
functions.
* test/python/test_dict_est.py: Create a test test dictionary fot
TomoeEst.
+ * test/python/test_dict_est.py: Remove the directory which stores est
+ databse whenever each test exits
+ * test/python/runtests.py: test_dict_est.py is now avairable.
2007-06-10 Hiroyuki Ikezoe <poi...@ik...>
Modified: tomoe/trunk/test/python/runtests.py
===================================================================
--- tomoe/trunk/test/python/runtests.py 2007-06-11 04:01:06 UTC (rev 1389)
+++ tomoe/trunk/test/python/runtests.py 2007-06-11 04:57:33 UTC (rev 1390)
@@ -7,7 +7,7 @@
import tomoe
tomoe.tomoe_dict_set_default_module_dir('../../module/dict/.libs')
-SKIP_FILES = ['runtests', 'test_dict', 'test_dict_est']
+SKIP_FILES = ['runtests', 'test_dict']
dir = os.path.split(os.path.abspath(__file__))[0]
os.chdir(dir)
Modified: tomoe/trunk/test/python/test_dict_est.py
===================================================================
--- tomoe/trunk/test/python/test_dict_est.py 2007-06-11 04:01:06 UTC (rev 1389)
+++ tomoe/trunk/test/python/test_dict_est.py 2007-06-11 04:57:33 UTC (rev 1390)
@@ -1,6 +1,7 @@
# -*- coding: UTF=8 -*-
import os
import sys
+import shutil
import unittest
import tomoe
import test_dict
@@ -8,9 +9,9 @@
class TomoeDictEstTest(test_dict.TomoeDictTest):
def setUp(self):
- self.dict_name = "test-est"
- self.dict = tomoe.Dict("Est", name = self.dict_name, database = self.dict_name, editable = True)
-
+ self.dict_name = "est-dict"
+ self.dict = tomoe.Dict('Est', name = self.dict_name, database = self.dict_name, editable = True)
+
tomoe_char = tomoe.Char(utf8 = '池', n_strokes = 6)
reading = tomoe.Reading(tomoe.READING_JA_KUN, 'いけ')
tomoe_char.add_reading(reading)
@@ -18,14 +19,14 @@
tomoe_char.add_reading(reading)
reading = tomoe.Reading(tomoe.READING_UNKNOWN, 'あんのうん')
tomoe_char.add_reading(reading)
+
self.dict.register_char(tomoe_char)
-
self.dict.flush()
def tearDown(self):
self.dict.flush()
self.dict = None
if os.access(self.dict_name, os.F_OK):
- os.unlink(self.dict_name)
+ shutil.rmtree(self.dict_name)
# vi:ts=4:nowrap:ai:expandtab
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2007-06-11 04:01:05
|
Revision: 1389
http://tomoe.svn.sourceforge.net/tomoe/?rev=1389&view=rev
Author: makeinu
Date: 2007-06-10 21:01:06 -0700 (Sun, 10 Jun 2007)
Log Message:
-----------
Install tomoe-gtk-enum-types.h
Modified Paths:
--------------
tomoe-gtk/trunk/ChangeLog
tomoe-gtk/trunk/src/Makefile.am
Modified: tomoe-gtk/trunk/ChangeLog
===================================================================
--- tomoe-gtk/trunk/ChangeLog 2007-06-11 02:15:16 UTC (rev 1388)
+++ tomoe-gtk/trunk/ChangeLog 2007-06-11 04:01:06 UTC (rev 1389)
@@ -1,3 +1,7 @@
+2007-06-11 Takuro Ashie <as...@ho...>
+
+ * src/Makefile.am: Install tomoe-gtk-enum-types.h
+
2007-06-08 Hiroyuki Ikezoe <poi...@ik...>
* bindings/python/tomoegtk-module.c: Call pytomoegtk_add_constants()
Modified: tomoe-gtk/trunk/src/Makefile.am
===================================================================
--- tomoe-gtk/trunk/src/Makefile.am 2007-06-11 02:15:16 UTC (rev 1388)
+++ tomoe-gtk/trunk/src/Makefile.am 2007-06-11 04:01:06 UTC (rev 1389)
@@ -24,8 +24,7 @@
-version-info $(LT_VERSION_INFO) \
-export-dynamic $(no_undefined) $(LIBTOOL_EXPORT_OPTIONS)
-pkgincludedir = $(includedir)/tomoe/gtk
-pkginclude_HEADERS = \
+tomoe_gtk_public_h_sources = \
tomoe-canvas.h \
tomoe-char-table.h \
tomoe-details.h \
@@ -38,11 +37,6 @@
tomoe-scrollable.h \
tomoe-window.h
-if USE_GUCHARMAP
-libtomoe_gtk_la_SOURCES += tomoe-gucharmap.c
-pkginclude_HEADERS += tomoe-gucharmap.h
-endif
-
enum_source_prefix = tomoe-gtk-enum-types
enum_sources = \
@@ -57,6 +51,16 @@
CLEANFILES = \
$(enum_sources)
+pkgincludedir = $(includedir)/tomoe/gtk
+pkginclude_HEADERS = \
+ $(tomoe_gtk_public_h_sources) \
+ $(enum_source_prefix).h
+
+if USE_GUCHARMAP
+libtomoe_gtk_la_SOURCES += tomoe-gucharmap.c
+pkginclude_HEADERS += tomoe-gucharmap.h
+endif
+
#
# Rule to install tomoe-gtk-config.h header file
#
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ik...@us...> - 2007-06-11 02:15:14
|
Revision: 1388
http://tomoe.svn.sourceforge.net/tomoe/?rev=1388&view=rev
Author: ikezoe
Date: 2007-06-10 19:15:16 -0700 (Sun, 10 Jun 2007)
Log Message:
-----------
* test/python/test_dict_est.py: Create a test test dictionary fot
TomoeEst.
Modified Paths:
--------------
tomoe/trunk/ChangeLog
tomoe/trunk/test/python/test_dict_est.py
Modified: tomoe/trunk/ChangeLog
===================================================================
--- tomoe/trunk/ChangeLog 2007-06-11 01:25:04 UTC (rev 1387)
+++ tomoe/trunk/ChangeLog 2007-06-11 02:15:16 UTC (rev 1388)
@@ -10,6 +10,8 @@
* test/python/test_dict_unihan.py: Override some methods of
TomoeDictTest since Unihan dictionary module does not have some
functions.
+ * test/python/test_dict_est.py: Create a test test dictionary fot
+ TomoeEst.
2007-06-10 Hiroyuki Ikezoe <poi...@ik...>
Modified: tomoe/trunk/test/python/test_dict_est.py
===================================================================
--- tomoe/trunk/test/python/test_dict_est.py 2007-06-11 01:25:04 UTC (rev 1387)
+++ tomoe/trunk/test/python/test_dict_est.py 2007-06-11 02:15:16 UTC (rev 1388)
@@ -6,7 +6,26 @@
import test_dict
class TomoeDictEstTest(test_dict.TomoeDictTest):
+
def setUp(self):
- self.dict = tomoe.Dict("Est", editable = True)
+ self.dict_name = "test-est"
+ self.dict = tomoe.Dict("Est", name = self.dict_name, database = self.dict_name, editable = True)
+
+ tomoe_char = tomoe.Char(utf8 = '池', n_strokes = 6)
+ reading = tomoe.Reading(tomoe.READING_JA_KUN, 'いけ')
+ tomoe_char.add_reading(reading)
+ reading = tomoe.Reading(tomoe.READING_JA_ON, 'チ')
+ tomoe_char.add_reading(reading)
+ reading = tomoe.Reading(tomoe.READING_UNKNOWN, 'あんのうん')
+ tomoe_char.add_reading(reading)
+ self.dict.register_char(tomoe_char)
+ self.dict.flush()
+
+ def tearDown(self):
+ self.dict.flush()
+ self.dict = None
+ if os.access(self.dict_name, os.F_OK):
+ os.unlink(self.dict_name)
+
# vi:ts=4:nowrap:ai:expandtab
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|