Hello community, here is the log from the commit of package hfst-ospell for openSUSE:Factory checked in at 2020-01-19 20:53:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/hfst-ospell (Old) and /work/SRC/openSUSE:Factory/.hfst-ospell.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "hfst-ospell" Sun Jan 19 20:53:25 2020 rev:4 rq:764972 version:0.5.1 Changes: -------- --- /work/SRC/openSUSE:Factory/hfst-ospell/hfst-ospell.changes 2018-05-18 14:26:43.324970911 +0200 +++ /work/SRC/openSUSE:Factory/.hfst-ospell.new.26092/hfst-ospell.changes 2020-01-19 20:53:58.935941349 +0100 @@ -1,0 +2,8 @@ +Thu Jan 16 13:08:18 UTC 2020 - Tomáš Chvátal <[email protected]> + +- Update to 0.5.1: + * change correction finding order (fixes issue #28) + * require C++1y (C++14) + * observe ICU namespacing (fixes issue #42) + +------------------------------------------------------------------- Old: ---- hfstospell-0.5.0.tar.gz New: ---- hfstospell-0.5.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ hfst-ospell.spec ++++++ --- /var/tmp/diff_new_pack.CsPwb4/_old 2020-01-19 20:54:00.835942347 +0100 +++ /var/tmp/diff_new_pack.CsPwb4/_new 2020-01-19 20:54:00.839942350 +0100 @@ -1,7 +1,7 @@ # # spec file for package hfst-ospell # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,19 +12,19 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define _name hfstospell -%define libname libhfstospell10 +%define libname libhfstospell11 Name: hfst-ospell -Version: 0.5.0 +Version: 0.5.1 Release: 0 Summary: Spell checker library and tool based on HFST License: Apache-2.0 Group: Productivity/Text/Spell -URL: http://hfst.github.io/ +URL: https://hfst.github.io/ Source0: https://github.com/hfst/%{name}/releases/download/v%{version}/%{_name}-%{version}.tar.gz Source99: baselibs.conf BuildRequires: gcc-c++ @@ -73,8 +73,7 @@ find %{buildroot} -type f -name "*.la" -delete -print %check -# 1 test is failing -make %{?_smp_mflags} check || : +make %{?_smp_mflags} check %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig ++++++ baselibs.conf ++++++ --- /var/tmp/diff_new_pack.CsPwb4/_old 2020-01-19 20:54:00.899942381 +0100 +++ /var/tmp/diff_new_pack.CsPwb4/_new 2020-01-19 20:54:00.899942381 +0100 @@ -1 +1 @@ -libhfstospell10 +libhfstospell11 ++++++ hfstospell-0.5.0.tar.gz -> hfstospell-0.5.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hfstospell-0.5.0/ChangeLog new/hfstospell-0.5.1/ChangeLog --- old/hfstospell-0.5.0/ChangeLog 2018-03-05 13:13:53.000000000 +0100 +++ new/hfstospell-0.5.1/ChangeLog 2018-10-15 13:25:35.000000000 +0200 @@ -1,4 +1,8 @@ -678d45d (HEAD -> master, origin/master, origin/HEAD) Treat all tests as XFAIL_TESTS if zhfst support is disabled. +a949408 (HEAD -> master, origin/master, origin/HEAD) ICU is namespaced in newer versions (fixes #42) +e272cd2 Change correction finding order (issue #28); Require C++1y (C++14) +0521ea9 (tag: v0.5.0) Copyright extends to 2018. +e16dcbb Ready for release 0.5.0. +678d45d Treat all tests as XFAIL_TESTS if zhfst support is disabled. a3f39d9 Merge pull request #31 from hfst/configure-explicit-error bc1c9ea Separate counters (fixes #37, closes #38) a4aeae0 Post-case-mangling unique test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hfstospell-0.5.0/Makefile.am new/hfstospell-0.5.1/Makefile.am --- old/hfstospell-0.5.0/Makefile.am 2018-03-05 12:43:06.000000000 +0100 +++ new/hfstospell-0.5.1/Makefile.am 2018-10-15 13:24:14.000000000 +0200 @@ -54,7 +54,7 @@ libhfstospell_la_SOURCES=hfst-ol.cc ospell.cc \ ZHfstOspeller.cc ZHfstOspellerXmlMetadata.cc libhfstospell_la_CXXFLAGS=$(AM_CXXFLAGS) $(CXXFLAGS) $(PKG_CXXFLAGS) -libhfstospell_la_LDFLAGS=-no-undefined -version-info 10:0:0 \ +libhfstospell_la_LDFLAGS=-no-undefined -version-info 11:0:0 \ $(PKG_LIBS) # link sample program against library here diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hfstospell-0.5.0/Makefile.in new/hfstospell-0.5.1/Makefile.in --- old/hfstospell-0.5.0/Makefile.in 2018-03-05 13:00:28.000000000 +0100 +++ new/hfstospell-0.5.1/Makefile.in 2018-10-15 13:35:18.000000000 +0200 @@ -695,7 +695,7 @@ ZHfstOspeller.cc ZHfstOspellerXmlMetadata.cc libhfstospell_la_CXXFLAGS = $(AM_CXXFLAGS) $(CXXFLAGS) $(PKG_CXXFLAGS) -libhfstospell_la_LDFLAGS = -no-undefined -version-info 10:0:0 \ +libhfstospell_la_LDFLAGS = -no-undefined -version-info 11:0:0 \ $(PKG_LIBS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hfstospell-0.5.0/NEWS new/hfstospell-0.5.1/NEWS --- old/hfstospell-0.5.0/NEWS 2018-03-05 13:24:26.000000000 +0100 +++ new/hfstospell-0.5.1/NEWS 2018-10-15 13:31:24.000000000 +0200 @@ -4,6 +4,13 @@ This file contains all noteworthy changes in HFST-ospell development between releases. For full listing of changes see ChangeLog. +Noteworthy changes in 0.5.1 +--------------------------- + +* change correction finding order (fixes issue #28) +* require C++1y (C++14) +* observe ICU namespacing (fixes issue #42) + Noteworthy changes in 0.5.0 --------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hfstospell-0.5.0/configure new/hfstospell-0.5.1/configure --- old/hfstospell-0.5.0/configure 2018-03-05 13:00:27.000000000 +0100 +++ new/hfstospell-0.5.1/configure 2018-10-15 13:35:17.000000000 +0200 @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Revision. # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for hfstospell 0.5.0. +# Generated by GNU Autoconf 2.69 for hfstospell 0.5.1. # # Report bugs to <[email protected]>. # @@ -591,8 +591,8 @@ # Identity of this package. PACKAGE_NAME='hfstospell' PACKAGE_TARNAME='hfstospell' -PACKAGE_VERSION='0.5.0' -PACKAGE_STRING='hfstospell 0.5.0' +PACKAGE_VERSION='0.5.1' +PACKAGE_STRING='hfstospell 0.5.1' PACKAGE_BUGREPORT='[email protected]' PACKAGE_URL='http://hfst.github.io' @@ -1384,7 +1384,7 @@ # 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 hfstospell 0.5.0 to adapt to many kinds of systems. +\`configure' configures hfstospell 0.5.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1455,7 +1455,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of hfstospell 0.5.0:";; + short | recursive ) echo "Configuration of hfstospell 0.5.1:";; esac cat <<\_ACEOF @@ -1600,7 +1600,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -hfstospell configure 0.5.0 +hfstospell configure 0.5.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2144,7 +2144,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by hfstospell $as_me 0.5.0, which was +It was created by hfstospell $as_me 0.5.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3011,7 +3011,7 @@ # Define the identity of the package. PACKAGE='hfstospell' - VERSION='0.5.0' + VERSION='0.5.1' cat >>confdefs.h <<_ACEOF @@ -3153,7 +3153,7 @@ HFSTOSPELL_NAME=hfstospell HFSTOSPELL_MAJOR=0 HFSTOSPELL_MINOR=5 -HFSTOSPELL_EXTENSION=.0 +HFSTOSPELL_EXTENSION=.1 HFSTOSPELL_VERSION=$HFSTOSPELL_MAJOR.$HFSTOSPELL_MINOR$HFSTOSPELL_EXTENSION @@ -18465,14 +18465,80 @@ # Checks for system services -# Checks for highest supported C++ standard +# Require highest supported C++ standard ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -std=c++17" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -std=c++20" >&5 +$as_echo_n "checking whether C++ compiler accepts -std=c++20... " >&6; } +if ${ax_cv_check_cxxflags___std_cpp20+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -std=c++20" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ax_cv_check_cxxflags___std_cpp20=yes +else + ax_cv_check_cxxflags___std_cpp20=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cxxflags___std_cpp20" >&5 +$as_echo "$ax_cv_check_cxxflags___std_cpp20" >&6; } +if test x"$ax_cv_check_cxxflags___std_cpp20" = xyes; then : + CXXFLAGS="$CXXFLAGS -std=c++20" +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -std=c++2a" >&5 +$as_echo_n "checking whether C++ compiler accepts -std=c++2a... " >&6; } +if ${ax_cv_check_cxxflags___std_cpp2a+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -std=c++2a" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ax_cv_check_cxxflags___std_cpp2a=yes +else + ax_cv_check_cxxflags___std_cpp2a=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cxxflags___std_cpp2a" >&5 +$as_echo "$ax_cv_check_cxxflags___std_cpp2a" >&6; } +if test x"$ax_cv_check_cxxflags___std_cpp2a" = xyes; then : + CXXFLAGS="$CXXFLAGS -std=c++2a" +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -std=c++17" >&5 $as_echo_n "checking whether C++ compiler accepts -std=c++17... " >&6; } if ${ax_cv_check_cxxflags___std_cpp17+:} false; then : $as_echo_n "(cached) " >&6 @@ -18505,7 +18571,7 @@ CXXFLAGS="$CXXFLAGS -std=c++17" else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -std=c++1z" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -std=c++1z" >&5 $as_echo_n "checking whether C++ compiler accepts -std=c++1z... " >&6; } if ${ax_cv_check_cxxflags___std_cpp1z+:} false; then : $as_echo_n "(cached) " >&6 @@ -18538,7 +18604,7 @@ CXXFLAGS="$CXXFLAGS -std=c++1z" else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -std=c++14" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -std=c++14" >&5 $as_echo_n "checking whether C++ compiler accepts -std=c++14... " >&6; } if ${ax_cv_check_cxxflags___std_cpp14+:} false; then : $as_echo_n "(cached) " >&6 @@ -18571,7 +18637,7 @@ CXXFLAGS="$CXXFLAGS -std=c++14" else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -std=c++1y" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -std=c++1y" >&5 $as_echo_n "checking whether C++ compiler accepts -std=c++1y... " >&6; } if ${ax_cv_check_cxxflags___std_cpp1y+:} false; then : $as_echo_n "(cached) " >&6 @@ -18604,40 +18670,10 @@ CXXFLAGS="$CXXFLAGS -std=c++1y" else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -std=c++11" >&5 -$as_echo_n "checking whether C++ compiler accepts -std=c++11... " >&6; } -if ${ax_cv_check_cxxflags___std_cpp11+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_fn_error $? "Could not enable at least C++1y (C++14) - upgrade your compiler" "$LINENO" 5 - ax_check_save_flags=$CXXFLAGS - CXXFLAGS="$CXXFLAGS -std=c++11" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ax_cv_check_cxxflags___std_cpp11=yes -else - ax_cv_check_cxxflags___std_cpp11=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CXXFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cxxflags___std_cpp11" >&5 -$as_echo "$ax_cv_check_cxxflags___std_cpp11" >&6; } -if test x"$ax_cv_check_cxxflags___std_cpp11" = xyes; then : - CXXFLAGS="$CXXFLAGS -std=c++11" -else - as_fn_error $? "could not enable C++11 or newer" "$LINENO" 5 fi @@ -19222,7 +19258,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by hfstospell $as_me 0.5.0, which was +This file was extended by hfstospell $as_me 0.5.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19289,7 +19325,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -hfstospell config.status 0.5.0 +hfstospell config.status 0.5.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hfstospell-0.5.0/configure.ac new/hfstospell-0.5.1/configure.ac --- old/hfstospell-0.5.0/configure.ac 2018-03-05 12:59:50.000000000 +0100 +++ new/hfstospell-0.5.1/configure.ac 2018-10-15 13:23:24.000000000 +0200 @@ -17,7 +17,7 @@ # autoconf requirements AC_PREREQ([2.62]) -AC_INIT([hfstospell], [0.5.0], [[email protected]], [hfstospell], [http://hfst.github.io]) +AC_INIT([hfstospell], [0.5.1], [[email protected]], [hfstospell], [http://hfst.github.io]) LT_PREREQ([2.2.6]) @@ -34,7 +34,7 @@ HFSTOSPELL_NAME=hfstospell HFSTOSPELL_MAJOR=0 HFSTOSPELL_MINOR=5 -HFSTOSPELL_EXTENSION=.0 +HFSTOSPELL_EXTENSION=.1 HFSTOSPELL_VERSION=$HFSTOSPELL_MAJOR.$HFSTOSPELL_MINOR$HFSTOSPELL_EXTENSION AC_SUBST(HFSTOSPELL_MAJOR) AC_SUBST(HFSTOSPELL_MINOR) @@ -147,14 +147,16 @@ AC_CHECK_FUNCS([strndup error]) # Checks for system services -# Checks for highest supported C++ standard +# Require highest supported C++ standard AC_LANG(C++) -AX_CHECK_COMPILE_FLAG([-std=c++17], [CXXFLAGS="$CXXFLAGS -std=c++17"], [ - AX_CHECK_COMPILE_FLAG([-std=c++1z], [CXXFLAGS="$CXXFLAGS -std=c++1z"], [ - AX_CHECK_COMPILE_FLAG([-std=c++14], [CXXFLAGS="$CXXFLAGS -std=c++14"], [ - AX_CHECK_COMPILE_FLAG([-std=c++1y], [CXXFLAGS="$CXXFLAGS -std=c++1y"], [ - AX_CHECK_COMPILE_FLAG([-std=c++11], [CXXFLAGS="$CXXFLAGS -std=c++11"], [ - AC_MSG_ERROR([could not enable C++11 or newer]) +AX_CHECK_COMPILE_FLAG([-std=c++20], [CXXFLAGS="$CXXFLAGS -std=c++20"], [ + AX_CHECK_COMPILE_FLAG([-std=c++2a], [CXXFLAGS="$CXXFLAGS -std=c++2a"], [ + AX_CHECK_COMPILE_FLAG([-std=c++17], [CXXFLAGS="$CXXFLAGS -std=c++17"], [ + AX_CHECK_COMPILE_FLAG([-std=c++1z], [CXXFLAGS="$CXXFLAGS -std=c++1z"], [ + AX_CHECK_COMPILE_FLAG([-std=c++14], [CXXFLAGS="$CXXFLAGS -std=c++14"], [ + AX_CHECK_COMPILE_FLAG([-std=c++1y], [CXXFLAGS="$CXXFLAGS -std=c++1y"], [ + AC_MSG_ERROR([Could not enable at least C++1y (C++14) - upgrade your compiler]) + ]) ]) ]) ]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hfstospell-0.5.0/office.cc new/hfstospell-0.5.1/office.cc --- old/hfstospell-0.5.0/office.cc 2018-02-13 14:44:27.000000000 +0100 +++ new/hfstospell-0.5.1/office.cc 2018-10-15 13:23:05.000000000 +0200 @@ -49,6 +49,7 @@ #include <unicode/uloc.h> #include <unicode/uchar.h> #include <unicode/unistr.h> +using namespace icu; #include "ZHfstOspeller.h" @@ -64,6 +65,7 @@ }; std::vector<word_t> words(16); std::string buffer; +std::vector<std::string> alts; std::unordered_set<std::string> outputs; UnicodeString ubuffer, uc_buffer; size_t cw; @@ -74,24 +76,24 @@ bool find_alternatives(ZHfstOspeller& speller, size_t suggs) { outputs.clear(); + alts.clear(); - for (size_t k=1 ; k <= cw ; ++k) { + // Gather corrections from all the tried variants, starting with verbatim and increasing mangling from there + for (size_t k=0 ; k < cw && alts.size()<suggs ; ++k) { buffer.clear(); - words[cw-k].buffer.toUTF8String(buffer); + words[k].buffer.toUTF8String(buffer); hfst_ospell::CorrectionQueue corrections = speller.suggest(buffer); if (corrections.size() == 0) { continue; } - std::cout << "&"; // Because speller.set_queue_limit() doesn't actually work, hard limit it here - for (size_t i=0, n=0, e=corrections.size() ; i<e && n<suggs ; ++i) { - std::cout << "\t"; + for (size_t i=0, e=corrections.size() ; i<e && alts.size()<suggs ; ++i) { buffer.clear(); - if (cw - k != 0) { - words[0].buffer.tempSubString(0, words[cw-k].start).toUTF8String(buffer); + if (k != 0) { + words[0].buffer.tempSubString(0, words[k].start).toUTF8String(buffer); } if (uc_all) { UnicodeString::fromUTF8(corrections.top().first).toUpper().toUTF8String(buffer); @@ -106,20 +108,27 @@ else { buffer.append(corrections.top().first); } - if (cw - k != 0) { - words[0].buffer.tempSubString(words[cw-k].start + words[cw-k].count).toUTF8String(buffer); + if (k != 0) { + words[0].buffer.tempSubString(words[k].start + words[k].count).toUTF8String(buffer); } if (outputs.count(buffer) == 0) { - std::cout << buffer; - ++n; + alts.push_back(buffer); } outputs.insert(buffer); corrections.pop(); } + } + + if (!alts.empty()) { + std::cout << "&"; + for (auto& alt : alts) { + std::cout << "\t" << alt; + } std::cout << std::endl; return true; } + return false; }
