Hi Eleonora
> You are right, if you say, that a lot of grammatic errors
> are simply due to one badly used expression or word; to find these
> graviax is ideal.
>
> If there were a possibility, that I can say to graviax
> using a rule:
> Find all expressions using a plural noun after a number,
> and mark them as bad, and print the error:
> - no plural after a number
> (for example: five boys)
It would be straightforward, and something I've been thinking about
for a while, to change the code to allow queries to be built up from
fragments stored elsewhere.
For example, you could have something like
<definition
name="DIGIT"
match="one|two|three|four|five|six|seven|eight|nine"/>
<definition
name="TEEN"
match="ten|eleven|twelve|(thir|four|fif|six|seven|eight|nine)teen"/>
<definition
name="TEN"
match="twenty|thirty|forty|fifty|sixty|seventy|eighty|ninety"/>
<definition
name="UPTO2DIGIT"
match="($TEN-$DIGIT)|$TEEN|$DIGIT"/>
<definition
name="SINGULARNOUN"
match="\b[a-z]*[^s]\b"/>
<rule match="($UPTO2DIGIT $SINGULARNOUN)"
suggestion="$1s">
<description>Noun should be plural when it follows a
number.</description>
<test in="five boy" out="five boys"/>
<test in="five boys" out="five boys"/>
</rule>
There are some rough edges here. In particular, SINGULARNOUN is any
sequence of letters not ending in an s. You could create a massively
long rule that contains all of the words (aardvark|ab|aba|...), but I
don't think this would work very quickly (if at all).
There is also no way at the moment of just flagging up a potential
problem without offering a suggestion. I should probably make a
change so that this happens whenever the suggestion attribute is
ommitted.
> or:
> Find all expressions, that has an
> article- an attribute with plura ending- a plural noun
> mark it as bad printing:
> - no plural ending of attribute after article and plural noun
> (for example: the nices girls)
>
> (The above two are Hungarian grammar rules)
>
> And the like, that is general rules, then graviax could be very well
> used for German, Hungarian, and also other languages.
Yes, there is nothing specific to English in the framework, only in
the rules themselves. I think that these would need to be developed
almost from scratch for each language though, whether or not I add
the code for reusing rule fragments.
Best wishes
Matthew
--
Matthew Strawbridge http://www.philoxenic.com
Bespoke software development and freelance technical copy editing
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]