Your message dated Mon, 11 Aug 2025 13:08:17 +0000
with message-id <[email protected]>
and subject line Bug#770831: fixed in presage 0.9.1-2.7
has caused the Debian Bug report #770831,
regarding presage: Presage is unable to predict words containing apostrophes
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
770831: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=770831
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: presage
Version: 0.8.8-1ubuntu3
Severity: normal
Tags: upstream patch

Dear Maintainer,

 Currently presage splits on apostrophes and is unable to represent words
containing apostrophes in the database (due to them not being escaped). This
results in presage being unable to correctly predict words like "don't".

 Viewing the database for the English predictions shows that this is being
represented a 2-gram of: "don" and "t".

 The expected result is that this would be represented as a 1-gram of: "don't".

 I realise you're also upstream developer, so have seen my upstream bug report
for this already. Basically we're planning on including this patch temporarily
in the Ubuntu presage package and were wondering if you'd be interested in
including it in the Debian package until an upstream solution is ready. If so
we can then just sync our Ubuntu package with your Debian package, otherwise if
you'd rather wait until you've got a more comprehensive upstream solution we'll
just apply the patch temporarily in Ubuntu and then sync once it's fixed
upstream.

Thanks!

P.S.
 I'm still getting to grips with Debian packaging procedures, so apologies if
I've misstepped anywhere!



-- System Information:
Debian Release: jessie/sid
  APT prefers utopic-updates
  APT policy: (500, 'utopic-updates'), (500, 'utopic-security'), (500, 
'utopic'), (100, 'utopic-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-24-generic (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages presage depends on:
ii  libc6         2.19-10ubuntu2
ii  libgcc1       1:4.9.1-16ubuntu6
ii  libncurses5   5.9+20140712-2ubuntu1
ii  libpresage1   0.8.8-1ubuntu3
ii  libsqlite3-0  3.8.6-1
ii  libstdc++6    4.9.1-16ubuntu6
ii  libtinfo5     5.9+20140712-2ubuntu1

presage recommends no packages.

presage suggests no packages.

-- no debconf information
Description: Allow words with apostrophes to be predicted
 Stop the tokenizer from splitting based on apostrophes and allow for the
 escaping of words containing apostrophes in the database connector.
Author: Michael Sheldon <[email protected]>
Forwarded: https://sourceforge.net/p/presage/patches/2/
Bug-Ubuntu: https://launchpad.net/bugs/1384800

--- presage-0.9.orig/src/lib/core/charsets.h
+++ presage-0.9/src/lib/core/charsets.h
@@ -180,7 +180,6 @@ const char DEFAULT_SEPARATOR_CHARS[]={
     '$',
     '%',
     '&',
-    '\'',
     '(',
     ')',
     '*',
--- presage-0.9.orig/src/lib/predictors/dbconnector/databaseConnector.cpp
+++ presage-0.9/src/lib/predictors/dbconnector/databaseConnector.cpp
@@ -30,6 +30,7 @@
 #include <sstream>
 #include <stdlib.h>
 #include <assert.h>
+#include <boost/algorithm/string/replace.hpp>
 
 DatabaseConnector::DatabaseConnector(const std::string database_name,
 				     const size_t cardinality,
@@ -293,12 +294,8 @@ std::string DatabaseConnector::buildValu
 
 std::string DatabaseConnector::sanitizeString(const std::string str) const
 {
-    // TODO
-    // just return the string for the time being
-    // REVISIT
-    // TO BE DONE
-    // TBD
-    return str;
+    // Escape single quotes
+    return boost::replace_all_copy(str, "'", "''");
 }
 
 int DatabaseConnector::extractFirstInteger(const NgramTable& table) const
--- presage-0.9.orig/src/tools/text2ngram.cpp
+++ presage-0.9/src/tools/text2ngram.cpp
@@ -174,7 +174,7 @@ int main(int argc, char* argv[])
 	std::ifstream infile(argv[i]);
 	ForwardTokenizer tokenizer(infile,
 				   " \f\n\r\t\v",
-				   "`~!@#$%^&*()_-+=\\|]}[{'\";:/?.>,<");
+				   "`~!@#$%^&*()_-+=\\|]}[{\";:/?.>,<");
 	tokenizer.lowercaseMode(lowercase);
 
 	// take care of first N-1 tokens

--- End Message ---
--- Begin Message ---
Source: presage
Source-Version: 0.9.1-2.7
Done: Mike Gabriel <[email protected]>

We believe that the bug you reported is fixed in the latest version of
presage, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Mike Gabriel <[email protected]> (supplier of updated presage package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sun, 10 Aug 2025 23:51:05 +0200
Source: presage
Architecture: source
Version: 0.9.1-2.7
Distribution: unstable
Urgency: medium
Maintainer: Matteo Vescovi <[email protected]>
Changed-By: Mike Gabriel <[email protected]>
Closes: 770831 1023672 1024413 1077982
Changes:
 presage (0.9.1-2.7) unstable; urgency=medium
 .
   * Non-maintainer upload.
   * debian/patches:
     + Add allow-words-with-apostrophes-to-be-predicted.patch.
       Support suggesting words containing apostrophes. Don't crash maliit-
       server / lomiri-keyboard / lomiri when using /usr/lib/lomiri-keyboard/
       plugins/en/database_en.db presage DB. (Closes: #770831, LP:#1384800).
     + Add help2man-no-discard-stderr.patch. Rendering man pages from Python3-
       generated --help output requires parsing stderr. (Only relevant when
       building with Python support).
   * debian/control:
     + Set bin:pkg presage to Multi-Arch:foreign. Thanks to Helmut Grohne for
       pointing this out. (Closes: #1077982).
     + In B-D, switch from pkg-config to pkgconf. Thanks, lintian.
     + In B-D, switch from 'libncurses5-dev | libncurses-dev' to libncurses-dev.
       Thanks, lintian.
   * debian/watch:
     + Switch to packaging presage by SailfishOS. (No upstream version bump,
       yet). (Closes: #1023672)
 .
   [ Vagrant Cascadian ]
   * debian/patches:
     + Add doxygen-reproducible-builds.patch. Make API doc generation
       reproducible. (Closes: #1024413).
Checksums-Sha1:
 fe1ccc6544c7c831758af60f9fc04feedad5f46f 2312 presage_0.9.1-2.7.dsc
 14ccd5cb1bf09be77fb31279284866f367e689bb 12920 presage_0.9.1-2.7.debian.tar.xz
 51405d508eaab8df1c98b3a6519efe421050286a 6710 
presage_0.9.1-2.7_source.buildinfo
Checksums-Sha256:
 42f62bd1f6692d06729da211ca780e1180bb466ea53345beeb00de6e21c7c74a 2312 
presage_0.9.1-2.7.dsc
 bb5b920b1c7138a71fdfd0c6855de802f37a5e0c21d0b663dc62db9f950b90d1 12920 
presage_0.9.1-2.7.debian.tar.xz
 d322e2f04b94a6c3405d507220db403c27a0df5e567d6aa8e583632b72d220c7 6710 
presage_0.9.1-2.7_source.buildinfo
Files:
 1162dab3fc3e69e6a1230e4055d1018e 2312 devel optional presage_0.9.1-2.7.dsc
 aaa0cabf330d2f6e81d3a928ed4657b9 12920 devel optional 
presage_0.9.1-2.7.debian.tar.xz
 cfe9d0ff267186626f59a26e1f401652 6710 devel optional 
presage_0.9.1-2.7_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJJBAEBCgAzFiEEm/uu6GwKpf+/IgeCmvRrMCV3GzEFAmiZ3KoVHHN1bndlYXZl
ckBkZWJpYW4ub3JnAAoJEJr0azAldxsx6QoQAKmGdryClbwdOSrBKZ3ylc2awMuO
bFbHEULJmMj06WLiFa03P82r+nbMnIX5I0t9r+dodxlXUQY6ctGw5IG0UbuJ2I9e
kUxySDlq4qMiGpSfx871W9LfOmWNBXExVCtm6KuuX4qoZBOqMh5SiYyY1s7rMJ/6
9xyAaHm+svTV1ygFU7CJUkVcVMhpTzDeO6edi8wm4Cq6g2+7ft/32D5frFdPQr2w
qMbHyAwj8COfl5f6qG9gezw7D2ffZR8VxWQcltIifHBT4JNl3Ase7LkGkv7Q3L/x
n5fwWJxXEwKy1LqMOnholIWrZ34byNJ4ZCT2BeyP1wG5sgifvKVG9X3i37qcMgfg
aHJ9J0hJwIcoX4xWp2efWj+qyXatiGmWXQcrilBewtc0Z4Jp3S+c5xTzGRF1pnT3
W1YGPrGksf+0fWfSSpwVcd1QND/MUJCdSTfl51WRFA1mQZkYMcQ6SpKnXM4vbqSa
cC4X8gcyI8so+RiRRbBgBjjT1/2PLHpAGaYhiIy+y1H7yAn9LYPMlyE47KP3Yh6q
42FtGtpUl57fM7gTfMDPOmx+iZ0QYt7WmNJo2hKz7y6WCSng3QiGfeapWjh+YwXv
EV8rsfMAQv452XFJZ5yXPVLua1gQsWCRRKRrknJ7QTusc00jucFG7Lbm2vBYtxG+
S/mPsYd/OhNOPyLx
=idQ8
-----END PGP SIGNATURE-----

Attachment: pgpeIKyEMOPOV.pgp
Description: PGP signature


--- End Message ---

Reply via email to