diff --git a/honoka/ChangeLog b/honoka/ChangeLog index 21de53f..164fe43 100644 --- a/honoka/ChangeLog +++ b/honoka/ChangeLog @@ -1,3 +1,78 @@ +2005-06-06 02:03:44 Rev 237 tamra + + * src/skkdicconversion.cpp: + SKKDic�ν�������Ť��ä��Τ����� + +2005-06-06 01:19:33 Rev 236 tamra + + * src/skkdic.cpp: + Annotationɽ���������Х������� + +2005-06-06 00:59:18 Rev 235 tamra + + * src/skkdic.cpp src/skkdicconversion.cpp: + AnnotationŦ�С� + +2005-06-06 00:49:10 Rev 234 tamra + + * src/Makefile.am src/skkdic.cpp src/multiconvertor.cpp src/skkdic.h + src/skkdicconversion.cpp src/skkdicconversion.h: + SKK���񸡺��ץ饰���� + +2005-06-03 09:13:51 Rev 233 tamra + + * src/honoka_imengine.cpp src/honoka_imengine.h: + �ץ饰�������β����� + +2005-06-03 08:27:17 Rev 232 tamra + + * src/convertor.h src/wnnconversion.cpp src/anthyconversion.cpp + src/honoka_imengine.cpp src/multiconvertor.cpp src/convertor.cpp: + ResultEntry��ResultList�˴ޤࡣ + +2005-05-30 04:25:27 Rev 231 tamra + + * src/multiconvertor.cpp: + �ޥ���Ѵ�����ʸ���ڤ�ľ��������뤳�Ȥ�����Х��ν����� + +2005-05-30 03:59:20 Rev 230 tamra + + * src/convertor.h src/wnnconversion.cpp src/anthyconversion.cpp + src/multiconvertor.cpp src/convertor.cpp: + �ޥ���Ѵ���ʸ���ڤ�ľ���б��� + +2005-05-28 07:28:14 Rev 229 tamra + + * src/honoka_imengine.cpp: + �ޥ���Ѵ�����Convertor�ڤ��ؤ�������ǽ�ˡ� + +2005-05-27 16:25:07 Rev 228 tamra + + * src/convertor.h src/Makefile.am src/anthyconversion.cpp + src/honoka_imengine.cpp src/multiconvertor.cpp src/honoka_imengine. + h src/multiconvertor.h src/honoka_def.h: + ��������Convertor��Ȥä��Ѵ����뤷���ߤ򲾼����� + +2005-05-26 21:23:50 Rev 227 tamra + + * src/anthyconversion.cpp: + ʸ��Ƚ̤�����ñ�̤��ä��Τ��ɤ�ñ�̤˽����� + +2005-05-24 01:49:07 Rev 226 tamra + + * src/anthyconversion.cpp: + Anthy�ˤ�����ʸ����ɤߤ���¸�� + +2005-05-20 12:50:05 Rev 225 tamra + + * configure.ac ChangeLog m4/Makefile: + �Դ����ʥץ饰���󤬾���˺����Х������� + +2005-05-19 19:23:47 Rev 224 tamra + + * src/honoka_imengine.cpp: + scim-1.3���б��� + 2005-05-12 20:00:20 Rev 223 tamra * src/Makefile.am: diff --git a/honoka/m4/Makefile b/honoka/m4/Makefile index 90471b6..9b79a61 100644 --- a/honoka/m4/Makefile +++ b/honoka/m4/Makefile @@ -12,7 +12,7 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -MAKE=make + srcdir = . top_srcdir = .. @@ -33,8 +33,8 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : -build_triplet = i686-pc-linux-gnu -host_triplet = i686-pc-linux-gnu +build_triplet = i686-redhat-linux-gnu +host_triplet = i686-redhat-linux-gnu subdir = m4 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -78,15 +78,15 @@ BUILD_INCLUDED_LIBINTL = no CATOBJEXT = .gmo CC = gcc -CCDEPMODE = depmode=none -CFLAGS = -g -O2 +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 -g CONVENIENCE_LTDL_FALSE = CONVENIENCE_LTDL_TRUE = # CPP = gcc -E -CPPFLAGS = +CPPFLAGS = -O3 -march=i686 -fomit-frame-pointer -fforce-addr -fexpensive-optimizations -fpeephole -fgcse -funroll-loops -g CXX = g++ CXXCPP = g++ -E -CXXDEPMODE = depmode=none +CXXDEPMODE = depmode=gcc3 CXXFLAGS = -O3 -march=i686 -fomit-frame-pointer -fforce-addr -fexpensive-optimizations -fpeephole -fgcse -funroll-loops CYGPATH_W = echo DATADIRNAME = share @@ -155,14 +155,14 @@ SCIM_BUILD_SETUP_TRUE = SCIM_CFLAGS = -I/usr/include/scim-1.0 SCIM_DATADIR = /usr/share/scim -SCIM_DEBUG_FLAGS = +SCIM_DEBUG_FLAGS = -DENABLE_DEBUG=1 SCIM_GTKUTILS_CFLAGS = -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/scim-1.0 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include SCIM_GTKUTILS_LIBS = -Wl,--export-dynamic -lscim-gtkutils-1.0 -lgtk-x11-2.0 -lscim-1.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 SCIM_ICONDIR = /usr/share/scim/icons SCIM_LIBS = -lscim-1.0 SCIM_MODULEDIR = /usr/lib/scim-1.0 SCIM_VERSION = 1.2.0 -SET_MAKE = MAKE=make +SET_MAKE = SHELL = /bin/sh STRIP = strip USE_INCLUDED_LIBINTL = no @@ -180,28 +180,28 @@ ac_ct_F77 = g77 ac_ct_RANLIB = ranlib ac_ct_STRIP = strip -am__fastdepCC_FALSE = -am__fastdepCC_TRUE = # -am__fastdepCXX_FALSE = -am__fastdepCXX_TRUE = # -am__include = # +am__fastdepCC_FALSE = # +am__fastdepCC_TRUE = +am__fastdepCXX_FALSE = # +am__fastdepCXX_TRUE = +am__include = include am__leading_dot = . am__quote = am__tar = ${AMTAR} chof - "$$tardir" am__untar = ${AMTAR} xf - bindir = ${exec_prefix}/bin -build = i686-pc-linux-gnu +build = i686-redhat-linux-gnu build_alias = build_cpu = i686 build_os = linux-gnu -build_vendor = pc +build_vendor = redhat datadir = ${prefix}/share exec_prefix = ${prefix} -host = i686-pc-linux-gnu +host = i686-redhat-linux-gnu host_alias = host_cpu = i686 host_os = linux-gnu -host_vendor = pc +host_vendor = redhat includedir = ${prefix}/include infodir = ${prefix}/info install_sh = /home/tamra/ANef/honoka/install-sh diff --git a/honoka/po/POTFILES.in b/honoka/po/POTFILES.in index 1b390bf..4363043 100644 --- a/honoka/po/POTFILES.in +++ b/honoka/po/POTFILES.in @@ -7,9 +7,15 @@ src/kanainput.cpp src/wnnconversion.h src/wnnconversion.cpp +src/wnnplugin.h +src/wnnplugin.cpp +src/wnnprediction.h +src/wnnprediction.cpp src/anthyconversion.h src/anthyconversion.cpp src/preeditor.h src/preeditor.cpp src/convertor.h src/convertor.cpp +src/predictor.h +src/predictor.cpp diff --git a/honoka/po/honoka.pot b/honoka/po/honoka.pot index 6960f18..5b74bcd 100644 --- a/honoka/po/honoka.pot +++ b/honoka/po/honoka.pot @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-04-13 11:14+0900\n" +"POT-Creation-Date: 2005-06-20 15:54+0900\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,58 +16,62 @@ "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: src/honoka_imengine.cpp:92 src/honoka_imengine.cpp:99 +#: src/honoka_imengine.cpp:89 src/honoka_imengine.cpp:96 #: src/honoka_imengine_setup.cpp:96 msgid "Honoka" msgstr "" -#: src/honoka_imengine.cpp:112 +#: src/honoka_imengine.cpp:109 msgid "ja_JP" msgstr "" -#: src/honoka_imengine.cpp:124 +#: src/honoka_imengine.cpp:121 msgid "(C) 2004 TAM(Teppei Tamra) " msgstr "" -#: src/honoka_imengine.cpp:134 +#: src/honoka_imengine.cpp:131 msgid "SCIM-WNN HELP" msgstr "" -#: src/honoka_imengine.cpp:370 +#: src/honoka_imengine.cpp:477 msgid "input mode" msgstr "" -#: src/honoka_imengine.cpp:374 src/honoka_imengine.cpp:381 -#: src/honoka_imengine.cpp:384 +#: src/honoka_imengine.cpp:481 src/honoka_imengine.cpp:489 +#: src/honoka_imengine.cpp:497 src/honoka_imengine.cpp:500 msgid "mode status" msgstr "" -#: src/honoka_imengine.cpp:377 +#: src/honoka_imengine.cpp:485 +msgid "predictor" +msgstr "" + +#: src/honoka_imengine.cpp:493 msgid "convertor" msgstr "" -#: src/honoka_imengine.cpp:386 +#: src/honoka_imengine.cpp:502 msgid "conversion mode" msgstr "" -#: src/honoka_imengine.cpp:402 +#: src/honoka_imengine.cpp:523 msgid "Kanji" msgstr "" -#: src/honoka_imengine.cpp:403 +#: src/honoka_imengine.cpp:524 msgid "Yosoku" msgstr "" -#: src/honoka_imengine.cpp:409 +#: src/honoka_imengine.cpp:530 msgid "AUTO" msgstr "" -#: src/honoka_imengine.cpp:410 +#: src/honoka_imengine.cpp:531 msgid "REN" msgstr "" -#: src/honoka_imengine.cpp:974 src/honoka_imengine.cpp:982 -#: src/honoka_imengine.cpp:1009 src/honoka_imengine.cpp:1021 +#: src/honoka_imengine.cpp:1226 src/honoka_imengine.cpp:1234 +#: src/honoka_imengine.cpp:1262 src/honoka_imengine.cpp:1274 msgid "could not connect to jserver." msgstr "" @@ -468,50 +472,54 @@ msgid "Options" msgstr "" -#: src/romkan.cpp:507 +#: src/romkan.cpp:536 msgid "Roma-Kana" msgstr "" -#: src/romkan.cpp:511 +#: src/romkan.cpp:540 msgid "Roma-Katakana" msgstr "" -#: src/romkan.cpp:515 +#: src/romkan.cpp:544 msgid "Half Roma-Kana" msgstr "" -#: src/romkan.cpp:519 +#: src/romkan.cpp:548 msgid "Ascii" msgstr "" -#: src/romkan.cpp:523 +#: src/romkan.cpp:552 msgid "Wide Ascii" msgstr "" -#: src/romkan.cpp:586 +#: src/romkan.cpp:615 msgid "Roma" msgstr "" -#: src/kanainput.cpp:132 +#: src/kanainput.cpp:135 msgid "KANA" msgstr "" -#: src/kanainput.cpp:140 +#: src/kanainput.cpp:143 msgid "Kana" msgstr "" -#: src/wnnconversion.cpp:349 +#: src/wnnconversion.cpp:353 msgid "yosoku lookup result" msgstr "" -#: src/wnnconversion.cpp:401 +#: src/wnnconversion.cpp:406 msgid "Ikeiji lookup result" msgstr "" -#: src/wnnconversion.cpp:407 +#: src/wnnconversion.cpp:412 msgid "association lookup result" msgstr "" -#: src/wnnconversion.cpp:414 src/anthyconversion.cpp:163 +#: src/wnnconversion.cpp:419 src/anthyconversion.cpp:171 msgid "lookup result" msgstr "" + +#: src/wnnprediction.cpp:98 +msgid "WnnPrediction" +msgstr "" diff --git a/honoka/po/ja.po b/honoka/po/ja.po index e3097a1..7752a11 100644 --- a/honoka/po/ja.po +++ b/honoka/po/ja.po @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: ja\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-04-13 11:14+0900\n" +"POT-Creation-Date: 2005-06-20 15:54+0900\n" "PO-Revision-Date: 2004-12-01 14:29+0900\n" "Last-Translator: TAM (Teppei Tamra) \n" "Language-Team: Japanese\n" @@ -18,58 +18,62 @@ "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.9.1\n" -#: src/honoka_imengine.cpp:92 src/honoka_imengine.cpp:99 +#: src/honoka_imengine.cpp:89 src/honoka_imengine.cpp:96 #: src/honoka_imengine_setup.cpp:96 msgid "Honoka" msgstr "ほのか" -#: src/honoka_imengine.cpp:112 +#: src/honoka_imengine.cpp:109 msgid "ja_JP" msgstr "ja_JP" -#: src/honoka_imengine.cpp:124 +#: src/honoka_imengine.cpp:121 msgid "(C) 2004 TAM(Teppei Tamra) " msgstr "(C) 2004 TAM(Teppei Tamra) " -#: src/honoka_imengine.cpp:134 +#: src/honoka_imengine.cpp:131 msgid "SCIM-WNN HELP" msgstr "適当にそれっぽく操作して下さい。" -#: src/honoka_imengine.cpp:370 +#: src/honoka_imengine.cpp:477 msgid "input mode" msgstr "入力モード" -#: src/honoka_imengine.cpp:374 src/honoka_imengine.cpp:381 -#: src/honoka_imengine.cpp:384 +#: src/honoka_imengine.cpp:481 src/honoka_imengine.cpp:489 +#: src/honoka_imengine.cpp:497 src/honoka_imengine.cpp:500 msgid "mode status" msgstr "状態" -#: src/honoka_imengine.cpp:377 +#: src/honoka_imengine.cpp:485 +msgid "predictor" +msgstr "予測エンジン" + +#: src/honoka_imengine.cpp:493 msgid "convertor" msgstr "変換エンジン" -#: src/honoka_imengine.cpp:386 +#: src/honoka_imengine.cpp:502 msgid "conversion mode" msgstr "変換モード" -#: src/honoka_imengine.cpp:402 +#: src/honoka_imengine.cpp:523 msgid "Kanji" msgstr "[漢]" -#: src/honoka_imengine.cpp:403 +#: src/honoka_imengine.cpp:524 msgid "Yosoku" msgstr "[予]" -#: src/honoka_imengine.cpp:409 +#: src/honoka_imengine.cpp:530 msgid "AUTO" msgstr "[逐]" -#: src/honoka_imengine.cpp:410 +#: src/honoka_imengine.cpp:531 msgid "REN" msgstr "[連]" -#: src/honoka_imengine.cpp:974 src/honoka_imengine.cpp:982 -#: src/honoka_imengine.cpp:1009 src/honoka_imengine.cpp:1021 +#: src/honoka_imengine.cpp:1226 src/honoka_imengine.cpp:1234 +#: src/honoka_imengine.cpp:1262 src/honoka_imengine.cpp:1274 msgid "could not connect to jserver." msgstr "サーバに接続できませんでした" @@ -470,53 +474,57 @@ msgid "Options" msgstr "オプション" -#: src/romkan.cpp:507 +#: src/romkan.cpp:536 msgid "Roma-Kana" msgstr "[あ]" -#: src/romkan.cpp:511 +#: src/romkan.cpp:540 msgid "Roma-Katakana" msgstr "[ア]" -#: src/romkan.cpp:515 +#: src/romkan.cpp:544 msgid "Half Roma-Kana" msgstr "[アr]" -#: src/romkan.cpp:519 +#: src/romkan.cpp:548 msgid "Ascii" msgstr "[aa]" -#: src/romkan.cpp:523 +#: src/romkan.cpp:552 msgid "Wide Ascii" msgstr "[a]" -#: src/romkan.cpp:586 +#: src/romkan.cpp:615 msgid "Roma" msgstr "ローマ字" -#: src/kanainput.cpp:132 +#: src/kanainput.cpp:135 msgid "KANA" msgstr "[あ]" -#: src/kanainput.cpp:140 +#: src/kanainput.cpp:143 msgid "Kana" msgstr "かな入力" -#: src/wnnconversion.cpp:349 +#: src/wnnconversion.cpp:353 msgid "yosoku lookup result" msgstr "予測候補" -#: src/wnnconversion.cpp:401 +#: src/wnnconversion.cpp:406 msgid "Ikeiji lookup result" msgstr "異形字変換" -#: src/wnnconversion.cpp:407 +#: src/wnnconversion.cpp:412 msgid "association lookup result" msgstr "連想変換" -#: src/wnnconversion.cpp:414 src/anthyconversion.cpp:163 +#: src/wnnconversion.cpp:419 src/anthyconversion.cpp:171 msgid "lookup result" msgstr "候補一覧" +#: src/wnnprediction.cpp:98 +msgid "WnnPrediction" +msgstr "Wnn予測" + #~ msgid "Wnn" #~ msgstr "Wnn" diff --git a/honoka/src/Makefile.am b/honoka/src/Makefile.am index dc257e4..a78ab96 100644 --- a/honoka/src/Makefile.am +++ b/honoka/src/Makefile.am @@ -27,8 +27,8 @@ -DHONOKA_PLUGINDIR=\"@SCIM_MODULEDIR@/honoka\" noinst_HEADERS = honoka_imengine.h wnnproto.h romkan.h romkan_table.h \ - wnnconversion.h honoka_def.h kanainput.h anthyconversion.h multiconvertor.h skkdic.h \ - skkdicconversion.h wnnplugin.h + wnnconversion.h honoka_def.h kanainput.h anthyconversion.h multiconvertor.h skkdic.h \ + skkdicconversion.h wnnplugin.h wnnprediction.h moduledir = @SCIM_MODULEDIR@/IMEngine module_LTLIBRARIES = honoka.la @@ -65,11 +65,12 @@ @SCIM_LIBS@ libhonokaincludedir = $(includedir)/honoka -libhonokainclude_HEADERS = convertor.h preeditor.h honokapluginbase.h honokakeyeventlist.h honokamultiplepluginbase.h +libhonokainclude_HEADERS = convertor.h preeditor.h honokapluginbase.h \ + honokakeyeventlist.h honokamultiplepluginbase.h predictor.h lib_LTLIBRARIES = libhonoka_plugin.la libhonoka_plugin_la_SOURCES = convertor.cpp honokapluginbase.cpp preeditor.cpp \ - honokakeyeventlist.cpp honokamultiplepluginbase.cpp + honokakeyeventlist.cpp honokamultiplepluginbase.cpp predictor.cpp libhonoka_plugin_la_CFLAGS = @SCIM_CFLAGS@ @SCIM_DEBUG_FLAGS@ libhonoka_plugin_la_CXXFLAGS = @SCIM_CFLAGS@ @SCIM_DEBUG_FLAGS@ libhonoka_plugin_la_LDFLAGS = @LIBTOOL_EXPORT_OPTIONS@ @INTLLIBS@ @SCIM_LIBS@ @@ -92,7 +93,7 @@ plugin_anthy_la_LDFLAGS = -avoid-version -module -rpath $(plugindir) @LIBTOOL_EXPORT_OPTIONS@ @INTLLIBS@ @SCIM_LIBS@ @ANTHY_LIBS@ plugin_anthy_la_LIBADD = $(top_builddir)/src/libhonoka_plugin.la -plugin_wnn_la_SOURCES = wnnconversion.cpp wnnplugin.cpp +plugin_wnn_la_SOURCES = wnnconversion.cpp wnnplugin.cpp wnnprediction.cpp plugin_wnn_la_CFLAGS = @SCIM_CFLAGS@ @SCIM_DEBUG_FLAGS@ plugin_wnn_la_CXXFLAGS = @SCIM_CFLAGS@ @SCIM_DEBUG_FLAGS@ plugin_wnn_la_LDFLAGS = -avoid-version -module -rpath $(plugindir) @LIBTOOL_EXPORT_OPTIONS@ @INTLLIBS@ @SCIM_LIBS@ @WNN_LIBS@ @@ -116,4 +117,3 @@ plugin_kanainput_la_LDFLAGS = -avoid-version -module -rpath $(plugindir) @LIBTOOL_EXPORT_OPTIONS@ @INTLLIBS@ @SCIM_LIBS@ plugin_kanainput_la_LIBADD = $(top_builddir)/src/libhonoka_plugin.la - diff --git a/honoka/src/convertor.cpp b/honoka/src/convertor.cpp index c820940..29c866c 100644 --- a/honoka/src/convertor.cpp +++ b/honoka/src/convertor.cpp @@ -146,8 +146,6 @@ String Convertor::getPropertyName() { - // �ץ�ѥƥ���ɽ�������̾�����֤��Ʋ������� - // �ġ���С���ɽ�������ΤǤǤ����û�������ɤ������Τ�ޤ��� // �����λ���ǡ���ˡ����ʤ�Τ���ꤷ�ޤ��礦�� return getName(); } diff --git a/honoka/src/honoka_def.h b/honoka/src/honoka_def.h index 2abdf85..6822979 100644 --- a/honoka/src/honoka_def.h +++ b/honoka/src/honoka_def.h @@ -101,6 +101,8 @@ #define HONOKA_DEFAULT_DEFAULT_PREEDITOR "Romkan" #define HONOKA_CONFIG_DEFAULT_CONVERTOR "/IMEngine/Honoka/DefaultConvertor" #define HONOKA_DEFAULT_DEFAULT_CONVERTOR "Wnn" +#define HONOKA_CONFIG_DEFAULT_PREDICTOR "/IMEngine/Honoka/DefaultPredictor" +#define HONOKA_DEFAULT_DEFAULT_PREDICTOR "WnnPredictor" #define HONOKA_CONFIG_SERVERTYPE "/IMEngine/Honoka/ServerType" #ifdef HAVE_LIBWNN7 #define HONOKA_DEFAULT_SERVERTYPE "Wnn7" @@ -124,6 +126,7 @@ #define HONOKA_PROP_INPUTMODE "/IMEngine/Honoka/InputMode" #define HONOKA_PROP_CONVERSIONMODE "/IMEngine/Honoka/ConversionMode" #define HONOKA_PROP_CONVERTOR "/IMEngine/Honoka/Convertor" +#define HONOKA_PROP_PREDICTOR "/IMEngine/Honoka/Predictor" // Romkan diff --git a/honoka/src/honoka_imengine.cpp b/honoka/src/honoka_imengine.cpp index ac2e972..1915ac4 100644 --- a/honoka/src/honoka_imengine.cpp +++ b/honoka/src/honoka_imengine.cpp @@ -197,6 +197,7 @@ pe.getPluginVersion = getPluginVersion; pe.instance = p; pe.name = p->getName(); + pe.dll = plugin; // Ʊ̾�Υץ饰���󤬤��ä����ϥ��ɤ���ߤ��ޤ��� //if (plugins.find(p->getName()) != plugins.end()) { if (pluginNameList.find(p->getName()) != pluginNameList.end()) { @@ -225,11 +226,13 @@ // �ץ饰���󤬤ʤ���Хǥե����㵡ǽ�ʥ١������饹��Ȥ��ޤ��� if (!convertors.size()) convertors.push_back(new Convertor(_scim_config)); if (!preeditors.size()) preeditors.push_back(new PreEditor(_scim_config)); - + if (!predictors.size()) predictors.push_back(new Predictor(_scim_config)); + // �������Convertor/PreEditor����ꤷ�ޤ��� m_convertor = convertors.at(0); m_preeditor = preeditors.at(0); - + m_predictor = predictors.at(0); + m_multi = new MultiConvertor(_scim_config,this); // ������ء� @@ -246,6 +249,11 @@ if (p->getPluginType() == "PreEditor") { preeditors.push_back(static_cast(p)); return true; + } else + // Predictor�ξ�硣 + if (p->getPluginType() == "Predictor") { + predictors.push_back(static_cast(p)); + return true; } return false; } @@ -259,6 +267,7 @@ */ for(unsigned int i = 0;i < plugins.size();i ++) { plugins[i].deleteInstance(plugins[i].instance); + dlclose(plugins[i].dll); } } @@ -289,6 +298,7 @@ defaultPreEditor = _scim_config->read(String(HONOKA_CONFIG_DEFAULT_PREEDITOR),String(HONOKA_DEFAULT_DEFAULT_PREEDITOR)); defaultConvertor = _scim_config->read(String(HONOKA_CONFIG_DEFAULT_CONVERTOR),String(HONOKA_DEFAULT_DEFAULT_CONVERTOR)); + defaultPredictor = _scim_config->read(String(HONOKA_CONFIG_DEFAULT_PREDICTOR),String(HONOKA_DEFAULT_DEFAULT_PREDICTOR)); auto_conversion = _scim_config->read(String(HONOKA_CONFIG_AUTO_CONVERSION),HONOKA_DEFAULT_AUTO_CONVERSION);; // �ǥե���ȥ������ꡣ @@ -398,7 +408,8 @@ changePreEditor(defaultPreEditor); changeConvertor(defaultConvertor); - + changePredictor(defaultPredictor); + // �����ǰ�����³���Ƥ������� m_convertor->connect(); @@ -438,6 +449,23 @@ } + +/*! + \fn HonokaInstance::changePredictor(const String &name) + */ +void HonokaInstance::changePredictor(const String &name) +{ + // Predictor���ѹ�����᥽�åɡ� + for(unsigned int i = 0;i < predictors.size();i ++) { + if (predictors[i]->getPropertyName() == name) { + m_predictor = predictors[i]; + return; + } + } + return; +} + + /*! \fn HonokaInstance::updateProperty() */ @@ -453,6 +481,15 @@ preeditors[i]->getName(),String(""),_("mode status")); m_proplist.push_back(p); } + + p = Property(HONOKA_PROP_PREDICTOR,"",String(""),_("predictor")); + m_proplist.push_back(p); + for(unsigned int i = 0;i < predictors.size();i ++) { + p = Property(String(HONOKA_PROP_PREDICTOR) + String("/") + predictors[i]->getPropertyName(), + predictors[i]->getName(),String(""),_("mode status")); + m_proplist.push_back(p); + } + p = Property(HONOKA_PROP_CONVERTOR,"",String(""),_("convertor")); m_proplist.push_back(p); for(unsigned int i = 0;i < convertors.size();i ++) { @@ -471,6 +508,11 @@ it->set_label(m_preeditor->getName()); } update_property(*it); + it = find(m_proplist.begin(),m_proplist.end(),HONOKA_PROP_PREDICTOR); + if (it != m_proplist.end()) { + it->set_label(m_predictor->getName()); + } + update_property(*it); it = find(m_proplist.begin(),m_proplist.end(),HONOKA_PROP_CONVERTOR); if (it != m_proplist.end()) { it->set_label(m_convertor->getName()); @@ -509,9 +551,11 @@ update_preedit_caret(m_preeditor->getPos()); } // ͽ¬���ѥ����ɡ�����Wnn7������ʬΥͽ�ꡣ - if ((!m_conversion) && yosoku && m_convertor->isConnected() && (sType == "Wnn7") && - (!auto_conversion) && (m_convertor->getName() == "Wnn")) { - m_convList = m_convertor->getYosokuList(m_preeditor->getText()); + //if ((!m_conversion) && yosoku && m_convertor->isConnected() && (sType == "Wnn7") && + // (!auto_conversion) && (m_convertor->getName() == "Wnn")) { + // m_convList = m_convertor->getYosokuList(m_preeditor->getText()); + if ((!m_conversion) && yosoku && m_predictor->isConnected() && (!auto_conversion)) { + m_convList = m_predictor->getPredictionList(m_preeditor->getText()); if (m_convList.count) { m_lookup_table.clear(); for(unsigned int i = 0;i < m_convList.count;i ++) { @@ -1131,6 +1175,13 @@ changePreEditor(property.substr(s.length() + 1)); updateProperty(); } + + s = HONOKA_PROP_PREDICTOR; + if ((property.length() > s.length()) && (property.substr(0,s.length()) == s)) { + changePredictor(property.substr(s.length() + 1)); + updateProperty(); + } + s = HONOKA_PROP_CONVERTOR; if ((property.length() > s.length()) && (property.substr(0,s.length()) == s)) { changeConvertor(property.substr(s.length() + 1)); diff --git a/honoka/src/honoka_imengine.h b/honoka/src/honoka_imengine.h index e956201..0065ac6 100644 --- a/honoka/src/honoka_imengine.h +++ b/honoka/src/honoka_imengine.h @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #define Uses_SCIM_ICONV @@ -79,6 +80,7 @@ public: String filename; String name; + void *dll; createInstanceFunc *createInstance; deleteInstanceFunc *deleteInstance; getPluginVersionFunc *getPluginVersion; @@ -111,6 +113,7 @@ PreEditor *m_preeditor; Convertor *m_convertor; Convertor *m_def_convertor; + Predictor *m_predictor; bool m_conversion; bool m_yosoku; bool m_lookup; @@ -124,11 +127,13 @@ bool auto_conversion; String defaultPreEditor; String defaultConvertor; + String defaultPredictor; IConvert m_iconv; //map plugins; vector plugins; vector preeditors; vector convertors; + vector predictors; String sType; WideString yomi; stack preeditStack; @@ -145,6 +150,7 @@ void updateConversion(); void changePreEditor(const String &name); void changeConvertor(const String &name); + void changePredictor(const String &name); void autoConversion(); bool pluginCheck(HonokaPluginBase *p); private: diff --git a/honoka/src/predictor.cpp b/honoka/src/predictor.cpp new file mode 100644 index 0000000..d06d28f --- /dev/null +++ b/honoka/src/predictor.cpp @@ -0,0 +1,86 @@ +/*************************************************************************** + * Copyright (C) 2005 by TAM(Teppei Tamra) * + * tam-t@par.odn.ne.jp * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include "predictor.h" + +Predictor::Predictor(ConfigPointer cfg) : HonokaPluginBase(String("Predictor")) +{ +} + + +Predictor::~Predictor() +{ +} + + + + +/*! + \fn Predictor::getPredictionList(const WideString &str) + */ +ResultList Predictor::getPredictionList(const WideString &str) +{ + return ResultList(); +} + + +/*! + \fn Predictor::disconnect() + */ +void Predictor::disconnect() +{ + return; +} + + +/*! + \fn Predictor::connect() + */ +bool Predictor::connect() +{ + return false; +} + + +/*! + \fn Predictor::isConnected() + */ +bool Predictor::isConnected() +{ + return false; +} + + +/*! + \fn Predictor::getPropertyName() + */ +String Predictor::getPropertyName() +{ + return getName(); +} + +/*! + \fn Predictor::getName() + */ +String Predictor::getName() +{ + return String("Predicter"); +} + diff --git a/honoka/src/predictor.h b/honoka/src/predictor.h new file mode 100644 index 0000000..c290aed --- /dev/null +++ b/honoka/src/predictor.h @@ -0,0 +1,57 @@ +/*************************************************************************** + * Copyright (C) 2005 by TAM(Teppei Tamra) * + * tam-t@par.odn.ne.jp * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#ifndef PREDICTOR_H +#define PREDICTOR_H + +#define Uses_SCIM_CONFIG_BASE + +#include + +#include +#include +#include +#include +#include +#include + +// @todo ResultList��å���� +#include + +using namespace std; +using namespace scim; + +/** +@author TAM (Teppei Tamra) +*/ +class Predictor : public HonokaPluginBase { +public: + Predictor(ConfigPointer cfg); + + ~Predictor(); + virtual ResultList getPredictionList(const WideString &str); + virtual void disconnect(); + virtual bool connect(); + virtual bool isConnected(); + virtual String getPropertyName(); + virtual String getName(); +}; + +#endif diff --git a/honoka/src/wnnplugin.cpp b/honoka/src/wnnplugin.cpp index d0a0dc2..3583313 100644 --- a/honoka/src/wnnplugin.cpp +++ b/honoka/src/wnnplugin.cpp @@ -24,12 +24,21 @@ WnnPlugin::WnnPlugin(ConfigPointer cfg) : HonokaMultiplePluginBase(cfg) { + predictor = 0; convertor = new WnnConversion(cfg); + + bool yosoku = cfg->read(String(HONOKA_CONFIG_YOSOKU),HONOKA_DEFAULT_YOSOKU); + String sType = cfg->read(String(HONOKA_CONFIG_SERVERTYPE),String(HONOKA_DEFAULT_SERVERTYPE)); + if (yosoku && (sType == String("Wnn7"))) { + predictor = new WnnPrediction(cfg,convertor); + } } WnnPlugin::~WnnPlugin() { + if (predictor) delete predictor; + delete convertor; } /*! @@ -37,8 +46,9 @@ */ HonokaPluginBase * WnnPlugin::getPluginInstanceAt(int p) { - if (p != 0) return 0; - return convertor; + if (p == 0) return convertor; + if ((p == 1) && predictor) return predictor; + return 0; } @@ -47,6 +57,7 @@ */ int WnnPlugin::getPluginCount() { + if (predictor) return 2; return 1; } diff --git a/honoka/src/wnnplugin.h b/honoka/src/wnnplugin.h index edc9bd5..a357dde 100644 --- a/honoka/src/wnnplugin.h +++ b/honoka/src/wnnplugin.h @@ -29,6 +29,8 @@ #include #include +#include +#include using namespace std; using namespace scim; @@ -37,6 +39,8 @@ /** @author TAM (Teppei Tamra) */ +class WnnPlugin; + class WnnPlugin : public HonokaMultiplePluginBase { public: WnnPlugin(ConfigPointer cfg); @@ -48,6 +52,7 @@ protected: WnnConversion * convertor; + WnnPrediction * predictor; }; #endif diff --git a/honoka/src/wnnprediction.cpp b/honoka/src/wnnprediction.cpp new file mode 100644 index 0000000..ab964ef --- /dev/null +++ b/honoka/src/wnnprediction.cpp @@ -0,0 +1,101 @@ +/*************************************************************************** + * Copyright (C) 2005 by TAM(Teppei Tamra) * + * tam-t@par.odn.ne.jp * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include "wnnprediction.h" + +#ifdef HAVE_GETTEXT + #include + #define _(String) dgettext(GETTEXT_PACKAGE,String) + #define N_(String) (String) +#else + #define _(String) (String) + #define N_(String) (String) + #define bindtextdomain(Package,Directory) + #define textdomain(domain) + #define bind_textdomain_codeset(domain,codeset) +#endif + + +WnnPrediction::WnnPrediction(ConfigPointer cfg,WnnConversion *wnn) : Predictor(cfg) +{ + convertor = wnn; +} + + +WnnPrediction::~WnnPrediction() +{ +} + + + +/*! + \fn WnnPrediction::getPredictionList(const WideString &str) + */ +ResultList WnnPrediction::getPredictionList(const WideString &str) +{ + return convertor->getYosokuList(str); +} + + +/*! + \fn WnnPrediction::disconnect() + */ +void WnnPrediction::disconnect() +{ + // disconnect��WnnConversion¦�˰�Ǥ�� + return; +} + + +/*! + \fn WnnPrediction::connect() + */ +bool WnnPrediction::connect() +{ + return false; +} + + +/*! + \fn WnnPrediction::isConnected() + */ +bool WnnPrediction::isConnected() +{ + return convertor->isConnected(); +} + + +/*! + \fn WnnPrediction::getPropertyName() + */ +String WnnPrediction::getPropertyName() +{ + return getName(); +} + +/*! + \fn WnnPrediction::getName() + */ +String WnnPrediction::getName() +{ + return String(_("WnnPrediction")); +} + + diff --git a/honoka/src/wnnprediction.h b/honoka/src/wnnprediction.h new file mode 100644 index 0000000..a316639 --- /dev/null +++ b/honoka/src/wnnprediction.h @@ -0,0 +1,57 @@ +/*************************************************************************** + * Copyright (C) 2005 by TAM(Teppei Tamra) * + * tam-t@par.odn.ne.jp * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#ifndef WNNPREDICTION_H +#define WNNPREDICTION_H + +#define Uses_SCIM_CONFIG_BASE + +#include +#include + +#include +#include +#include +#include +#include +#include + + +/** +@author TAM (Teppei Tamra) +*/ +class WnnPrediction : public Predictor { +public: + WnnPrediction(ConfigPointer cfg,WnnConversion *wnn); + + ~WnnPrediction(); + virtual ResultList getPredictionList(const WideString &str); + virtual void disconnect(); + virtual bool connect(); + virtual bool isConnected(); + virtual String getPropertyName(); + virtual String getName(); + +protected: + WnnConversion *convertor; + +}; + +#endif