git: 125faea51f6c - main - textproc/cg3: New Port

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Sun, 03 Apr 2022 20:23:53 UTC
The branch main has been updated by bofh:

URL: https://cgit.FreeBSD.org/ports/commit/?id=125faea51f6c625e67562fe1436c35d871468e8c

commit 125faea51f6c625e67562fe1436c35d871468e8c
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2022-04-03 20:23:04 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2022-04-03 20:23:04 +0000

    textproc/cg3: New Port
    
    Constraint Grammar (CG) parsers are at the core of most of VISL's live
    applications. The Constraint Grammar concept was launched by Fred
    Karlsson in the early 90'ies (Karlsson et.al.1995), and CG parsers have
    since been written for a large variety of languages, routinely achieving
    F-scores for PoS (word class) of over 99%. A number of syntactic CG
    systems have reported F-scores of around 95%. VISL's own Constraint
    Grammar systems are inspired by Eckhard Bick's PALAVRAS parser for
    Portuguese (Bick 2000), and use, as a novelty, subclause function,
    generalized dependency markers and semantic prototype tags. For most
    languages, a lexicon based morphological analyzer provides input to the
    first CG level, while the output of the last CG-level can be converted
    into syntactic tree structures by specially designed Phrase Structure
    Grammars (PSG's), using syntactic functions, not words, as terminals.
    Other, hybrid combinations are, however, feasible. Thus, the French
    system uses PoS information from a probabilistic tagger.
    
    WWW: https://visl.sdu.dk/constraint_grammar.html
---
 textproc/Makefile      |  1 +
 textproc/cg3/Makefile  | 24 ++++++++++++++++++++++++
 textproc/cg3/distinfo  |  3 +++
 textproc/cg3/pkg-descr | 17 +++++++++++++++++
 textproc/cg3/pkg-plist | 20 ++++++++++++++++++++
 5 files changed, 65 insertions(+)

diff --git a/textproc/Makefile b/textproc/Makefile
index 34809e625d01..29d501eaec0b 100644
--- a/textproc/Makefile
+++ b/textproc/Makefile
@@ -87,6 +87,7 @@
     SUBDIR += castxml
     SUBDIR += catdoc
     SUBDIR += cdif
+    SUBDIR += cg3
     SUBDIR += cgrep
     SUBDIR += chkascii
     SUBDIR += chpp
diff --git a/textproc/cg3/Makefile b/textproc/cg3/Makefile
new file mode 100644
index 000000000000..a01741a5cf9d
--- /dev/null
+++ b/textproc/cg3/Makefile
@@ -0,0 +1,24 @@
+PORTNAME=	cg3
+PORTVERSION=	1.3.6
+DISTVERSIONPREFIX=	v
+CATEGORIES=	textproc
+
+MAINTAINER=	bofh@FreeBSD.org
+COMMENT=	Tools for the Constraint Grammar formalism
+
+LICENSE=	GPLv3
+LICENSE_FILE=	${WRKSRC}/COPYING
+
+LIB_DEPENDS=	libboost_date_time.so:devel/boost-libs \
+		libicuuc.so:devel/icu
+
+USES=		cmake
+USE_GITHUB=	yes
+GH_ACCOUNT=	GrammarSoft
+USE_LDCONFIG=	yes
+
+post-patch:
+	@${REINPLACE_CMD} -e '/D_POSIX_C_SOURCE/d' \
+		${WRKSRC}/CMakeLists.txt
+
+.include <bsd.port.mk>
diff --git a/textproc/cg3/distinfo b/textproc/cg3/distinfo
new file mode 100644
index 000000000000..5b68d4320693
--- /dev/null
+++ b/textproc/cg3/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1648840020
+SHA256 (GrammarSoft-cg3-v1.3.6_GH0.tar.gz) = 6ad782fea6204d5899186fc6ad41ef36de94304b4221c388d64abb927f48bc5b
+SIZE (GrammarSoft-cg3-v1.3.6_GH0.tar.gz) = 365386
diff --git a/textproc/cg3/pkg-descr b/textproc/cg3/pkg-descr
new file mode 100644
index 000000000000..bb016db8040e
--- /dev/null
+++ b/textproc/cg3/pkg-descr
@@ -0,0 +1,17 @@
+Constraint Grammar (CG) parsers are at the core of most of VISL's live
+applications. The Constraint Grammar concept was launched by Fred
+Karlsson in the early 90'ies (Karlsson et.al.1995), and CG parsers have
+since been written for a large variety of languages, routinely achieving
+F-scores for PoS (word class) of over 99%. A number of syntactic CG
+systems have reported F-scores of around 95%. VISL's own Constraint
+Grammar systems are inspired by Eckhard Bick's PALAVRAS parser for
+Portuguese (Bick 2000), and use, as a novelty, subclause function,
+generalized dependency markers and semantic prototype tags. For most
+languages, a lexicon based morphological analyzer provides input to the
+first CG level, while the output of the last CG-level can be converted
+into syntactic tree structures by specially designed Phrase Structure
+Grammars (PSG's), using syntactic functions, not words, as terminals.
+Other, hybrid combinations are, however, feasible. Thus, the French
+system uses PoS information from a probabilistic tagger.
+
+WWW: https://visl.sdu.dk/constraint_grammar.html
diff --git a/textproc/cg3/pkg-plist b/textproc/cg3/pkg-plist
new file mode 100644
index 000000000000..84deeacee2b7
--- /dev/null
+++ b/textproc/cg3/pkg-plist
@@ -0,0 +1,20 @@
+bin/cg-comp
+bin/cg-conv
+bin/cg-mwesplit
+bin/cg-proc
+bin/cg-relabel
+bin/cg-sort
+bin/cg-strictify
+bin/cg-untrace
+bin/cg3-autobin.pl
+bin/vislcg3
+include/cg3.h
+lib/libcg3.so
+lib/libcg3.so.1
+libdata/pkgconfig/cg3.pc
+man/man1/cg-comp.1.gz
+man/man1/cg-conv.1.gz
+man/man1/cg-proc.1.gz
+man/man1/cg3-autobin.pl.1.gz
+man/man1/vislcg3.1.gz
+share/emacs/site-lisp/cg.el