[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Spell Check Type Matching in XPath?

Subject: Re: Spell Check Type Matching in XPath?
From: "C. M. Sperberg-McQueen cmsmcq@xxxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 21 Apr 2022 20:11:34 -0000
Re:  Spell Check Type Matching in XPath?
On Thu, 2022-04-21 at 19:01 +0000, Eliot Kimber
eliot.kimber@xxxxxxxxxxxxxx wrote:
> Ibm looking at Jenibs code now. Ibll see what I can do with it.
> B 
> The fact that this is the best there is (a MarkMail search basically
> brought me to Mikebs response below), it suggests that therebs not
> something more obvious that I simply failed to see.

Non-obvious (at least to me), but possibly faster, given that you know
already one of the strings to be matched, may be the symmetric-deletion
approach to edit distance described by Wolf Garber [1]. It allows a
fairly quick detection of whether the candidate string is within edit
distance  1 of the string you're looking to match -- if you adjust the
way you do it, you can detect strings within distance 2.

[1]
https://wolfgarbe.medium.com/1000x-faster-spelling-correction-algorithm-2012-8701fcd87a5f

Michael Sperberg-McQueen

B 
> However, Jenibs comments in her post about recursion suggests therebs
> a way to improve the code in XSLT 3/XPath 3, maybe something using
> iterateb&.
> B 
> Cheers,
> B 
> E.
> B 
> _____________________________________________
> Eliot Kimber
> Sr Staff Content Engineer
> O: 512 554 9368
> M: 512 554 9368
> servicenow.com
> LinkedInB |B TwitterB |B YouTubeB |B Facebook
> B 
> From:Michael Kay mike@xxxxxxxxxxxx
> <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
> Date: Thursday, April 21, 2022 at 1:35 PM
> To: xsl-list <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
> Subject: Re:  Spell Check Type Matching in XPath?
> [External Email]
> B 
> Jeni Tennison's work on computing Levenshtein distance in XSLT may be
> relevant:
> B 
> http://www.jenitennison.com/2007/05/03/levenshtein-distance-in-xslt-2-0.html
> B 
> (It would be interesting to see it reworked for XSLT 3.0...)
> B 
> Search also for "Levenshtein distance XSLT" on Markmail.
> B 
> Michael Kay
> Saxonica
> 
> 
> > On 21 Apr 2022, at 18:57, Eliot Kimbereliot.kimber@xxxxxxxxxxxxxx
> > <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> > B 
> > Ibm writing a Schematron rule that tries to identify URLs where the
> > server component is close to, but not quite, bdocs.servicenow.comb,
> > i.e., bseivcenowb or bservcinowb or whatever. I also need to
> > eliminate servers that are not like servicenow, such as
> > bdocs.amazon.comb.
> > B 
> > Basically I want a the kind of fuzzy match on bservicenowb that
> > youbd get with normal spell checking.
> > B 
> > Ibm not seeing an easy way to do this in XSLT/XPath (in the context
> > of the XSLT Schematron engine in Oxygen XML).
> > B 
> > But I feel like Ibm missing some more-or-less obvious way to do
> > this with regular expression or maybe a fold or something (I can
> > use XPath 3).
> > B 
> > What am I missing?
> > B 
> > Thanks,
> > B 
> > E.
> > _____________________________________________
> > Eliot Kimber
> > Sr Staff Content Engineer
> > O: 512 554 9368
> > M: 512 554 9368
> > servicenow.com
> > LinkedInB |B TwitterB |B YouTubeB |B Facebook
> > XSL-List info and archive 
> > EasyUnsubscribeB (by email)
> B 
> XSL-List info and archive 
> EasyUnsubscribe (by email)
> XSL-List info and archiveEasyUnsubscribe(by email)

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.