summaryrefslogtreecommitdiff
path: root/inputmethod/novel-pinyin
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2009-11-24 12:13:02 +0000
committerobache <obache@pkgsrc.org>2009-11-24 12:13:02 +0000
commitd351bd8299c3f7a573901b2596c465c6548086db (patch)
treecc1cace654a014367cff36578c8f3518024d90c9 /inputmethod/novel-pinyin
parentfe358777b59074ff7be10ecba4a69129e3bd9f62 (diff)
downloadpkgsrc-d351bd8299c3f7a573901b2596c465c6548086db.tar.gz
Import novel-pinyin-0.2.5 as inputmethod/novel-pinyin.
A HMM-based(Hidden Markov Model) sentence pinyin input method for Chinese. This Project starts from my graduate life in BUPT. Evolved from a research prototype to a real project. This input method is based on scim-pinyin, a popular Linux input method. Hopefully this project will help you speed up inputing Chinese characters.
Diffstat (limited to 'inputmethod/novel-pinyin')
-rw-r--r--inputmethod/novel-pinyin/DESCR7
-rw-r--r--inputmethod/novel-pinyin/Makefile28
-rw-r--r--inputmethod/novel-pinyin/PLIST9
-rw-r--r--inputmethod/novel-pinyin/distinfo9
-rw-r--r--inputmethod/novel-pinyin/patches/patch-aa26
-rw-r--r--inputmethod/novel-pinyin/patches/patch-ab26
-rw-r--r--inputmethod/novel-pinyin/patches/patch-ac21
-rw-r--r--inputmethod/novel-pinyin/patches/patch-ad21
8 files changed, 147 insertions, 0 deletions
diff --git a/inputmethod/novel-pinyin/DESCR b/inputmethod/novel-pinyin/DESCR
new file mode 100644
index 00000000000..06ef37c194c
--- /dev/null
+++ b/inputmethod/novel-pinyin/DESCR
@@ -0,0 +1,7 @@
+A HMM-based(Hidden Markov Model) sentence pinyin input method for Chinese.
+
+This Project starts from my graduate life in BUPT. Evolved from a research
+prototype to a real project. This input method is based on scim-pinyin, a
+popular Linux input method.
+
+Hopefully this project will help you speed up inputing Chinese characters.
diff --git a/inputmethod/novel-pinyin/Makefile b/inputmethod/novel-pinyin/Makefile
new file mode 100644
index 00000000000..79bb06e2e94
--- /dev/null
+++ b/inputmethod/novel-pinyin/Makefile
@@ -0,0 +1,28 @@
+# $NetBSD: Makefile,v 1.1.1.1 2009/11/24 12:13:02 obache Exp $
+#
+
+DISTNAME= novel-pinyin-0.2.5
+CATEGORIES= inputmethod
+MASTER_SITES= http://downloads.sourceforge.net/project/novel-pinyin/novel-pinyin/0.2.5/
+
+MAINTAINER= obache@NetBSD.org
+HOMEPAGE= http://novel-pinyin.sourceforge.net/
+COMMENT= HMM-based sentence pinyin input method for Chinese
+LICENSE= gnu-gpl-v2
+
+PKG_DESTDIR_SUPPORT= user-destdir
+
+GNU_CONFIGURE= yes
+USE_LIBTOOL= yes
+USE_LANGUAGES= c c++
+USE_TOOLS+= intltool pkg-config
+
+USE_SCIM_GTKUTILS= yes
+
+.include "../../databases/db4/buildlink3.mk"
+BUILDLINK_TRANSFORM+= l:db:db4
+.include "../../devel/gettext-lib/buildlink3.mk"
+.include "../../devel/glib2/buildlink3.mk"
+.include "../../inputmethod/scim/buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/inputmethod/novel-pinyin/PLIST b/inputmethod/novel-pinyin/PLIST
new file mode 100644
index 00000000000..1a971bb5224
--- /dev/null
+++ b/inputmethod/novel-pinyin/PLIST
@@ -0,0 +1,9 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2009/11/24 12:13:02 obache Exp $
+lib/scim-1.0/1.4.0/IMEngine/novel_pinyin.la
+lib/scim-1.0/1.4.0/SetupUI/novel-pinyin-imengine-setup.la
+share/scim/icons/novel-pinyin.png
+share/scim/novel-pinyin/bigram.db
+share/scim/novel-pinyin/gb_char.bin
+share/scim/novel-pinyin/gbk_char.bin
+share/scim/novel-pinyin/pinyin_index.bin
+share/scim/novel-pinyin/special_table
diff --git a/inputmethod/novel-pinyin/distinfo b/inputmethod/novel-pinyin/distinfo
new file mode 100644
index 00000000000..40102a49546
--- /dev/null
+++ b/inputmethod/novel-pinyin/distinfo
@@ -0,0 +1,9 @@
+$NetBSD: distinfo,v 1.1.1.1 2009/11/24 12:13:02 obache Exp $
+
+SHA1 (novel-pinyin-0.2.5.tar.gz) = d973b122aed8b844806948e5081f342945df75ff
+RMD160 (novel-pinyin-0.2.5.tar.gz) = 61107040664ddf76a26191401a750ae60397fa4e
+Size (novel-pinyin-0.2.5.tar.gz) = 6006453 bytes
+SHA1 (patch-aa) = bacaf491f7e7a9085fff5eb1ea15a73e0638c00c
+SHA1 (patch-ab) = 7e50761959a6b17480d524b22cb265cacca44332
+SHA1 (patch-ac) = a88eab51d41129afdfb2efab0ea6eb1c60ce369f
+SHA1 (patch-ad) = 16648a1a547982eac40676d40ed1c9b978476df5
diff --git a/inputmethod/novel-pinyin/patches/patch-aa b/inputmethod/novel-pinyin/patches/patch-aa
new file mode 100644
index 00000000000..ea67e10d4d2
--- /dev/null
+++ b/inputmethod/novel-pinyin/patches/patch-aa
@@ -0,0 +1,26 @@
+$NetBSD: patch-aa,v 1.1.1.1 2009/11/24 12:13:02 obache Exp $
+
+Use C++ way for getline(3) less platforms.
+
+--- src/segment/mmseg.cpp.orig 2009-11-24 08:50:16.000000000 +0000
++++ src/segment/mmseg.cpp
+@@ -20,6 +20,7 @@
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
++#include <iostream>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <assert.h>
+@@ -192,9 +193,8 @@ int main(int argc, char * argv[]){
+
+ char* linebuf = (char *)malloc ( 1024 * sizeof (char) );
+ size_t size = 1024;
+- while( getline(&linebuf, &size, stdin) ){
+- if ( feof(stdin) )
+- break;
++ while( !std::cin.eof()) {
++ std::cin.getline(linebuf, size);
+ linebuf[strlen(linebuf)-1] = '\0';
+
+ GArray * phrases = g_array_new(TRUE, TRUE, sizeof( char *));
diff --git a/inputmethod/novel-pinyin/patches/patch-ab b/inputmethod/novel-pinyin/patches/patch-ab
new file mode 100644
index 00000000000..24835eeed35
--- /dev/null
+++ b/inputmethod/novel-pinyin/patches/patch-ab
@@ -0,0 +1,26 @@
+$NetBSD: patch-ab,v 1.1.1.1 2009/11/24 12:13:02 obache Exp $
+
+Use C++ way for getline(3) less platforms.
+
+--- src/training/gen_ngram.cpp.orig 2008-07-21 12:39:27.000000000 +0000
++++ src/training/gen_ngram.cpp
+@@ -20,6 +20,7 @@
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
++#include <iostream>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+@@ -116,9 +117,8 @@ int main(int argc, char * argv[]){
+ char* linebuf = (char *)malloc ( 1024 * sizeof (char) );
+ size_t size = 1024;
+ phrase_token_t last_token, cur_token = last_token = 0;
+- while( getline(&linebuf, &size, stdin) ){
+- if ( feof(stdin) )
+- break;
++ while( !std::cin.eof() ) {
++ std::cin.getline(linebuf, size);
+ linebuf[strlen(linebuf)-1] = '\0';
+
+ phrase_token_t token;
diff --git a/inputmethod/novel-pinyin/patches/patch-ac b/inputmethod/novel-pinyin/patches/patch-ac
new file mode 100644
index 00000000000..dcaaff47dc0
--- /dev/null
+++ b/inputmethod/novel-pinyin/patches/patch-ac
@@ -0,0 +1,21 @@
+$NetBSD: patch-ac,v 1.1.1.1 2009/11/24 12:13:02 obache Exp $
+
+Use C++ way for getline(3) less platforms.
+
+--- tests/lookup/test_simple_lookup.cpp.orig 2008-07-21 12:39:27.000000000 +0000
++++ tests/lookup/test_simple_lookup.cpp
+@@ -1,3 +1,4 @@
++#include <iostream>
+ #include <string.h>
+ #include <stdio.h>
+ #include <sys/time.h>
+@@ -57,7 +58,8 @@ int main( int argc, char * argv[]){
+
+ char* linebuf = (char *)malloc ( 1024 * sizeof (char) );
+ size_t size = 1024;
+- while( getline(&linebuf, &size, stdin) ){
++ while( !std::cin.eof() ){
++ std::cin.getline(linebuf, size);
+ linebuf[strlen(linebuf)-1] = '\0';
+ if ( strcmp ( linebuf, "quit" ) == 0)
+ break;
diff --git a/inputmethod/novel-pinyin/patches/patch-ad b/inputmethod/novel-pinyin/patches/patch-ad
new file mode 100644
index 00000000000..c36a611a87c
--- /dev/null
+++ b/inputmethod/novel-pinyin/patches/patch-ad
@@ -0,0 +1,21 @@
+$NetBSD: patch-ad,v 1.1.1.1 2009/11/24 12:13:02 obache Exp $
+
+Use C++ way for getline(3) less platforms.
+
+--- tests/storage/test_pinyin_index.cpp.orig 2008-07-21 12:39:27.000000000 +0000
++++ tests/storage/test_pinyin_index.cpp
+@@ -1,3 +1,4 @@
++#include <iostream>
+ #include <string.h>
+ #include <stdio.h>
+ #include <sys/time.h>
+@@ -75,7 +76,8 @@ int main( int argc, char * argv[]){
+
+ char* linebuf = (char *)malloc ( 1024 * sizeof (char) );
+ size_t size = 1024;
+- while( getline(&linebuf, &size, stdin) ){
++ while( !std::cin.eof() ){
++ std::cin.getline(linebuf, size);
+ linebuf[strlen(linebuf)-1] = '\0';
+ if ( strcmp ( linebuf, "quit" ) == 0)
+ break;