On Wed, Nov 5, 2008 at 2:34 PM, Chris Capel
<pdf23ds@gmail.com> wrote:
>> Right, but it would still be unparsable. The problem is that the text
>> before it is ungrammatical, and so has to be ignored by the parser to
>> get the whole thing to parse, which requires that the parser
>> understand which words the lo'ai is nulling out. It can't be treated
>> half-way and have things still parse.
>
> The obvious way to implement {lo'ai .. sa'ai .. le'ai} in a parser is to
> just treat it as a self-contained construct that requires morphologically
> correct Lojban inside it, just like {lo'u .. le'u'}, and syntactically
> correct Lojban before it (just like everything else).
How far before it? Up to the beginning of the sentence? The statement?
The {le'ai} construct doesn't care about ANYTHING else. However your parser works, that's how it works before {le'ai}.
> Of course it would require extraordinary methods to get things like {kwama
> lo'ai kwama sa'ai klama le'ai} --- or why not {fsen.45ynl5tnerg98ehg4n su
> coi} --- to parse. It's not practical and not cost-efficient. The {kjama}
> example falls in this category because {kj} is morphologically invalid.
Hmm. I think you overestimate the difference in effort between the two
implementations. They both require the same tricks, just at a slightly
different level in the grammar.
What are you talking about? One implementation is self-contained; the other requires lots of weird backtracking and re-parsing and weird, weird stuff.
> What _would_ be useful and cost-efficient would be to get things like {.i
> .ai mi cakla sa'ai ckakla le'ai} to parse.
Actually, this is the only useful one I can think of. If the text
isn't grammatical before the le'ai clause, then the user is probably
going to want to manually correct it anyway before feeding it to the
parser. This example happens to be both grammatical, and having nearly
the same parse tree as the corrected version (since the before and
after words are both brivla).
It doesn't matter if it has the same parse tree. It only matters that it PARSES IN ANY WAY. If it does, then the parser will be able to continue. If it doesn't, then the parser will die.