summaryrefslogtreecommitdiff
path: root/textproc/cabocha
diff options
context:
space:
mode:
authorobache <obache>2010-05-19 12:16:25 +0000
committerobache <obache>2010-05-19 12:16:25 +0000
commita6a6aaf4bfd2e41ba586193aff2dec4580f2e43a (patch)
tree5096a96c73908ab3e1a41a7308fe149e1a46450f /textproc/cabocha
parent9e915971f2235c74b97f4839058bd0b7904b54f0 (diff)
downloadpkgsrc-a6a6aaf4bfd2e41ba586193aff2dec4580f2e43a.tar.gz
Import cabocha-0.53 as textproc/cabocha.
CaboCha is a Japanese dependency analysis machine based on Support Vector Machines. It is (89.29%) system that accuracy is the highest as a statistical Japanese dependency analysis machine as of June, 2001. Moreover, definite analytical algorithm (Cascaded Chunking Model) that doesn't do back-track is adopted, and an efficient analysis can be done comparatively.
Diffstat (limited to 'textproc/cabocha')
-rw-r--r--textproc/cabocha/DESCR5
-rw-r--r--textproc/cabocha/Makefile35
-rw-r--r--textproc/cabocha/Makefile.common15
-rw-r--r--textproc/cabocha/PLIST19
-rw-r--r--textproc/cabocha/buildlink3.mk14
-rw-r--r--textproc/cabocha/distinfo6
-rw-r--r--textproc/cabocha/options.mk19
-rw-r--r--textproc/cabocha/patches/patch-aa27
8 files changed, 140 insertions, 0 deletions
diff --git a/textproc/cabocha/DESCR b/textproc/cabocha/DESCR
new file mode 100644
index 00000000000..507165b4f6b
--- /dev/null
+++ b/textproc/cabocha/DESCR
@@ -0,0 +1,5 @@
+CaboCha is a Japanese dependency analysis machine based on Support Vector
+Machines. It is (89.29%) system that accuracy is the highest as a statistical
+Japanese dependency analysis machine as of June, 2001. Moreover, definite
+analytical algorithm (Cascaded Chunking Model) that doesn't do back-track is
+adopted, and an efficient analysis can be done comparatively.
diff --git a/textproc/cabocha/Makefile b/textproc/cabocha/Makefile
new file mode 100644
index 00000000000..448da47e7ad
--- /dev/null
+++ b/textproc/cabocha/Makefile
@@ -0,0 +1,35 @@
+# $NetBSD: Makefile,v 1.1.1.1 2010/05/19 12:16:25 obache Exp $
+#
+
+.include "Makefile.common"
+
+COMMENT= Yet another Japanese Dependency Structure Analyzer
+
+PKG_DESTDIR_SUPPORT= user-destdir
+
+GNU_CONFIGURE= yes
+USE_LIBTOOL= yes
+USE_LANGUAGES= c c++
+USE_TOOLS+= gmake perl:run gzcat
+
+CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
+CONFIGURE_ARGS+= --with-perl=${PERL5:Q}
+
+INSTALL_MAKE_FLAGS+= confdir=${PREFIX}/share/examples
+
+CONF_FILES= share/examples/cabocharc ${PKG_SYSCONFDIR}/cabocharc
+
+TEST_TARGET= check
+
+BUILD_DEPENDS+= nkf-[0-9]*:../../converters/nkf
+
+# using zcat to extract .gz
+SUBST_CLASSES+= zcat
+SUBST_STAGE.zcat= post-configure
+SUBST_FILES.zcat= model/Makefile
+SUBST_SED.zcat= -e 's|zcat|${TOOLS_CMDLINE_GZCAT}|g'
+
+.include "options.mk"
+
+.include "../../textproc/yamcha/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/textproc/cabocha/Makefile.common b/textproc/cabocha/Makefile.common
new file mode 100644
index 00000000000..0b47ef21d21
--- /dev/null
+++ b/textproc/cabocha/Makefile.common
@@ -0,0 +1,15 @@
+# $NetBSD: Makefile.common,v 1.1.1.1 2010/05/19 12:16:25 obache Exp $
+# used by textproc/p5-cabocha/Makefile
+# used by textproc/py-cabocha/Makefile
+# used by textproc/ruby-cabocha/Makefile
+
+DISTNAME= cabocha-0.53
+CATEGORIES= textproc
+MASTER_SITES= http://www.chasen.org/~taku/software/cabocha/src/
+
+DISTINFO_FILE= ${.CURDIR}/../../textproc/cabocha/distinfo
+PATCHDIR= ${.CURDIR}/../../textproc/cabocha/patches
+
+MAINTAINER= obache@NetBSD.org
+HOMEPAGE= http://www.chasen.org/~taku/software/cabocha/
+LICENSE= gnu-lgpl-v2.1
diff --git a/textproc/cabocha/PLIST b/textproc/cabocha/PLIST
new file mode 100644
index 00000000000..f9edc1c8a6d
--- /dev/null
+++ b/textproc/cabocha/PLIST
@@ -0,0 +1,19 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2010/05/19 12:16:25 obache Exp $
+bin/cabocha
+bin/cabocha-config
+include/cabocha.h
+lib/cabocha/model/CRL-IREX-ne.model
+lib/cabocha/model/CRL-IREX-ne.txtmodel.gz
+lib/cabocha/model/IPA-chunker.model
+lib/cabocha/model/IPA-chunker.txtmodel.gz
+lib/cabocha/model/IPA-dep-A+P.model
+lib/cabocha/model/IPA-dep-A+P.txtmodel.gz
+lib/cabocha/model/IPA-dep.model
+lib/cabocha/model/IPA-dep.txtmodel.gz
+lib/libcabocha.la
+libexec/cabocha/KyotoCorpus.pm
+libexec/cabocha/Makefile
+libexec/cabocha/kc2cabocha.pl
+libexec/cabocha/kc2juman.pl
+man/man1/cabocha.1
+share/examples/cabocharc
diff --git a/textproc/cabocha/buildlink3.mk b/textproc/cabocha/buildlink3.mk
new file mode 100644
index 00000000000..606af77d1df
--- /dev/null
+++ b/textproc/cabocha/buildlink3.mk
@@ -0,0 +1,14 @@
+# $NetBSD: buildlink3.mk,v 1.1.1.1 2010/05/19 12:16:25 obache Exp $
+
+BUILDLINK_TREE+= cabocha
+
+.if !defined(CABOCHA_BUILDLINK3_MK)
+CABOCHA_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.cabocha+= cabocha>=0.53
+BUILDLINK_PKGSRCDIR.cabocha?= ../../textproc/cabocha
+
+.include "../../textproc/yamcha/buildlink3.mk"
+.endif # CABOCHA_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -cabocha
diff --git a/textproc/cabocha/distinfo b/textproc/cabocha/distinfo
new file mode 100644
index 00000000000..4f7fad14a14
--- /dev/null
+++ b/textproc/cabocha/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1.1.1 2010/05/19 12:16:25 obache Exp $
+
+SHA1 (cabocha-0.53.tar.gz) = 6b8903aa6843887bb669d9d5baea8a0eae320d80
+RMD160 (cabocha-0.53.tar.gz) = 39b637adc8b882542ecc3b6df34d8f6b99be3e38
+Size (cabocha-0.53.tar.gz) = 11552551 bytes
+SHA1 (patch-aa) = cb868fa8b88180ed5f84d55796d042e5774862af
diff --git a/textproc/cabocha/options.mk b/textproc/cabocha/options.mk
new file mode 100644
index 00000000000..1bf3fb254e6
--- /dev/null
+++ b/textproc/cabocha/options.mk
@@ -0,0 +1,19 @@
+# $NetBSD: options.mk,v 1.1.1.1 2010/05/19 12:16:25 obache Exp $
+#
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.cabocha
+PKG_OPTIONS_NONEMPTY_SETS= ma
+PKG_OPTIONS_SET.ma= chasen mecab
+PKG_SUGGESTED_OPTIONS= chasen
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mchasen)
+CONFIGURE_ARGS+= --with-morphological-analyzer=chasen
+.include "../../textproc/chasen/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mmecab)
+CONFIGURE_ARGS+= --with-morphological-analyzer=mecab
+.include "../../textproc/mecab/buildlink3.mk"
+.endif
diff --git a/textproc/cabocha/patches/patch-aa b/textproc/cabocha/patches/patch-aa
new file mode 100644
index 00000000000..7434f39d861
--- /dev/null
+++ b/textproc/cabocha/patches/patch-aa
@@ -0,0 +1,27 @@
+$NetBSD: patch-aa,v 1.1.1.1 2010/05/19 12:16:25 obache Exp $
+
+--- python/CaboCha_wrap.cxx.orig 2005-07-21 13:31:23.000000000 +0000
++++ python/CaboCha_wrap.cxx
+@@ -1206,7 +1206,7 @@ type_error:
+ obj = pyobj;
+ if (PyCFunction_Check(obj)) {
+ /* here we get the method pointer for callbacks */
+- char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
++ const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
+ c = doc ? strstr(doc, "swig_ptr: ") : 0;
+ if (c) {
+ c = ty ? SWIG_UnpackVoidPtr(c + 10, &vptr, ty->name) : 0;
+@@ -3260,11 +3260,11 @@ extern "C" {
+ swig_type_info **types_initial) {
+ size_t i;
+ for (i = 0; methods[i].ml_name; ++i) {
+- char *c = methods[i].ml_doc;
++ const char *c = methods[i].ml_doc;
+ if (c && (c = strstr(c, "swig_ptr: "))) {
+ int j;
+ swig_const_info *ci = 0;
+- char *name = c + 10;
++ const char *name = c + 10;
+ for (j = 0; const_table[j].type; ++j) {
+ if (strncmp(const_table[j].name, name,
+ strlen(const_table[j].name)) == 0) {