Hi Liam,
I have added ft:thesaurus, and I have revised our documentation [1,2]. I think that the new function may contribute to a more sophisticated search code written in XQuery.
The implementation is still subject to change; I’m looking forward to your feedback. Christian
[1] https://files.basex.org/releases/latest/ [2] https://docs.basex.org/wiki/Full-Text_Module#ft%3Athesaurus
On Mon, May 31, 2021 at 10:52 PM Liam R. E. Quin liam@fromoldbooks.org wrote:
On Mon, 2021-05-31 at 15:05 +0200, Christian Grün wrote:
let $thes := <thesaurus>...</thesaurus> let $term := 'happy' let $relation := 'RT' let $levels := 1 to 10 let $terms := ft:thesaurus($thes, $term, $relation, $levels) return 'lucky' contains text { $terms }
Do you think that could be helpful?
Yes. I'm also very open to other ways of solving the real request, which is handling a more complex query language, with "a (b|with spaces here|c) d" matching "a b d", "a with spaces d", "a c d"
I could also do it by expanding the query into constant strings of course, and maybe if there's no other demand for this, that's the thing to do.
Thanks for looking at it some more!
Liam
-- Liam Quin, https://www.delightfulcomputing.com/ Available for XML/Document/Information Architecture/XSLT/ XSL/XQuery/Web/Text Processing/A11Y training, work & consulting. Barefoot Web-slave, antique illustrations: http://www.fromoldbooks.org