[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GLR ambiguity
Alessandro Di Marco
Re: GLR ambiguity
Mon, 18 Jun 2007 13:55:30 +0200
Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)
Hans Aberg <address@hidden> writes:
On 16 Jun 2007, at 08:15, Paul Hilfinger wrote:
>> On 14 Jun 2007, at 12:48, Alessandro Di Marco wrote:
>> I was trying to create a GLR grammar for natural languages
>> ...when I stuck on the
>> following s/r ambiguity.
>> /* empty */
>> | text sentence
>> WORD EOL
>> | DOUBLEQ WORD EOL
>> | DOUBLEQ WORD EOL DOUBLEQ
> GLR does not resolve grammar conflicts statically. Bison will
> continue to report conflicts, and these reports really don't tell you
> much. Since natural languages ARE ambiguous, what you must use GLR
> for is to gather the possible interpretations. That is the purpose of
> %merge, which allows you, on encountering two different parses of the
> same phrase, to collect the interpretations (syntax trees, or
> whatever semantic values you are using) and return this collection
> (represented however you choose) as the value of the ambiguous
> construct. %merge also allows you to reject some interpretations on
> context-sensitive grounds. When I say "allows you" I don't mean that
> it provides specific facilities to do any of this, but rather that it
> gives a parser structure that allows YOU to write the necessary actions.
We did not get to know how much of actual language process that was
perhaps the intent was only to filter out quotations?!
Well, IMO it would be a good starting point... (did you know that the ladies'
market is managed by the Kowloon neighborhoods' people? :-)
But it would sure be interesting if somebody took up the quest of doing a
natural language grammar. There is, in fact, a Flex/Bison grammar for the
constructed language lojban, which is made not not be ambiguous:
It might give inputs on how to do it for natural languages.
War is much too serious a matter to be entrusted to the military. - Georges
Re: GLR ambiguity, Hans Aberg, 2007/06/14