- From: Steven Pemberton <steven.pemberton@cwi.nl>
- Date: Tue, 18 Mar 2025 12:57:56 +0000
- To: public-ixml@w3.org
- Message-Id: <1742302412262.587132672.908103906@cwi.nl>
Fredrik said: "With the current state of the parsers, it's very expensive
to parse a huge file. It's more efficient to do it in a record-oriented
way."
Surely it is trivial to spot if a grammar can be treated in a
record-oriented way. I would put this in the class of "possible
optimisations", and not encumber the user with having to know about it.
Sounds like a good topic for a Balisage paper (deadline 4 April, or 6 June
for late-breaking).
Steven
On Tuesday 18 March 2025 13:50:26 (+01:00), Steven Pemberton wrote:
Looks like you had a great discussion in the status reports section. Sorry
I missed it.
Bethan says: "What I'm interested in working on are tools that will treat
your grammar as a generator rather than a recognizer."
I've written several of these in the past (for instance, when I wrote a
version of Eliza, the Rogerian psychotherapist, I wrote another program to
generate random paranoid ramblings for Eliza to respond to
(https://cwi.nl/~steven/Talks/2024/09-oxford/ai.html#L2734)
In fact, they are quite easy to write, since it is just a recursive random
path through the grammar tree. This is the complete code, where 'thing' is
either a terminal or nonterminal ('choice' returns a random element of a
sequence, in this case returning a random alternative from a rule):
HOW TO GENERATE thing
FROM grammar:
SELECT:
nonterminal(thing):
FOR symbol
IN choice grammar[thing]:
GENERATE symbol FROM grammar
ELSE:
WRITE thing, "
"
And you generate one rambling with "GENERATE '<sentence>' FROM sentences"
Steven
On Tuesday 04 March 2025 16:42:47 (+01:00), Norm Tovey-Walsh wrote:
> Hi folks,
>
> Draft minutes are online:
>
> https://www.w3.org/2025/03/04-ixml-minutes.html
>
> Be seeing you,
> norm
>
> --
> Norm Tovey-Walsh
> Saxonica
>
>
Received on Tuesday, 18 March 2025 12:58:02 UTC