[frog] 01/03: New upstream version 0.13.9

Maarten van Gompel proycon-guest at moszumanska.debian.org
Mon Dec 4 21:51:25 UTC 2017


This is an automated email from the git hooks/post-receive script.

proycon-guest pushed a commit to branch master
in repository frog.

commit 1652f3d77f0931948fe71569e610a6b8a36085a7
Author: proycon <proycon at anaproy.nl>
Date:   Mon Dec 4 22:44:59 2017 +0100

    New upstream version 0.13.9
---
 ChangeLog                            | 58 ++++++++++++++++++++++++++++++++++++
 NEWS                                 |  5 ++++
 configure                            | 20 ++++++-------
 configure.ac                         |  2 +-
 include/frog/{Frog.h => Frog-util.h} | 10 ++-----
 include/frog/FrogAPI.h               | 13 ++++----
 include/frog/Makefile.am             |  2 +-
 include/frog/Makefile.in             |  2 +-
 include/frog/Parser.h                | 10 +++++++
 include/frog/ckyparser.h             |  3 ++
 include/frog/clex.h                  |  2 ++
 include/frog/mblem_mod.h             |  6 ++++
 include/frog/mbma_brackets.h         |  6 ++++
 include/frog/mbma_mod.h              | 16 ++++------
 include/frog/mbma_rule.h             |  7 +++++
 include/frog/mwu_chunker_mod.h       |  7 +++++
 include/frog/ner_tagger_mod.h        |  4 +++
 include/frog/tagger_base.h           |  5 ++++
 include/frog/ucto_tokenizer_mod.h    |  2 ++
 m4/ax_lib_readline.m4                |  4 +--
 m4/ax_pthread.m4                     |  6 ++--
 src/Frog-util.cxx                    |  5 +++-
 src/Frog.cxx                         |  2 +-
 src/FrogAPI.cxx                      | 11 +++++--
 src/Parser.cxx                       |  6 ++--
 src/cgn_tagger_mod.cxx               |  4 +--
 src/ckyparser.cxx                    |  4 ++-
 src/clex.cxx                         |  4 ++-
 src/csidp.cxx                        |  5 +++-
 src/iob_tagger_mod.cxx               |  6 ++--
 src/mblem_mod.cxx                    |  5 ++--
 src/mblem_prog.cxx                   |  3 +-
 src/mbma_brackets.cxx                |  4 +--
 src/mbma_mod.cxx                     | 11 ++++---
 src/mbma_prog.cxx                    |  3 +-
 src/mbma_rule.cxx                    |  5 ++--
 src/mwu_chunker_mod.cxx              |  5 ++--
 src/ner_prog.cxx                     |  3 +-
 src/ner_tagger_mod.cxx               | 12 ++++++--
 src/tagger_base.cxx                  |  8 ++---
 src/ucto_tokenizer_mod.cxx           |  6 ++--
 41 files changed, 220 insertions(+), 82 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d78ed92..15771e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,61 @@
+2017-11-07  Ko van der Sloot <K.vanderSloot at let.ru.nl>
+
+	* NEWS: NEWS about release
+
+2017-11-01  Ko van der Sloot <K.vanderSloot at let.ru.nl>
+
+	* src/FrogAPI.cxx: directly bail out when no tagger is available
+
+2017-11-01  Ko van der Sloot <K.vanderSloot at let.ru.nl>
+
+	* src/mbma_mod.cxx: problem in the error message fixed
+
+2017-11-01  Ko van der Sloot <K.vanderSloot at let.ru.nl>
+
+	* src/ner_tagger_mod.cxx: smarter config file reading (finding
+	location of subfiles)
+
+2017-10-30  Ko van der Sloot <K.vanderSloot at let.ru.nl>
+
+	* include/frog/Parser.h, include/frog/ckyparser.h,
+	include/frog/mblem_mod.h, include/frog/mbma_rule.h,
+	include/frog/mwu_chunker_mod.h, include/frog/ucto_tokenizer_mod.h,
+	src/Parser.cxx, src/ckyparser.cxx, src/clex.cxx, src/csidp.cxx,
+	src/mblem_mod.cxx, src/mblem_prog.cxx, src/mbma_mod.cxx,
+	src/mbma_prog.cxx, src/mbma_rule.cxx, src/mwu_chunker_mod.cxx,
+	src/ner_prog.cxx, src/ner_tagger_mod.cxx,
+	src/ucto_tokenizer_mod.cxx: and more shuffling
+
+2017-10-30  Ko van der Sloot <K.vanderSloot at let.ru.nl>
+
+	* include/frog/{Frog.h => Frog-util.h}, include/frog/FrogAPI.h,
+	include/frog/Makefile.am, include/frog/Parser.h,
+	include/frog/mblem_mod.h, include/frog/mbma_mod.h,
+	include/frog/mwu_chunker_mod.h, include/frog/ucto_tokenizer_mod.h,
+	src/Frog-util.cxx, src/Frog.cxx, src/FrogAPI.cxx, src/Parser.cxx,
+	src/cgn_tagger_mod.cxx, src/iob_tagger_mod.cxx, src/mblem_mod.cxx,
+	src/mbma_mod.cxx, src/mwu_chunker_mod.cxx, src/ner_tagger_mod.cxx,
+	src/tagger_base.cxx, src/ucto_tokenizer_mod.cxx: a lot of include
+	shuffling
+
+2017-10-30  Ko van der Sloot <K.vanderSloot at let.ru.nl>
+
+	* include/frog/ner_tagger_mod.h, include/frog/tagger_base.h,
+	src/cgn_tagger_mod.cxx, src/iob_tagger_mod.cxx,
+	src/ner_tagger_mod.cxx, src/tagger_base.cxx: more include file
+	refactoring
+
+2017-10-30  Ko van der Sloot <K.vanderSloot at let.ru.nl>
+
+	* include/frog/clex.h, include/frog/mbma_brackets.h,
+	include/frog/mbma_mod.h, include/frog/mbma_rule.h,
+	src/mbma_brackets.cxx, src/mbma_mod.cxx, src/mbma_rule.cxx: started
+	refactoring include mechanism. A lot to do...
+
+2017-10-26  Ko van der Sloot <K.vanderSloot at let.ru.nl>
+
+	* configure.ac: bumped version after release
+
 2017-10-26  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
 	* NEWS: typos
diff --git a/NEWS b/NEWS
index 2725b90..e288d27 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,8 @@
+0.13.9 - 2017-11-07
+[Ko vd Sloot]
+Bug fix relase, to get all our releases into balance. (Toad release
+requires 0.13.9)
+
 0.13.8 - 2017-10-26
 [Ko vd Sloot]
 * Now with new and enhanced NER and IOB chunker. (needs Frogdata >0.15)
diff --git a/configure b/configure
index efd4e00..d1d4c48 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for frog 0.13.8.
+# Generated by GNU Autoconf 2.69 for frog 0.13.9.
 #
 # Report bugs to <lamasoftware at science.ru.nl>.
 #
@@ -590,8 +590,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='frog'
 PACKAGE_TARNAME='frog'
-PACKAGE_VERSION='0.13.8'
-PACKAGE_STRING='frog 0.13.8'
+PACKAGE_VERSION='0.13.9'
+PACKAGE_STRING='frog 0.13.9'
 PACKAGE_BUGREPORT='lamasoftware at science.ru.nl'
 PACKAGE_URL=''
 
@@ -1379,7 +1379,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures frog 0.13.8 to adapt to many kinds of systems.
+\`configure' configures frog 0.13.9 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1450,7 +1450,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of frog 0.13.8:";;
+     short | recursive ) echo "Configuration of frog 0.13.9:";;
    esac
   cat <<\_ACEOF
 
@@ -1591,7 +1591,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-frog configure 0.13.8
+frog configure 0.13.9
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2244,7 +2244,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by frog $as_me 0.13.8, which was
+It was created by frog $as_me 0.13.9, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3107,7 +3107,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='frog'
- VERSION='0.13.8'
+ VERSION='0.13.9'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -18891,7 +18891,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by frog $as_me 0.13.8, which was
+This file was extended by frog $as_me 0.13.9, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -18957,7 +18957,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-frog config.status 0.13.8
+frog config.status 0.13.9
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index b8bd64a..e40477f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.59)
-AC_INIT([frog], [0.13.8], [lamasoftware at science.ru.nl])
+AC_INIT([frog], [0.13.9], [lamasoftware at science.ru.nl])
 AM_INIT_AUTOMAKE
 AC_CONFIG_SRCDIR([configure.ac])
 AC_CONFIG_MACRO_DIR([m4])
diff --git a/include/frog/Frog.h b/include/frog/Frog-util.h
similarity index 89%
rename from include/frog/Frog.h
rename to include/frog/Frog-util.h
index 21fec1e..8c04b93 100644
--- a/include/frog/Frog.h
+++ b/include/frog/Frog-util.h
@@ -33,15 +33,11 @@
 #define FROG_H
 
 #include <set>
-#include "ticcutils/LogStream.h"
-#include "ticcutils/Configuration.h"
-#include "ticcutils/Timer.h"
-#include "ticcutils/PrettyPrint.h"
-#include "ticcutils/StringOps.h"
-#include "libfolia/folia.h"
+#include <ostream>
+#include <string>
 
+#include "ticcutils/Timer.h"
 
-//declared here and defined in Frog-util.cxx (bit messy)
 std::string prefix( const std::string&, const std::string& );
 std::string getTime();
 void getFileNames( const std::string&, const std::string&, std::set<std::string>& );
diff --git a/include/frog/FrogAPI.h b/include/frog/FrogAPI.h
index 22253b9..4b9f435 100644
--- a/include/frog/FrogAPI.h
+++ b/include/frog/FrogAPI.h
@@ -29,17 +29,20 @@
 #ifndef FROGAPI_H
 #define FROGAPI_H
 
+#include <vector>
+#include <string>
+#include <iostream>
+
 #include "timbl/TimblAPI.h"
 
-#include "frog/Frog.h" //internals
 #include "ticcutils/Configuration.h"
 #include "ticcutils/LogStream.h"
 #include "ticcutils/FdStream.h"
 #include "ticcutils/ServerBase.h"
 
-#include <vector>
-#include <string>
-#include <iostream>
+#include "libfolia/folia.h"
+
+#include "frog/Frog-util.h"
 
 class UctoTokenizer;
 class Mbma;
@@ -109,7 +112,7 @@ class FrogAPI {
  private:
   void test_version( const std::string&, double );
   // functions
-  bool TestSentence( folia::Sentence*, TimerBlock&);
+  bool TestSentence( folia::Sentence*, TimerBlock& );
   void FrogStdin( bool prompt );
   std::vector<folia::Word*> lookup( folia::Word *,
 				    const std::vector<folia::Entity*>& ) const;
diff --git a/include/frog/Makefile.am b/include/frog/Makefile.am
index 18d2c13..45e4d03 100644
--- a/include/frog/Makefile.am
+++ b/include/frog/Makefile.am
@@ -1,4 +1,4 @@
-pkginclude_HEADERS = FrogAPI.h Frog.h mblem_mod.h \
+pkginclude_HEADERS = FrogAPI.h Frog-util.h mblem_mod.h \
 	mbma_rule.h mbma_mod.h mbma_brackets.h clex.h mwu_chunker_mod.h \
 	tagger_base.h cgn_tagger_mod.h iob_tagger_mod.h \
 	Parser.h ucto_tokenizer_mod.h ner_tagger_mod.h \
diff --git a/include/frog/Makefile.in b/include/frog/Makefile.in
index 2991af7..8e9ad30 100644
--- a/include/frog/Makefile.in
+++ b/include/frog/Makefile.in
@@ -317,7 +317,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 ucto_CFLAGS = @ucto_CFLAGS@
 ucto_LIBS = @ucto_LIBS@
-pkginclude_HEADERS = FrogAPI.h Frog.h mblem_mod.h \
+pkginclude_HEADERS = FrogAPI.h Frog-util.h mblem_mod.h \
 	mbma_rule.h mbma_mod.h mbma_brackets.h clex.h mwu_chunker_mod.h \
 	tagger_base.h cgn_tagger_mod.h iob_tagger_mod.h \
 	Parser.h ucto_tokenizer_mod.h ner_tagger_mod.h \
diff --git a/include/frog/Parser.h b/include/frog/Parser.h
index 1e40750..058c368 100644
--- a/include/frog/Parser.h
+++ b/include/frog/Parser.h
@@ -32,7 +32,17 @@
 #ifndef PARSER_H
 #define PARSER_H
 
+#include <string>
+#include <vector>
+#include <set>
+#include "ticcutils/LogStream.h"
+#include "ticcutils/Configuration.h"
+#include "libfolia/folia.h"
+#include "ucto/tokenize.h"
+#include "timbl/TimblAPI.h"
+
 struct parseData;
+class TimerBlock;
 
 class Parser {
  public:
diff --git a/include/frog/ckyparser.h b/include/frog/ckyparser.h
index 55e945c..6a7afbf 100644
--- a/include/frog/ckyparser.h
+++ b/include/frog/ckyparser.h
@@ -2,6 +2,9 @@
 #define CKYPARSER_H
 
 #include <set>
+#include <vector>
+#include <ostream>
+#include "ticcutils/LogStream.h"
 
 enum dirType { ROOT, LEFT, RIGHT, ERROR };
 
diff --git a/include/frog/clex.h b/include/frog/clex.h
index f7fd5b7..2c8a184 100644
--- a/include/frog/clex.h
+++ b/include/frog/clex.h
@@ -32,6 +32,8 @@
 #ifndef CLEX_H
 #define CLEX_H
 
+#include <map>
+
 namespace CLEX {
   enum Type { UNASS, N, A, Q, V, D, O, B, P, C, I, X, Z, PN, AFFIX, XAFFIX,
 	      GLUE, NEUTRAL };
diff --git a/include/frog/mblem_mod.h b/include/frog/mblem_mod.h
index af0cee9..577caea 100644
--- a/include/frog/mblem_mod.h
+++ b/include/frog/mblem_mod.h
@@ -32,6 +32,12 @@
 #ifndef MBLEM_MOD_H
 #define MBLEM_MOD_H
 
+#include "libfolia/folia.h"
+#include "ticcutils/LogStream.h"
+#include "ticcutils/Configuration.h"
+#include "ucto/tokenize.h"
+#include "timbl/TimblAPI.h"
+
 class mblemData {
  public:
  mblemData( const std::string& l, const std::string& t ):
diff --git a/include/frog/mbma_brackets.h b/include/frog/mbma_brackets.h
index b4535bb..a0297fc 100644
--- a/include/frog/mbma_brackets.h
+++ b/include/frog/mbma_brackets.h
@@ -32,6 +32,12 @@
 #ifndef MBMA_BRACKETS_H
 #define MBMA_BRACKETS_H
 
+#include <vector>
+#include <list>
+#include "unicode/unistr.h"
+#include "ticcutils/LogStream.h"
+#include "frog/clex.h"
+
 enum Status { INFO, PARTICLE, PARTICIPLE, STEM, COMPLEX, INFLECTION,
 	      DERIVATIONAL, FAILED };
 
diff --git a/include/frog/mbma_mod.h b/include/frog/mbma_mod.h
index c5f3e6b..a8520c5 100644
--- a/include/frog/mbma_mod.h
+++ b/include/frog/mbma_mod.h
@@ -32,8 +32,13 @@
 #ifndef MBMA_MOD_H
 #define MBMA_MOD_H
 
+#include <map>
+#include <vector>
+#include <list>
 #include <unicode/translit.h>
 #include "ticcutils/LogStream.h"
+#include "ticcutils/Configuration.h"
+#include "libfolia/folia.h"
 #include "frog/clex.h"
 #include "frog/mbma_rule.h"
 #include "frog/mbma_brackets.h"
@@ -47,17 +52,6 @@ namespace Tokenizer {
   class UnicodeFilter;
 }
 
-namespace TiCC {
-  class Configuration;
-}
-
-namespace folia {
-  class Word;
-  class Document;
-  class MorphologyLayer;
-  class Morpheme;
-}
-
 class Mbma {
  public:
  explicit Mbma( TiCC::LogStream * );
diff --git a/include/frog/mbma_rule.h b/include/frog/mbma_rule.h
index 7676a7c..eb505c0 100644
--- a/include/frog/mbma_rule.h
+++ b/include/frog/mbma_rule.h
@@ -32,6 +32,13 @@
 #ifndef MBMA_RULE_H
 #define MBMA_RULE_H
 
+#include <map>
+#include <vector>
+#include <string>
+#include "unicode/unistr.h"
+#include "ticcutils/LogStream.h"
+#include "frog/clex.h"
+
 namespace Compound {
   enum Type : int;
 }
diff --git a/include/frog/mwu_chunker_mod.h b/include/frog/mwu_chunker_mod.h
index c0e4d8f..3b53de8 100644
--- a/include/frog/mwu_chunker_mod.h
+++ b/include/frog/mwu_chunker_mod.h
@@ -32,6 +32,13 @@
 #ifndef MWU_CHUNKER_H
 #define MWU_CHUNKER_H
 
+#include <ostream>
+#include <string>
+#include "ticcutils/LogStream.h"
+#include "ticcutils/Configuration.h"
+#include "libfolia/folia.h"
+#include "ucto/unicode.h"
+
 class mwuAna {
   friend std::ostream& operator<< (std::ostream&, const mwuAna& );
  public:
diff --git a/include/frog/ner_tagger_mod.h b/include/frog/ner_tagger_mod.h
index b37e4fc..d3333f5 100644
--- a/include/frog/ner_tagger_mod.h
+++ b/include/frog/ner_tagger_mod.h
@@ -33,6 +33,10 @@
 #define NER_TAGGER_MOD_H
 
 #include <unordered_map>
+#include <vector>
+#include "ticcutils/LogStream.h"
+#include "ticcutils/Configuration.h"
+#include "libfolia/folia.h"
 #include "frog/tagger_base.h"
 
 class NERTagger: public BaseTagger {
diff --git a/include/frog/tagger_base.h b/include/frog/tagger_base.h
index d8cef29..194b75a 100644
--- a/include/frog/tagger_base.h
+++ b/include/frog/tagger_base.h
@@ -32,7 +32,12 @@
 #ifndef TAGGER_BASE_H
 #define TAGGER_BASE_H
 
+#include <vector>
+#include "ticcutils/LogStream.h"
+#include "ticcutils/Configuration.h"
 #include "mbt/MbtAPI.h"
+#include "libfolia/folia.h"
+#include "ucto/tokenize.h"
 
 class BaseTagger {
  public:
diff --git a/include/frog/ucto_tokenizer_mod.h b/include/frog/ucto_tokenizer_mod.h
index 9ed483d..2a25b86 100644
--- a/include/frog/ucto_tokenizer_mod.h
+++ b/include/frog/ucto_tokenizer_mod.h
@@ -28,7 +28,9 @@
 #ifndef UCTO_TOKENIZER_MOD_H
 #define UCTO_TOKENIZER_MOD_H
 
+#include "libfolia/folia.h"
 #include "ucto/tokenize.h"
+#include "ticcutils/Configuration.h"
 
 class UctoTokenizer {
  public:
diff --git a/m4/ax_lib_readline.m4 b/m4/ax_lib_readline.m4
index 056f25c..8b9eef5 100644
--- a/m4/ax_lib_readline.m4
+++ b/m4/ax_lib_readline.m4
@@ -1,5 +1,5 @@
 # ===========================================================================
-#      http://www.gnu.org/software/autoconf-archive/ax_lib_readline.html
+#     https://www.gnu.org/software/autoconf-archive/ax_lib_readline.html
 # ===========================================================================
 #
 # SYNOPSIS
@@ -58,7 +58,7 @@
 #   and this notice are preserved. This file is offered as-is, without any
 #   warranty.
 
-#serial 6
+#serial 7
 
 AU_ALIAS([VL_LIB_READLINE], [AX_LIB_READLINE])
 AC_DEFUN([AX_LIB_READLINE], [
diff --git a/m4/ax_pthread.m4 b/m4/ax_pthread.m4
index 4c4051e..5fbf9fe 100644
--- a/m4/ax_pthread.m4
+++ b/m4/ax_pthread.m4
@@ -1,5 +1,5 @@
 # ===========================================================================
-#        http://www.gnu.org/software/autoconf-archive/ax_pthread.html
+#        https://www.gnu.org/software/autoconf-archive/ax_pthread.html
 # ===========================================================================
 #
 # SYNOPSIS
@@ -67,7 +67,7 @@
 #   Public License for more details.
 #
 #   You should have received a copy of the GNU General Public License along
-#   with this program. If not, see <http://www.gnu.org/licenses/>.
+#   with this program. If not, see <https://www.gnu.org/licenses/>.
 #
 #   As a special exception, the respective Autoconf Macro's copyright owner
 #   gives unlimited permission to copy, distribute and modify the configure
@@ -82,7 +82,7 @@
 #   modified version of the Autoconf Macro, you may extend this special
 #   exception to the GPL to apply to your modified version as well.
 
-#serial 23
+#serial 24
 
 AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
 AC_DEFUN([AX_PTHREAD], [
diff --git a/src/Frog-util.cxx b/src/Frog-util.cxx
index aa767b8..8854eea 100644
--- a/src/Frog-util.cxx
+++ b/src/Frog-util.cxx
@@ -29,10 +29,13 @@
 
 */
 
+#include "frog/Frog-util.h"
+
 #include <set>
 #include <string>
+#include <ostream>
+
 #include "config.h"
-#include "frog/Frog.h"
 
 #include <sys/types.h>
 #include <sys/stat.h>
diff --git a/src/Frog.cxx b/src/Frog.cxx
index 8b33374..604bc25 100644
--- a/src/Frog.cxx
+++ b/src/Frog.cxx
@@ -50,7 +50,7 @@
 
 // individual module headers
 
-#include "frog/Frog.h" //internal interface, included by all modules
+#include "frog/Frog-util.h"
 #include "frog/FrogAPI.h" //public API interface
 #include "frog/ucto_tokenizer_mod.h"
 #include "frog/tagger_base.h"
diff --git a/src/FrogAPI.cxx b/src/FrogAPI.cxx
index 8c8b90b..6df2674 100644
--- a/src/FrogAPI.cxx
+++ b/src/FrogAPI.cxx
@@ -28,10 +28,11 @@
       lamasoftware (at ) science.ru.nl
 */
 
+#include "frog/FrogAPI.h"
+
 #include <cstdlib>
 #include <cstdio>
 #include <unistd.h>
-#include <sys/wait.h>
 #include <signal.h>
 #include <string>
 #include <cstring>
@@ -65,9 +66,10 @@
 #  endif /* defined(HAVE_READLINE_HISTORY_H) */
 #endif /* HAVE_READLINE_HISTORY */
 
+#include "ticcutils/PrettyPrint.h"
 
 // individual module headers
-#include "frog/FrogAPI.h" //will also include Frog.h (internals), FrogAPI.h is for public  interface
+#include "frog/Frog-util.h"
 #include "frog/ucto_tokenizer_mod.h"
 #include "frog/mblem_mod.h"
 #include "frog/mbma_mod.h"
@@ -190,6 +192,11 @@ FrogAPI::FrogAPI( FrogOptions &opt,
   // for some modules init can take a long time
   // so first make sure it will not fail on some trivialities
   //
+  if ( options.doTok && !configuration.hasSection("tagger") ){
+    LOG << "Missing [[tagger]] section in config file." << endl;
+    LOG << "cannot run without a tagger!" << endl;
+    throw runtime_error( "Frog initialization failed" );
+  }
   if ( options.doTok && !configuration.hasSection("tokenizer") ){
     LOG << "Missing [[tokenizer]] section in config file." << endl;
     LOG << "Disabled the tokenizer." << endl;
diff --git a/src/Parser.cxx b/src/Parser.cxx
index 8ff7864..689c691 100644
--- a/src/Parser.cxx
+++ b/src/Parser.cxx
@@ -29,6 +29,8 @@
 
 */
 
+#include "frog/Parser.h"
+
 #include <sys/types.h>
 #include <unistd.h>
 #include <cstdlib>
@@ -39,10 +41,10 @@
 
 #include "config.h"
 #include "ticcutils/Configuration.h"
+#include "ticcutils/PrettyPrint.h"
 #include "timbl/TimblAPI.h"
 #include "ucto/unicode.h"
-#include "frog/Frog.h"
-#include "frog/Parser.h"
+#include "frog/Frog-util.h"
 #include "frog/csidp.h"
 
 using namespace std;
diff --git a/src/cgn_tagger_mod.cxx b/src/cgn_tagger_mod.cxx
index 10f5264..9567f28 100644
--- a/src/cgn_tagger_mod.cxx
+++ b/src/cgn_tagger_mod.cxx
@@ -29,10 +29,8 @@
 
 */
 
-#include "mbt/MbtAPI.h"
-#include "ucto/unicode.h"
-#include "frog/Frog.h"
 #include "frog/cgn_tagger_mod.h"
+#include "frog/Frog-util.h"
 
 using namespace std;
 using namespace Tagger;
diff --git a/src/ckyparser.cxx b/src/ckyparser.cxx
index 97c6e53..3d676d2 100644
--- a/src/ckyparser.cxx
+++ b/src/ckyparser.cxx
@@ -28,13 +28,15 @@
       lamasoftware (at ) science.ru.nl
 
 */
+
+#include "frog/ckyparser.h"
+
 #include <iostream>
 #include <vector>
 #include <string>
 
 #include "ticcutils/PrettyPrint.h"
 #include "ticcutils/LogStream.h"
-#include "frog/ckyparser.h"
 
 using namespace std;
 
diff --git a/src/clex.cxx b/src/clex.cxx
index 0d9ef65..b3d8140 100644
--- a/src/clex.cxx
+++ b/src/clex.cxx
@@ -29,9 +29,11 @@
 
 */
 
+#include "frog/clex.h"
+
 #include <string>
 #include <map>
-#include "frog/clex.h"
+
 
 using namespace std;
 
diff --git a/src/csidp.cxx b/src/csidp.cxx
index ca3fded..f6a2442 100644
--- a/src/csidp.cxx
+++ b/src/csidp.cxx
@@ -28,6 +28,9 @@
       lamasoftware (at ) science.ru.nl
 
 */
+
+#include "frog/csidp.h"
+
 #include <iostream>
 #include <fstream>
 #include <string>
@@ -37,7 +40,7 @@
 #include "ticcutils/StringOps.h"
 #include "ticcutils/PrettyPrint.h"
 #include "ticcutils/LogStream.h"
-#include "frog/csidp.h"
+
 
 using namespace std;
 
diff --git a/src/iob_tagger_mod.cxx b/src/iob_tagger_mod.cxx
index 436769f..b34fb6b 100644
--- a/src/iob_tagger_mod.cxx
+++ b/src/iob_tagger_mod.cxx
@@ -29,11 +29,11 @@
 
 */
 
-#include "mbt/MbtAPI.h"
-#include "frog/Frog.h"
-#include "ucto/unicode.h"
 #include "frog/iob_tagger_mod.h"
 
+#include "ticcutils/PrettyPrint.h"
+#include "frog/Frog-util.h"
+
 using namespace std;
 using namespace Tagger;
 
diff --git a/src/mblem_mod.cxx b/src/mblem_mod.cxx
index a180a6d..18a4521 100644
--- a/src/mblem_mod.cxx
+++ b/src/mblem_mod.cxx
@@ -29,6 +29,8 @@
 
 */
 
+#include "frog/mblem_mod.h"
+
 #include <string>
 #include <iostream>
 #include <fstream>
@@ -36,8 +38,7 @@
 #include "ucto/unicode.h"
 #include "ticcutils/LogStream.h"
 #include "ticcutils/Configuration.h"
-#include "frog/Frog.h"
-#include "frog/mblem_mod.h"
+#include "frog/Frog-util.h"
 
 using namespace std;
 
diff --git a/src/mblem_prog.cxx b/src/mblem_prog.cxx
index d9d5ff6..fd4c75f 100644
--- a/src/mblem_prog.cxx
+++ b/src/mblem_prog.cxx
@@ -29,6 +29,8 @@
 
 */
 
+#include "frog/mblem_mod.h"
+
 #include <string>
 #include <iostream>
 #include <fstream>
@@ -42,7 +44,6 @@
 #include "libfolia/folia.h"
 #include "frog/ucto_tokenizer_mod.h"
 #include "frog/cgn_tagger_mod.h"
-#include "frog/mblem_mod.h"
 
 using namespace std;
 using namespace Timbl;
diff --git a/src/mbma_brackets.cxx b/src/mbma_brackets.cxx
index c5ea022..821268f 100644
--- a/src/mbma_brackets.cxx
+++ b/src/mbma_brackets.cxx
@@ -29,6 +29,8 @@
 
 */
 
+#include "frog/mbma_brackets.h"
+
 #include <cassert>
 #include <string>
 #include <vector>
@@ -36,14 +38,12 @@
 #include <iostream>
 #include "ucto/unicode.h"
 #include "ticcutils/Configuration.h"
-#include "ticcutils/LogStream.h"
 #include "ticcutils/StringOps.h"
 #include "ticcutils/PrettyPrint.h"
 #include "libfolia/folia.h"
 #include "frog/clex.h"
 #include "frog/mbma_rule.h"
 #include "frog/mbma_mod.h"
-#include "frog/mbma_brackets.h"
 
 using namespace std;
 using TiCC::operator<<;
diff --git a/src/mbma_mod.cxx b/src/mbma_mod.cxx
index 17e5e5d..b2b4ecb 100644
--- a/src/mbma_mod.cxx
+++ b/src/mbma_mod.cxx
@@ -29,19 +29,22 @@
 
 */
 
+#include "frog/mbma_mod.h"
+
 #include <cstdlib>
 #include <string>
 #include <set>
 #include <iostream>
 #include <algorithm>
 #include <fstream>
+
 #include "timbl/TimblAPI.h"
 
 #include "ucto/unicode.h"
 #include "ticcutils/Configuration.h"
 #include "ticcutils/StringOps.h"
-#include "frog/Frog.h"
-#include "frog/mbma_mod.h"
+#include "ticcutils/PrettyPrint.h"
+#include "frog/Frog-util.h"
 
 using namespace std;
 using TiCC::operator<<;
@@ -90,7 +93,7 @@ void Mbma::init_cgn( const string& main, const string& sub ) {
     }
   }
   else {
-    throw ( runtime_error( "unable to open:" + sub ) );
+    throw ( runtime_error( "unable to open: " + main ) );
   }
   ifstream tc1( sub );
   if ( tc1 ){
@@ -682,7 +685,7 @@ void Mbma::filterSubTags( const vector<string>& feats ){
     unique[tmp] = ait;
   }
   // so now we have map of 'equal' analysis.
-  // create a set for revers lookup.
+  // create a set for reverse lookup.
   set<Rule*> uniqueAna;
   for ( auto const& uit : unique ){
     uniqueAna.insert( uit.second );
diff --git a/src/mbma_prog.cxx b/src/mbma_prog.cxx
index e5e60fb..e027347 100644
--- a/src/mbma_prog.cxx
+++ b/src/mbma_prog.cxx
@@ -29,6 +29,8 @@
 
 */
 
+#include "frog/mbma_mod.h"
+
 #include <string>
 #include <iostream>
 #include <vector>
@@ -41,7 +43,6 @@
 #include "libfolia/folia.h"
 #include "frog/ucto_tokenizer_mod.h"
 #include "frog/cgn_tagger_mod.h"
-#include "frog/mbma_mod.h"
 
 using namespace std;
 using namespace Timbl;
diff --git a/src/mbma_rule.cxx b/src/mbma_rule.cxx
index b5f5d8f..31c25f1 100644
--- a/src/mbma_rule.cxx
+++ b/src/mbma_rule.cxx
@@ -29,16 +29,15 @@
 
 */
 
+#include "frog/mbma_rule.h"
+
 #include <string>
 #include <vector>
 #include <iostream>
-#include "ticcutils/LogStream.h"
 #include "ticcutils/StringOps.h"
 #include "ticcutils/PrettyPrint.h"
 #include "libfolia/folia.h"
-#include "frog/clex.h"
 #include "frog/mbma_brackets.h"
-#include "frog/mbma_rule.h"
 
 using namespace std;
 using TiCC::operator<<;
diff --git a/src/mwu_chunker_mod.cxx b/src/mwu_chunker_mod.cxx
index cf7341e..85894aa 100644
--- a/src/mwu_chunker_mod.cxx
+++ b/src/mwu_chunker_mod.cxx
@@ -29,6 +29,8 @@
 
 */
 
+#include "frog/mwu_chunker_mod.h"
+
 #include <iostream>
 #include <fstream>
 #include <cstdlib>
@@ -39,9 +41,8 @@
 
 #include "timbl/TimblAPI.h"
 
-#include "frog/Frog.h" // defines etc.
+#include "frog/Frog-util.h" // defines etc.
 #include "ucto/unicode.h"
-#include "frog/mwu_chunker_mod.h"
 
 using namespace std;
 
diff --git a/src/ner_prog.cxx b/src/ner_prog.cxx
index 2069b32..2cfd524 100644
--- a/src/ner_prog.cxx
+++ b/src/ner_prog.cxx
@@ -29,6 +29,8 @@
 
 */
 
+#include "frog/ner_tagger_mod.h"
+
 #include <string>
 #include <iostream>
 #include <vector>
@@ -41,7 +43,6 @@
 #include "libfolia/folia.h"
 #include "mbt/MbtAPI.h"
 #include "frog/ucto_tokenizer_mod.h"
-#include "frog/ner_tagger_mod.h"
 
 using namespace std;
 using namespace Timbl;
diff --git a/src/ner_tagger_mod.cxx b/src/ner_tagger_mod.cxx
index 04e2c48..7d385f8 100644
--- a/src/ner_tagger_mod.cxx
+++ b/src/ner_tagger_mod.cxx
@@ -29,12 +29,14 @@
 
 */
 
+#include "frog/ner_tagger_mod.h"
+
 #include "mbt/MbtAPI.h"
-#include "frog/Frog.h"
+#include "frog/Frog-util.h"
 #include "ucto/unicode.h"
 #include "ticcutils/FileUtils.h"
 #include "ticcutils/StringOps.h"
-#include "frog/ner_tagger_mod.h"
+#include "ticcutils/PrettyPrint.h"
 
 using namespace std;
 using namespace Tagger;
@@ -124,9 +126,13 @@ bool NERTagger::fill_ners( const string& cat,
 
 bool NERTagger::read_gazets( const string& name, const string& config_dir ){
   string file_name = name;
+  string lookup_dir = config_dir;
   if ( name[0] != '/' ) {
     file_name = config_dir + "/" + file_name;
   }
+  else {
+    lookup_dir = TiCC::dirname( file_name );
+  }
   ifstream is( file_name );
   if ( !is ){
     LOG << "Unable to find Named Enties file " << file_name << endl;
@@ -155,7 +161,7 @@ bool NERTagger::read_gazets( const string& name, const string& config_dir ){
     }
     string cat  = parts[0];
     string file = parts[1];
-    if ( fill_ners( cat, file, config_dir ) ){
+    if ( fill_ners( cat, file, lookup_dir ) ){
       ++file_cnt;
     }
   }
diff --git a/src/tagger_base.cxx b/src/tagger_base.cxx
index 9760e22..5618062 100644
--- a/src/tagger_base.cxx
+++ b/src/tagger_base.cxx
@@ -29,13 +29,11 @@
 
 */
 
-#include <algorithm>
-#include "mbt/MbtAPI.h"
-#include "ucto/unicode.h"
-#include "frog/Frog.h"
-#include "frog/ucto_tokenizer_mod.h"
 #include "frog/tagger_base.h"
 
+#include <algorithm>
+#include "frog/Frog-util.h"
+
 using namespace std;
 using namespace Tagger;
 
diff --git a/src/ucto_tokenizer_mod.cxx b/src/ucto_tokenizer_mod.cxx
index 0b6d517..a41c3f1 100644
--- a/src/ucto_tokenizer_mod.cxx
+++ b/src/ucto_tokenizer_mod.cxx
@@ -29,12 +29,14 @@
 
 */
 
+#include "frog/ucto_tokenizer_mod.h"
+
 #include <string>
 #include "timbl/TimblAPI.h"
-#include "frog/Frog.h"
+#include "frog/Frog-util.h"
 #include "ticcutils/Configuration.h"
 #include "ticcutils/FileUtils.h"
-#include "frog/ucto_tokenizer_mod.h"
+#include "ticcutils/PrettyPrint.h"
 
 using namespace std;
 using TiCC::operator<<;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/frog.git



More information about the debian-science-commits mailing list