[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lojban] Re: parsing with error detection and recovery



On 8/15/06, Chris Capel <pdf23ds@gmail.com> wrote:

For instance, the morphology rules in the BPFK Peg Morphology[1] will
only parse consonants that don't appear in invalid consonant clusters.
If a consonant cluster is invalid, it will stop parsing. But by adding
error rules for consonants that don't check the validity (that only
get matched if the ones that do check don't match) or that check for
specific kinds of invalid pairs, the output of the parser could be
more likely to finish,

That part seems relatively easy to do:

Define a new top rule:

tolerant-text <- text / text-without-phonotactic-constraints

Make a copy of the full grammar with each rule name tagged with
"-without-phonotactic-constraints".

Eliminate the phonotactic constraints from the second set of rules.
These appear only in a few rules. for example, instead of:

c <- comma* [cC] !h !c !s !x !voiced

you will have:

c-without-phonotactic-constraints <- comma* [cC]

and could tell the user why the cluster is
invalid.

That may be harder to achieve.

mu'o mi'e xorxes


To unsubscribe from this list, send mail to lojban-list-request@lojban.org
with the subject unsubscribe, or go to http://www.lojban.org/lsg2/, or if
you're really stuck, send mail to secretary@lojban.org for help.