Re: [xsl] XSLT Text Processing: Fun with Anagrams

Subject: Re: [xsl] XSLT Text Processing: Fun with Anagrams
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Tue, 24 Apr 2007 20:34:56 -0700
I also noticed the Calculator written in XSL that you mentioned about
in one of your previous posts
http://fxsl.sourceforge.net/articles/xslCalculator/The%20FXSL%20Calculator.html
-- it's too advanced for me to understand at this point, but it
definitely shows what could be accomplished.

Thanks again.


Yes, the question is not so much what can be accomplished with XSLT
(it is a Turing-complete language), but how the solution can be
expressed using XSLT in a more compact, elegant and efficient way.

In this respect XSLT 2.0 is a big step forward. When combined with
FXSL, the solutions are intuitive and sometimes much more
straight-forward to arrive at, and very often they are one liners
(which means just one XPath expression or just one FXSL function
call).


Because you seem interested in XSLT solutions for challenging problems, I'd also recommend looking at a few more problems such as:

- generating Fibonacci numbers;

- determining whether a number is prime.

- producing the concordance of large text corpora.

- solving Sudoku puzzles

  - various graph algorithms such as finding one or all or the
minimal route between two nodes. Years ago I played with the "Street
Sweeper" algorithm for Eulerization of a graph.



--
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play



On 4/24/07, Rashmi Rubdi <rashmi.sub@xxxxxxxxx> wrote:
On 4/24/07, Dimitre Novatchev <dnovatchev@xxxxxxxxx> wrote:

> Be warned, as already stated in my blog, that this transformation will
> take quite long, because it first indexes the huge dictionary file on
> Anagram keys, before performing the search for anagrams.

Thanks for the info and the caution.

> This is why, it pays off very much to create the specialised Anagrams
> Dictionary in one single transformation (which you already did) and
> then to use it together with testGetDictAnagrams.xsl

I agree.

I also noticed the Calculator written in XSL that you mentioned about
in one of your previous posts
http://fxsl.sourceforge.net/articles/xslCalculator/The%20FXSL%20Calculator.html
-- it's too advanced for me to understand at this point, but it
definitely shows what could be accomplished.

Thanks again.

-Rashmi

Current Thread