Hello,
I am aiming to make a complete Prolog version of a Perl module that
generates latin-looking text:
http://search.cpan.org/~adeola/Text-Lorem-0.3/lib/Text/Lorem.pm
My first goal is to take a string of latin-looking text and
1. split the string into a list of strings by considering whitespace
as a delimiter.
2. take the list of strings and make each string lowercase
3. remove any character from any string which is not a POSIX "word"
character, the POSIX word characters being: A-Za-z0-9 and underscore.
Practically, let's say we have the initial string of latin-looking
text like this:
lorem_text("ipsum? lorem! lingua romana perligata.").
To satisfy goal #1 above, we need a predicate
tokenize(String, ListOfStrings).
To satisfy goal #2, we need some mapping predicate which applies a
predicate that lowercases text.
Goal #3 requires a mapping predicate which applies a
predicate applies regular expression substition (or something similar)
to a string
Concretely, the generate_wordlist Perl function does all 3 goals. The
source code, for it is here:
http://gitorious.org/text-lorem/text-lorem/blobs/master/lib/Text/Lore...
The full latin-looking text, in Prolog is here:
http://gitorious.org/text-lorem/text-lorem/blobs/master/prolog/lorem....
I request help on the Prolog version of generate_wordlist, per the
spec above. You are welcome to post here or join the gitorious project
as a contributor.