Introduction
Introduction Statistics Contact Development Disclaimer Help
Implement meme did-you-mean recommendation service. - annna - Annna the nice fr…
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit 6c59e0c19fb8e49e319a5f0db504b29376b4740e
parent 47fac1ebd9249ede9d33851a3ce5b1b33db06d2d
Author: Annna Robert-Houdin <[email protected]>
Date: Sat, 6 Aug 2022 21:51:32 +0200
Implement meme did-you-mean recommendation service.
Diffstat:
M annna-message-common | 10 ++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/annna-message-common b/annna-message-common
@@ -1048,6 +1048,16 @@ do
if tagline="$(grep "${tag} " "${hashtagfile}")";
then
annna-say -s "${server}" -c "${channel}" "${tagline% *}: ${tag…
+ else
+ # Use the special agrep -1 to find similar memes.
+ didyoumean="$(agrep -i -1 "^#${tag} " "${hashtagfile}" \
+ | head -n 5 \
+ | cut -d' ' -f 1 \
+ | tr "\n" " ")"
+ if [ -n "${didyoumean}" ];
+ then
+ annna-say -c "${server}" -c "${channel}" "Did you mean…
+ fi
fi
done
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.