[antlr-interest] wanted: multiple result ASTs
researcher0x00 at gmail.com
Wed May 23 04:06:08 PDT 2012
I have never written a parser for natural language yet, but from working
with Artificial Intelligence and PROLOG, that is where I would focus my
search. In particular, PROLOG will generate multipule results for a given
query. So if the input is ambiguios, there would be multiple ways to match
against the rules, and the results would be each way that the PROLOG
program matched the rules against the input.
Hope that helps,
On Tue, May 22, 2012 at 7:59 PM, Scobie Smith (Insight Global) <
v-scobis at microsoft.com> wrote:
> I'm fairly new to ANTLR; please bear with me if this has been asked before.
> I am looking for a way to have ANTLR generate multiple result trees from
> my grammar, in order NOT to resolve ambiguity. Suppose I have a grammar
> that is "incomplete" or ambiguous, in that for some input text, there can
> be more than one "valid" way of parsing the input. (This is particularly
> useful in natural language parsing.) What I would like is to have rules
> that can collect all of these result ASTs-a list of ASTs, not just one AST.
> At the end of a successful parse run, there would then be a list of trees.
> I know this is not a typical need, particularly with formal languages. But
> I am looking to apply ANTLR for some natural language parsing.
> Any tips or pointers will be much appreciated. So far I do not see any
> easy way of doing this with ANTLR, but maybe there is some way of hacking
> in actions or the like.
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
More information about the antlr-interest