This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/groovy-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new 8d8c781  blog post skeleton (draft contd)
8d8c781 is described below

commit 8d8c7819c192907cf33cba9c116285fce4b66d43
Author: Paul King <[email protected]>
AuthorDate: Sun Jan 19 09:48:42 2025 +1000

    blog post skeleton (draft contd)
---
 site/src/site/blog/groovy-text-similarity.adoc | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/site/src/site/blog/groovy-text-similarity.adoc 
b/site/src/site/blog/groovy-text-similarity.adoc
index 6637f81..aacd698 100644
--- a/site/src/site/blog/groovy-text-similarity.adoc
+++ b/site/src/site/blog/groovy-text-similarity.adoc
@@ -7,7 +7,11 @@ Paul King
 
 == Introduction
 
-String similarity helps answer questions like:
+String similarity tries to answer the question: is one word
+(or phrase, sentence, paragraph, document) the same as another.
+This is an important capability in many scenarios involving searching
+or asking questions or invoking commands.
+It can help answer questions like:
 
 * Are two Jira/GitHub issues duplicates of the same issue?
 * Are two (or more) customer records actually for the same customer?
@@ -16,9 +20,23 @@ String similarity helps answer questions like:
 * As a doctor, can I find a medical journal paper discussing a patient's 
medical diagnosis/symptoms/treatment?
 * As a programmer, can I find a solution to my coding problem?
 
+Very simple cases can typically be explicitly catered for by hand, e.g.
+using String library methods or regular expressions:
+
+[source.groovy]
+----
+assert 'Cat'.equalsIgnoreCase('cat')
+
+assert ['color', 'Colour'].every { it =~ '[Cc]olou?r' }
+----
+
+Handling cases explicitly like this soon becomes tedious.
+We'll look at some libraries which can help us handle comparisons
+in more general ways.
+
 == Simple comparisons
 
-Examines three libraries for performing similarity matching:
+First, we'll examine three libraries for performing similarity matching:
 
 * info.debatty:java-string-similarity
 * org.apache.commons:commons-text Apache Commons Text

Reply via email to