Your message dated Sun, 07 Sep 2025 16:32:09 +0000
with message-id <[email protected]>
and subject line Bug#770831: fixed in presage 0.9.1-2.6+deb13u1
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.6+deb13u1
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: Mon, 11 Aug 2025 17:02:57 +0200
Source: presage
Architecture: source
Version: 0.9.1-2.6+deb13u1
Distribution: trixie
Urgency: medium
Maintainer: Matteo Vescovi <[email protected]>
Changed-By: Mike Gabriel <[email protected]>
Closes: 770831
Changes:
 presage (0.9.1-2.6+deb13u1) trixie; urgency=medium
 .
   * 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).
Checksums-Sha1:
 922e0637f1f38ac255202a30c1b8e44b1e535fcb 2365 presage_0.9.1-2.6+deb13u1.dsc
 c15adbc3c07e8c94af58c32551ae831a47491972 11980 
presage_0.9.1-2.6+deb13u1.debian.tar.xz
 07eca3acfdc67b35e4809ce0aac5a7053b1bedf1 6750 
presage_0.9.1-2.6+deb13u1_source.buildinfo
Checksums-Sha256:
 a94bba4d4a659946e789f03d45c3795b9e8d058e1c59baf14a3b28fc03508c33 2365 
presage_0.9.1-2.6+deb13u1.dsc
 feb51f16bc9ee3771d9e5897c150c91ab8a9aae3816458f9725a9b3dd4054805 11980 
presage_0.9.1-2.6+deb13u1.debian.tar.xz
 ac0f537b1dd10b210ddf2ea40455864d95c29456f9e42d3f1664af1246a95571 6750 
presage_0.9.1-2.6+deb13u1_source.buildinfo
Files:
 ce46f523d06d9ac79cda2a0b14cb0599 2365 devel optional 
presage_0.9.1-2.6+deb13u1.dsc
 73ceae47e065fbc636445b7da0ed9b18 11980 devel optional 
presage_0.9.1-2.6+deb13u1.debian.tar.xz
 39846e534e550bb4b02ccb122d2a98fe 6750 devel optional 
presage_0.9.1-2.6+deb13u1_source.buildinfo

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

iQJJBAEBCgAzFiEEm/uu6GwKpf+/IgeCmvRrMCV3GzEFAmi8sxsVHHN1bndlYXZl
ckBkZWJpYW4ub3JnAAoJEJr0azAldxsxxTUP/3UUTKFOkwsNtwls3bIYcBFJPTwc
XRMb4Zou0TIwcyY8ahya0ogzCQWSidCnO3lGxYIge3S11PbZ2WE5/2eO3o+/QapV
/KJTDhJX0QYgyAjpT87Dd6KhteQ5PMuy+rzvw+2yE8Rzj6lQMcdLqK+K0ZbgWejv
z9ZNkVyvKOhDXpDrJ029nUcveOavILl1JdCKrE56CeQEMhjNOQ6eYKJ0bE/ISqGK
8QLQdF/ll0B59FTLU8G5q3dNCBZQqG+nLLKjoxZjRvIv7ksx7pqQt6mw6bvDlwip
8DjSOWUOOKMcx06i7k+CuEnIBJNU1KIU0ZaGkVwHj1h+zpSqZ5g081yN/B7VdvSo
5+uOH9h1OlU/YEArOG69TcpQ1W+OdYIZ3qekbImYJP3c45BONesbyf92WWv22zdj
2Rt2CEJRm0wb/3V8RzMugQJevNlYD/YDNsGZ3deYOVYm12ggkJ1+7zcZEI83RStm
Qgf2kpbYdtaQRpvq0lFwIH0tkZ+hxiKrvKZxWJzeP2Vy8p6AdEuvf05t3+hdwsi2
irtwAUtY+/k+HLMLTH8e4ySwjpnDIKe/xNhQDe309eNQvG4wpGHo5vSeFyzBCUmb
1idLGY4YN6Z6ern8mYwwvK6vAmo+Wu8nY6Urt/ybdaW6PCQrHH2PuwSgqqfTaHG7
SA4zgZM651ZmUaX0
=93DK
-----END PGP SIGNATURE-----

Attachment: pgpuq2wVlyc5v.pgp
Description: PGP signature


--- End Message ---

Reply via email to