summaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorcheusov <cheusov@pkgsrc.org>2014-10-29 23:13:21 +0000
committercheusov <cheusov@pkgsrc.org>2014-10-29 23:13:21 +0000
commit2200df9625f98df1275efd64c857bde7138dff12 (patch)
tree9747143e9273c34659df0c65ef50df6675bdaf5f /math
parenta5b839a49aea1f95811ac8511db93816d62fc103 (diff)
downloadpkgsrc-2200df9625f98df1275efd64c857bde7138dff12.tar.gz
CRFSuite is an implementation of Conditional Random Fields (CRFs) for
labeling sequential data. The first priority of this software is to train and use CRF models as fast as possible even at the expense of its memory space and code generality. CRFsuite runs 5.4 - 61.8 times faster than C++ implementations for training. CRFsuite supports parameter estimation with L1 regularization (Laplacian prior) using Orthant-Wise Limited-memory Quasi-Newton (OW-LQN) method and L2 regularization (Gaussian prior) using Limited-memory BFGS (L-BFGS) method.
Diffstat (limited to 'math')
-rw-r--r--math/crfsuite/DESCR9
-rw-r--r--math/crfsuite/Makefile29
-rw-r--r--math/crfsuite/PLIST12
-rw-r--r--math/crfsuite/buildlink3.mk12
-rw-r--r--math/crfsuite/distinfo9
-rw-r--r--math/crfsuite/patches/patch-configure.in27
-rw-r--r--math/crfsuite/patches/patch-frontend_Makefile.am14
-rw-r--r--math/crfsuite/patches/patch-lib_cqdb_Makefile.am11
-rw-r--r--math/crfsuite/patches/patch-lib_crf_Makefile.am11
9 files changed, 134 insertions, 0 deletions
diff --git a/math/crfsuite/DESCR b/math/crfsuite/DESCR
new file mode 100644
index 00000000000..d49153568bb
--- /dev/null
+++ b/math/crfsuite/DESCR
@@ -0,0 +1,9 @@
+CRFSuite is an implementation of Conditional Random Fields (CRFs) for
+labeling sequential data. The first priority of this software is to
+train and use CRF models as fast as possible even at the expense of
+its memory space and code generality. CRFsuite runs 5.4 - 61.8 times
+faster than C++ implementations for training. CRFsuite supports
+parameter estimation with L1 regularization (Laplacian prior) using
+Orthant-Wise Limited-memory Quasi-Newton (OW-LQN) method and L2
+regularization (Gaussian prior) using Limited-memory BFGS (L-BFGS)
+method.
diff --git a/math/crfsuite/Makefile b/math/crfsuite/Makefile
new file mode 100644
index 00000000000..d4bae121748
--- /dev/null
+++ b/math/crfsuite/Makefile
@@ -0,0 +1,29 @@
+# $NetBSD: Makefile,v 1.1.1.1 2014/10/29 23:13:21 cheusov Exp $
+
+DISTNAME= 0.12
+PKGNAME= crfsuite-${DISTNAME}
+CATEGORIES= math
+MASTER_SITES= https://github.com/chokkan/crfsuite/archive/
+DIST_SUBDIR= crfsuite
+
+MAINTAINER= cheusov@NetBSD.org
+HOMEPAGE= https://github.com/chokkan/crfsuite
+COMMENT= Fast implementation of Conditional Random Fields (CRFs)
+LICENSE= modified-bsd
+
+WRKSRC= ${WRKDIR}/crfsuite-0.12
+USE_LANGUAGES= c c++
+
+USE_LIBTOOL= yes
+GNU_CONFIGURE= yes
+
+AUTOCONF_REQD= 2.50
+USE_TOOLS+= autoconf autoreconf automake
+
+CONFIGURE_ARGS+= --with-liblbfgs=${PREFIX}
+
+pre-configure:
+ set -e; cd ${WRKSRC}; autoreconf -sif
+
+.include "../../math/liblbfgs/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/math/crfsuite/PLIST b/math/crfsuite/PLIST
new file mode 100644
index 00000000000..4232779a4d5
--- /dev/null
+++ b/math/crfsuite/PLIST
@@ -0,0 +1,12 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2014/10/29 23:13:21 cheusov Exp $
+bin/crfsuite
+include/crfsuite.h
+include/crfsuite.hpp
+include/crfsuite_api.hpp
+lib/libcqdb.la
+lib/libcrfsuite.la
+share/doc/crfsuite/AUTHORS
+share/doc/crfsuite/COPYING
+share/doc/crfsuite/ChangeLog
+share/doc/crfsuite/INSTALL
+share/doc/crfsuite/README
diff --git a/math/crfsuite/buildlink3.mk b/math/crfsuite/buildlink3.mk
new file mode 100644
index 00000000000..c0d145025ab
--- /dev/null
+++ b/math/crfsuite/buildlink3.mk
@@ -0,0 +1,12 @@
+# $NetBSD: buildlink3.mk,v 1.1.1.1 2014/10/29 23:13:21 cheusov Exp $
+
+BUILDLINK_TREE+= crfsuite
+
+.if !defined(CRFSUITE_BUILDLINK3_MK)
+CRFSUITE_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.crfsuite+= crfsuite>=0.12
+BUILDLINK_PKGSRCDIR.crfsuite?= ../../math/crfsuite
+.endif # CRFSUITE_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -crfsuite
diff --git a/math/crfsuite/distinfo b/math/crfsuite/distinfo
new file mode 100644
index 00000000000..3b95f6b35e5
--- /dev/null
+++ b/math/crfsuite/distinfo
@@ -0,0 +1,9 @@
+$NetBSD: distinfo,v 1.1.1.1 2014/10/29 23:13:21 cheusov Exp $
+
+SHA1 (crfsuite/0.12.tar.gz) = f121cee029613c64c32056f68710c69f28347238
+RMD160 (crfsuite/0.12.tar.gz) = 10e6abffbca2b05229b292e324533eab59742f22
+Size (crfsuite/0.12.tar.gz) = 256160 bytes
+SHA1 (patch-configure.in) = 7c7bc744d32509a354e699e6120db76083db3529
+SHA1 (patch-frontend_Makefile.am) = 9ab46935cf7ff0147d138bd5425769dbc3aa9246
+SHA1 (patch-lib_cqdb_Makefile.am) = eb7d78cea673193e2b9910c77f9f7602f7ec61ae
+SHA1 (patch-lib_crf_Makefile.am) = 1ed872381c404a7ab15f67360a76954d2d58a18d
diff --git a/math/crfsuite/patches/patch-configure.in b/math/crfsuite/patches/patch-configure.in
new file mode 100644
index 00000000000..b8dec313ca7
--- /dev/null
+++ b/math/crfsuite/patches/patch-configure.in
@@ -0,0 +1,27 @@
+$NetBSD: patch-configure.in,v 1.1.1.1 2014/10/29 23:13:21 cheusov Exp $
+
+# Adapted for recent autoconf and automake
+--- configure.in.orig 2011-08-11 03:02:41.000000000 +0000
++++ configure.in
+@@ -11,7 +11,7 @@ dnl ------------------------------------
+ dnl Initialization for autoconf
+ dnl ------------------------------------------------------------------
+ AC_PREREQ(2.59)
+-AC_INIT
++AC_INIT(crfsuite, 0.12)
+ AC_CONFIG_SRCDIR([frontend/main.c])
+ AC_CONFIG_MACRO_DIR([m4])
+
+@@ -27,10 +27,10 @@ AC_ISC_POSIX
+ dnl ------------------------------------------------------------------
+ dnl Initialization for automake
+ dnl ------------------------------------------------------------------
+-AM_INIT_AUTOMAKE(crfsuite, 0.12)
++AM_INIT_AUTOMAKE
+ AC_CONFIG_HEADERS(config.h)
+ AM_MAINTAINER_MODE
+-AM_C_PROTOTYPES
++# AM_C_PROTOTYPES
+
+
+ dnl ------------------------------------------------------------------
diff --git a/math/crfsuite/patches/patch-frontend_Makefile.am b/math/crfsuite/patches/patch-frontend_Makefile.am
new file mode 100644
index 00000000000..13551be8cf2
--- /dev/null
+++ b/math/crfsuite/patches/patch-frontend_Makefile.am
@@ -0,0 +1,14 @@
+$NetBSD: patch-frontend_Makefile.am,v 1.1.1.1 2014/10/29 23:13:21 cheusov Exp $
+
+# Adapted for recent autoconf and automake
+--- frontend/Makefile.am.orig 2011-08-11 03:02:41.000000000 +0000
++++ frontend/Makefile.am
+@@ -22,7 +22,7 @@ crfsuite_SOURCES = \
+ #crfsuite_CPPFLAGS =
+
+ AM_CFLAGS = @CFLAGS@
+-INCLUDES = @INCLUDES@
++AM_CPPFLAGS = @INCLUDES@
+ AM_LDFLAGS = @LDFLAGS@
+
+ crfsuite_CFLAGS = -I$(top_builddir)/include
diff --git a/math/crfsuite/patches/patch-lib_cqdb_Makefile.am b/math/crfsuite/patches/patch-lib_cqdb_Makefile.am
new file mode 100644
index 00000000000..a381e1be3b1
--- /dev/null
+++ b/math/crfsuite/patches/patch-lib_cqdb_Makefile.am
@@ -0,0 +1,11 @@
+$NetBSD: patch-lib_cqdb_Makefile.am,v 1.1.1.1 2014/10/29 23:13:21 cheusov Exp $
+
+# Adapted for recent autoconf and automake
+--- lib/cqdb/Makefile.am.orig 2011-08-11 03:02:41.000000000 +0000
++++ lib/cqdb/Makefile.am
+@@ -18,4 +18,4 @@ libcqdb_la_LDFLAGS = \
+ libcqdb_la_CFLAGS = -I./include
+
+ AM_CFLAGS = @CFLAGS@
+-INCLUDES = @INCLUDES@
++AM_CPPFLAGS = @INCLUDES@
diff --git a/math/crfsuite/patches/patch-lib_crf_Makefile.am b/math/crfsuite/patches/patch-lib_crf_Makefile.am
new file mode 100644
index 00000000000..e173cf48cf5
--- /dev/null
+++ b/math/crfsuite/patches/patch-lib_crf_Makefile.am
@@ -0,0 +1,11 @@
+$NetBSD: patch-lib_crf_Makefile.am,v 1.1.1.1 2014/10/29 23:13:21 cheusov Exp $
+
+# Adapted for recent autoconf and automake
+--- lib/crf/Makefile.am.orig 2011-08-11 03:02:41.000000000 +0000
++++ lib/crf/Makefile.am
+@@ -43,4 +43,4 @@ libcrfsuite_la_LIBADD = \
+ $(top_builddir)/lib/cqdb/libcqdb.la
+
+ AM_CFLAGS = @CFLAGS@
+-INCLUDES = @INCLUDES@
++AM_CPPFLAGS = @INCLUDES@