Commit 486adb94 authored by Fabian Wolff's avatar Fabian Wolff

Update upstream source from tag 'upstream/5.4.4'

Update to upstream version '5.4.4'
with Debian dir de4f8bbd2b126271224092b1cf0cafd7b64071c1
parents f2a4b933 725843de
Version 5.4.4 (11 March 2018)
* Dictionary loading now thread safe.
* Fix post-nominal modifiers used with pronouns.
* Fix comparative openers.
* Fix given-name single-letter abbreviations.
* Fix conjoined questions and conjoined WH-statements.
* Fix conditional sentences.
* Fix misc comparatives.
* Fix crash on invalid UTF-8 input.
* Fix many predicative adjective uses.
* Fix many paraphrasing-type constructions.
* Minor cleanup of word-lists.
* New dict definition LENGTH-LIMIT-n to limit connector link length to n.
* Speed up parsing of Russian by factor of 2x.
* Add assorted technical vocabulary (#680)
* Fix conjoined infinitives.
Version 5.4.3 (4 January 2018)
* Fix man page installation (actually broken from 5.3.0).
* Add "thither" to the English dictionary.
* Fix printing inf loop for very narrow screen widths.
* Some Windows code clean up.
* Remove trailing blanks from the linkage diagram.
* Fix square area and cubic volume measurements (English dict).
* Fix assorted exclamations and responses (English dict).
* Fix displaying random linkages on Windows.
* Fix unit tokenization to remove ambiguity.
* Fix utf8-related bug on Windows that could affect printing.
* Add missing affix file, needed for the 'any' language.
Version 5.4.2 (19 October 2017)
* Fix man page build (broken in 5.4.1)
Version 5.4.1 (18 October 2017)
* Fix man page installation (broken in 5.3.8).
* Add affix-class MPUNC for splitting at intra-word punctuation.
* Fix crash when there is no PP info.
* Fix a stack buffer overflow.
* Eliminate hard-wired linkage diagram size limitations.
* Fix an unintended clipping of the linkage-limit option to 250000.
Version 5.4.0 (26 July 2017)
* Fix for missing locale info in Windows XP.
* Empty out the post-processing tables for the any, ady, amy languages
* Remove left_print_string() from the API.
* Recover pp_lexer.l from ancient version 2.2!
* Fix unusual crash in post-processing for the "any" language.
* Remove three deprecated post-processing functions from API.
* Major reorganization of code base into more modular directories.
* Revive the sqlite3 dictionary into operational form.
* Add double-quotes to splittable punctuation for the "any" language.
* Add API functions to get linkage word positions in the sentence.
* Fix printing of diagrams containing Chinese or other wide glyphs.
* Fix `make distclean` when ant not installed.
Version 5.3.16 (15 April 2017)
* Fix python3 unit tests.
* Restore tty state after ctrl-C, ctrl-Z of the app.
* Check for <stdatomic.h> before use (in Java bindings).
* Fix handling of punctuation in the "any" langauge.
* Fix handling of punctuation in the "any" language.
Version 5.3.15 (12 Feb 2017)
* Fix Windows compilation; the new wcwidth files were omitted.
......
......@@ -3,7 +3,6 @@
#
SUBDIRS = \
link-grammar \
viterbi \
bindings \
link-parser \
tests \
......
......@@ -191,7 +191,7 @@ DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/link-grammar.pc.in \
$(srcdir)/link-grammar.spec.in AUTHORS ChangeLog NEWS TODO \
compile config.guess config.sub install-sh ltmain.sh missing \
py-compile
py-compile ylwrap
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
......@@ -240,6 +240,7 @@ AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
ANTfound = @ANTfound@
AR = @AR@
AS = @AS@
ASPELL_CFLAGS = @ASPELL_CFLAGS@
ASPELL_LIBS = @ASPELL_LIBS@
AUTOCONF = @AUTOCONF@
......@@ -276,13 +277,15 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
JAVA_CPPFLAGS = @JAVA_CPPFLAGS@
JAVA_SRCDIR = @JAVA_SRCDIR@
LD = @LD@
LDFLAGS = @LDFLAGS@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
LG_PYDIR = @LG_PYDIR@
LIBEDIT_CFLAGS = @LIBEDIT_CFLAGS@
LIBEDIT_LIBS = @LIBEDIT_LIBS@
LIBGC_CFLAGS = @LIBGC_CFLAGS@
LIBGC_LIBS = @LIBGC_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
......@@ -355,6 +358,7 @@ VERSION_INFO = @VERSION_INFO@
WARN_CFLAGS = @WARN_CFLAGS@
WARN_CXXFLAGS = @WARN_CXXFLAGS@
ZLIB_CPPFLAGS = @ZLIB_CPPFLAGS@
_ACJNI_JAVAC = @_ACJNI_JAVAC@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
......@@ -421,7 +425,6 @@ top_srcdir = @top_srcdir@
#
SUBDIRS = \
link-grammar \
viterbi \
bindings \
link-parser \
tests \
......
This diff is collapsed.
This diff is collapsed.
......@@ -163,6 +163,139 @@ then
fi
])
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_jni_include_dir.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_JNI_INCLUDE_DIR
#
# DESCRIPTION
#
# AX_JNI_INCLUDE_DIR finds include directories needed for compiling
# programs using the JNI interface.
#
# JNI include directories are usually in the Java distribution. This is
# deduced from the value of $JAVA_HOME, $JAVAC, or the path to "javac", in
# that order. When this macro completes, a list of directories is left in
# the variable JNI_INCLUDE_DIRS.
#
# Example usage follows:
#
# AX_JNI_INCLUDE_DIR
#
# for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS
# do
# CPPFLAGS="$CPPFLAGS -I$JNI_INCLUDE_DIR"
# done
#
# If you want to force a specific compiler:
#
# - at the configure.in level, set JAVAC=yourcompiler before calling
# AX_JNI_INCLUDE_DIR
#
# - at the configure level, setenv JAVAC
#
# Note: This macro can work with the autoconf M4 macros for Java programs.
# This particular macro is not part of the original set of macros.
#
# LICENSE
#
# Copyright (c) 2008 Don Anderson <dda@sleepycat.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 11
AU_ALIAS([AC_JNI_INCLUDE_DIR], [AX_JNI_INCLUDE_DIR])
AC_DEFUN([AX_JNI_INCLUDE_DIR],[
JNI_INCLUDE_DIRS=""
if test "x$JAVA_HOME" != x; then
_JTOPDIR="$JAVA_HOME"
else
if test "x$JAVAC" = x; then
JAVAC=javac
fi
AC_PATH_PROG([_ACJNI_JAVAC], [$JAVAC], [no])
if test "x$_ACJNI_JAVAC" = xno; then
AC_MSG_ERROR([cannot find JDK; try setting \$JAVAC or \$JAVA_HOME])
fi
_ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
_JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
fi
case "$host_os" in
darwin*) # Apple JDK is at /System location and has headers symlinked elsewhere
case "$_JTOPDIR" in
/System/Library/Frameworks/JavaVM.framework/*)
_JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
_JINC="$_JTOPDIR/Headers";;
*) _JINC="$_JTOPDIR/include";;
esac;;
*) _JINC="$_JTOPDIR/include";;
esac
_AS_ECHO_LOG([_JTOPDIR=$_JTOPDIR])
_AS_ECHO_LOG([_JINC=$_JINC])
# On Mac OS X 10.6.4, jni.h is a symlink:
# /System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers/jni.h
# -> ../../CurrentJDK/Headers/jni.h.
AC_CHECK_FILE([$_JINC/jni.h],
[JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JINC"],
[_JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
AC_CHECK_FILE([$_JTOPDIR/include/jni.h],
[JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include"],
AC_MSG_ERROR([cannot find JDK header files]))
])
# get the likely subdirectories for system specific java includes
case "$host_os" in
bsdi*) _JNI_INC_SUBDIRS="bsdos";;
freebsd*) _JNI_INC_SUBDIRS="freebsd";;
darwin*) _JNI_INC_SUBDIRS="darwin";;
linux*) _JNI_INC_SUBDIRS="linux genunix";;
osf*) _JNI_INC_SUBDIRS="alpha";;
solaris*) _JNI_INC_SUBDIRS="solaris";;
mingw*) _JNI_INC_SUBDIRS="win32";;
cygwin*) _JNI_INC_SUBDIRS="win32";;
*) _JNI_INC_SUBDIRS="genunix";;
esac
# add any subdirectories that are present
for JINCSUBDIR in $_JNI_INC_SUBDIRS
do
if test -d "$_JTOPDIR/include/$JINCSUBDIR"; then
JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include/$JINCSUBDIR"
fi
done
])
# _ACJNI_FOLLOW_SYMLINKS <path>
# Follows symbolic links on <path>,
# finally setting variable _ACJNI_FOLLOWED
# ----------------------------------------
AC_DEFUN([_ACJNI_FOLLOW_SYMLINKS],[
# find the include directory relative to the javac executable
_cur="$1"
while ls -ld "$_cur" 2>/dev/null | grep " -> " >/dev/null; do
AC_MSG_CHECKING([symlink for $_cur])
_slink=`ls -ld "$_cur" | sed 's/.* -> //'`
case "$_slink" in
/*) _cur="$_slink";;
# 'X' avoids triggering unwanted echo options.
*) _cur=`echo "X$_cur" | sed -e 's/^X//' -e 's:[[^/]]*$::'`"$_slink";;
esac
AC_MSG_RESULT([$_cur])
done
_ACJNI_FOLLOWED="$_cur"
])# _ACJNI
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_path_lib_pcre.html
# ===========================================================================
......@@ -1748,6 +1881,24 @@ fi
rmdir .tst 2>/dev/null
AC_SUBST([am__leading_dot])])
# Copyright (C) 1998-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_PROG_LEX
# -----------
# Autoconf leaves LEX=: if lex or flex can't be found. Change that to a
# "missing" invocation, for better error output.
AC_DEFUN([AM_PROG_LEX],
[AC_PREREQ([2.50])dnl
AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
AC_REQUIRE([AC_PROG_LEX])dnl
if test "$LEX" = :; then
LEX=${am_missing_run}flex
fi])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
......
......@@ -23,17 +23,22 @@ if test ! -d `aclocal --print-ac-dir 2>> autogen.err`; then
exit 1
fi
libtoolize --force --copy || {
echo "error: libtoolize failed"
exit 1
}
# Produce aclocal.m4, so autoconf gets the automake macros it needs
#
case `uname` in
CYGWIN*)
include_dir='-I m4' # Needed for Cygwin only.
;;
Darwin)
[ "$LIBTOOLIZE" = "" ] && LIBTOOLIZE=glibtoolize
;;
esac
${LIBTOOLIZE:=libtoolize} --force --copy || {
echo "error: libtoolize failed"
exit 1
}
echo "Creating aclocal.m4: aclocal $include_dir $ACLOCAL_FLAGS"
aclocal $include_dir $ACLOCAL_FLAGS 2>> autogen.err
......
......@@ -200,6 +200,7 @@ AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
ANTfound = @ANTfound@
AR = @AR@
AS = @AS@
ASPELL_CFLAGS = @ASPELL_CFLAGS@
ASPELL_LIBS = @ASPELL_LIBS@
AUTOCONF = @AUTOCONF@
......@@ -236,13 +237,15 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
JAVA_CPPFLAGS = @JAVA_CPPFLAGS@
JAVA_SRCDIR = @JAVA_SRCDIR@
LD = @LD@
LDFLAGS = @LDFLAGS@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
LG_PYDIR = @LG_PYDIR@
LIBEDIT_CFLAGS = @LIBEDIT_CFLAGS@
LIBEDIT_LIBS = @LIBEDIT_LIBS@
LIBGC_CFLAGS = @LIBGC_CFLAGS@
LIBGC_LIBS = @LIBGC_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
......@@ -315,6 +318,7 @@ VERSION_INFO = @VERSION_INFO@
WARN_CFLAGS = @WARN_CFLAGS@
WARN_CXXFLAGS = @WARN_CXXFLAGS@
ZLIB_CPPFLAGS = @ZLIB_CPPFLAGS@
_ACJNI_JAVAC = @_ACJNI_JAVAC@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
......
......@@ -7,14 +7,14 @@ DEFS = @DEFS@ -DVERSION=\"@VERSION@\"
# $(top_builddir) to pick up autogened link-grammar/link-features.h
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) $(JAVA_CPPFLAGS) \
$(WARN_CFLAGS)
-D_JNI_IMPLEMENTATION_ $(WARN_CFLAGS)
lib_LTLIBRARIES = liblink-grammar-java.la
liblink_grammar_java_la_LDFLAGS = -version-info @VERSION_INFO@ -export-dynamic -no-undefined -export-symbols $(srcdir)/link-grammar-java.def
if OS_WIN32
liblink_grammar_java_la_LDFLAGS += -D_JNI_IMPLEMENTATION_ -Wl,--kill-at
liblink_grammar_java_la_LDFLAGS += -Wl,--kill-at
endif
liblink_grammar_java_la_LIBADD = $(top_builddir)/link-grammar/liblink-grammar.la ${REGEX_LIBS}
......
......@@ -92,7 +92,7 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@OS_WIN32_TRUE@am__append_1 = -D_JNI_IMPLEMENTATION_ -Wl,--kill-at
@OS_WIN32_TRUE@am__append_1 = -Wl,--kill-at
@HAVE_HUNSPELL_TRUE@am__append_2 = ${HUNSPELL_LIBS}
@HAVE_ASPELL_TRUE@am__append_3 = ${ASPELL_LIBS}
@LIBMINISAT_BUNDLED_TRUE@@WITH_SAT_SOLVER_TRUE@am__append_4 = $(top_builddir)/link-grammar/minisat/libminisat.la
......@@ -229,6 +229,7 @@ AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
ANTfound = @ANTfound@
AR = @AR@
AS = @AS@
ASPELL_CFLAGS = @ASPELL_CFLAGS@
ASPELL_LIBS = @ASPELL_LIBS@
AUTOCONF = @AUTOCONF@
......@@ -265,13 +266,15 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
JAVA_CPPFLAGS = @JAVA_CPPFLAGS@
JAVA_SRCDIR = @JAVA_SRCDIR@
LD = @LD@
LDFLAGS = @LDFLAGS@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
LG_PYDIR = @LG_PYDIR@
LIBEDIT_CFLAGS = @LIBEDIT_CFLAGS@
LIBEDIT_LIBS = @LIBEDIT_LIBS@
LIBGC_CFLAGS = @LIBGC_CFLAGS@
LIBGC_LIBS = @LIBGC_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
......@@ -344,6 +347,7 @@ VERSION_INFO = @VERSION_INFO@
WARN_CFLAGS = @WARN_CFLAGS@
WARN_CXXFLAGS = @WARN_CXXFLAGS@
ZLIB_CPPFLAGS = @ZLIB_CPPFLAGS@
_ACJNI_JAVAC = @_ACJNI_JAVAC@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
......@@ -407,7 +411,7 @@ top_srcdir = @top_srcdir@
# $(top_builddir) to pick up autogened link-grammar/link-features.h
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) $(JAVA_CPPFLAGS) \
$(WARN_CFLAGS)
-D_JNI_IMPLEMENTATION_ $(WARN_CFLAGS)
lib_LTLIBRARIES = liblink-grammar-java.la
liblink_grammar_java_la_LDFLAGS = -version-info @VERSION_INFO@ \
......
......@@ -28,7 +28,7 @@
/* Default to the English language. */
static const char* in_language = "en";
/* Dicationary can be and should be shared by all. */
/* Dictionary can be and should be shared by all. */
static Dictionary dict = NULL;
#ifdef HAVE_STDATOMIC_H
static atomic_flag dict_is_init = ATOMIC_FLAG_INIT;
......@@ -49,7 +49,7 @@ static void setup_panic_parse_options(Parse_Options opts)
parse_options_set_repeatable_rand(opts, false);
parse_options_set_disjunct_cost(opts, 3.7f);
parse_options_set_min_null_count(opts, 1);
parse_options_set_max_null_count(opts, MAX_SENTENCE);
parse_options_set_max_null_count(opts, 250);
parse_options_set_max_parse_time(opts, 60);
parse_options_set_islands_ok(opts, true);
parse_options_set_short_length(opts, 6);
......@@ -60,9 +60,9 @@ static void setup_panic_parse_options(Parse_Options opts)
parse_options_set_display_morphology(opts, true);
}
static inline void test(void)
static inline void do_test(void)
{
#ifdef DEBUG
#if 0
printf("%d\n", word_contains("said", PAST_TENSE_FORM_MARKER, dict));
printf("%d\n", word_contains("gave.v", PAST_TENSE_FORM_MARKER, dict));
printf("%d\n", word_contains("have", PAST_TENSE_FORM_MARKER, dict));
......@@ -83,6 +83,9 @@ static void throwException(JNIEnv *env, const char* message)
exceptionClazz = (*env)->FindClass(env, "java/lang/RuntimeException");
if ((*env)->ThrowNew(env, exceptionClazz, msg) != 0)
(*env)->FatalError(env, "Fatal: link-grammar JNI: Cannot throw");
// I'm confused. Apparently Java exceptions return ??
free(msg);
}
// Note that we do NOT offer any kind of protection from having
......@@ -124,7 +127,7 @@ static void global_init(JNIEnv *env)
dict = dictionary_create_lang(in_language);
if (!dict) throwException(env, "Error: unable to open dictionary");
else test();
else do_test();
dict_version = linkgrammar_get_dict_version(dict);
prt_error("Info: JNI: dictionary language '%s' version %s\n",
......
......@@ -17,6 +17,7 @@ JAVA_SRCS = \
linkgrammar-@VERSION@.jar: $(JAVA_SRCS)
ant
if HAVE_ANT
# distclean-generic will delete build.xml, so clean-local must run
# first.... but then, build.xml doesn't get removed :-(
distclean-generic: clean-local
......@@ -27,6 +28,7 @@ distclean-local: clean-local
clean-local:
ant clean
-rm -f *.jar
endif
javadir=$(datadir)/java
java_DATA = linkgrammar-@VERSION@.jar
......@@ -38,10 +40,10 @@ LN_SF = ln -sf
endif
install-data-hook:
${LN_SF} ${javadir}/${java_DATA} ${DESTDIR}/${javadir}/linkgrammar.jar
${LN_SF} ${javadir}/${java_DATA} ${DESTDIR}${javadir}/linkgrammar.jar
uninstall-hook:
-rm ${DESTDIR}/${javadir}/linkgrammar.jar
-rm ${DESTDIR}${javadir}/linkgrammar.jar
EXTRA_DIST = \
......
......@@ -161,6 +161,7 @@ AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
ANTfound = @ANTfound@
AR = @AR@
AS = @AS@
ASPELL_CFLAGS = @ASPELL_CFLAGS@
ASPELL_LIBS = @ASPELL_LIBS@
AUTOCONF = @AUTOCONF@
......@@ -197,13 +198,15 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
JAVA_CPPFLAGS = @JAVA_CPPFLAGS@
JAVA_SRCDIR = @JAVA_SRCDIR@
LD = @LD@
LDFLAGS = @LDFLAGS@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
LG_PYDIR = @LG_PYDIR@
LIBEDIT_CFLAGS = @LIBEDIT_CFLAGS@
LIBEDIT_LIBS = @LIBEDIT_LIBS@
LIBGC_CFLAGS = @LIBGC_CFLAGS@
LIBGC_LIBS = @LIBGC_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
......@@ -276,6 +279,7 @@ VERSION_INFO = @VERSION_INFO@
WARN_CFLAGS = @WARN_CFLAGS@
WARN_CXXFLAGS = @WARN_CXXFLAGS@
ZLIB_CPPFLAGS = @ZLIB_CPPFLAGS@
_ACJNI_JAVAC = @_ACJNI_JAVAC@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
......@@ -484,9 +488,15 @@ mostlyclean-generic:
clean-generic:
@HAVE_ANT_FALSE@distclean-generic:
@HAVE_ANT_FALSE@ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@HAVE_ANT_FALSE@ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
@HAVE_ANT_FALSE@clean-local:
@HAVE_ANT_FALSE@distclean-local:
clean: clean-am
clean-am: clean-generic clean-libtool clean-local mostlyclean-am
......@@ -580,20 +590,20 @@ linkgrammar-@VERSION@.jar: $(JAVA_SRCS)
# distclean-generic will delete build.xml, so clean-local must run
# first.... but then, build.xml doesn't get removed :-(
distclean-generic: clean-local
distclean-local: clean-local
-rm -f build.xml
@HAVE_ANT_TRUE@distclean-generic: clean-local
@HAVE_ANT_TRUE@distclean-local: clean-local
@HAVE_ANT_TRUE@ -rm -f build.xml
# Let ant delete the files that ant creates.
clean-local:
ant clean
-rm -f *.jar
@HAVE_ANT_TRUE@clean-local:
@HAVE_ANT_TRUE@ ant clean
@HAVE_ANT_TRUE@ -rm -f *.jar
install-data-hook:
${LN_SF} ${javadir}/${java_DATA} ${DESTDIR}/${javadir}/linkgrammar.jar
${LN_SF} ${javadir}/${java_DATA} ${DESTDIR}${javadir}/linkgrammar.jar
uninstall-hook:
-rm ${DESTDIR}/${javadir}/linkgrammar.jar
-rm ${DESTDIR}${javadir}/linkgrammar.jar
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
......
......@@ -4,9 +4,15 @@
These files implement Java language bindings for Link Grammar. They do
not extend the parsing algorithms already present in Link-Grammar in
any way. They do, however, allow certain types of remote/server
operation, and, in particular, are needed for use by the RelEx
dependency parser.
any way. The allow users to call the standard link-grammar API from
Java.
These bindings do provide an additional feature, though: they can be used
in a client-server mode, so that, instead of calling the link-grammar
library directly, the parse request can be sent to a link-grammar
server, which then returns the result in JSON format, which the bindings
here are able to parse, and present the same API, as if the library
was called locally.
The shell script link-grammar-server.sh demonstrates how to run the
parser server. Once the server is started, parses can be obtained
......
......@@ -7,7 +7,7 @@
<target name="init">
<mkdir dir="bin"/>
<copy includeemptydirs="false" todir="bin">
<fileset dir="@srcdir@" excludes="**/*.java"/>
<fileset dir="@JAVA_SRCDIR@" excludes="**/*.java"/>
</copy>
</target>
<target name="clean">
......@@ -19,7 +19,7 @@
<target depends="init" name="build-project">
<echo message="${ant.project.name}: ${ant.file}"/>
<javac includeantruntime="false" debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}">
<src path="@srcdir@"/>
<src path="@JAVA_SRCDIR@"/>
</javac>
<jar basedir="bin" destfile="linkgrammar-@VERSION@.jar" excludes="Makefile*">
<manifest>
......
......@@ -3,9 +3,9 @@
# Shell script to start the link-grammar network server.
#
# Usage: java org.linkgrammar.LGService [-verbose] [-threads n] port [language] [dictPath]
# Start a link-grammar parse server on tcp/ip port. The server returns
# JSON-formated parse results. Socket input should be a single sentence
# to parse, preceeded by the identifier "text:".
# Start a link-grammar parse server on TCP/IP port. The server returns
# JSON-formatted parse results. Socket input should be a single sentence