[KDE-Sonnet] [lingu-dev] Introductions from the KDE guy

Kevin Scannell kscanne at gmail.com
Fri Jan 26 16:56:08 CET 2007


Ar Aoine 26 Eanáir 2007 08:04, scríobh Jacob R Rideout:
> > One question - are tags like "<marker>" allowed to occur unescaped
> > inside attributes in a well-formed XML document?  I recall that quotes
> > need to be turned into entities like &quot;, but I don't know about
> > "<" and ">".
>
> How about instead have not <marker> tag, but having both
> 'contextoffset' and 'length' attributes.

That's fine with me.  My code came out a bit cleaner with the <marker>,
but they're clearly equivalent. 

Daniel probably should weigh in on this too since the "<marker>" idea 
came from LanguageTool.

> Is the context needed?  What are the api use cases?

Here's one place that I use it:
http://borel.slu.edu/gramadoir/form.html

I have other error-analysis applications (not aimed at end-users)
that work at the sentence level, so the context is needed for those too.

> The application developer can generate the
> context.

Yes, but it can't be done very well if you want the context to be
a complete sentence.  You probably know that segmentation can be
very non-trivial and language-dependent, so this should be done by
the grammar engine.

> dictionary of rules. So there would be an api call to return a
> description of the error like "Wrong case with gerund." Optionally,
> there could be another call for a suggested correction like, "Use
> possessive case with gerunds. Write 'my opinion' rather than 'me
> opinion'." 
> If we had this, then the 'msg' attribute would no longer be
> necessary. The replacements attribute would still be useful as it
> would suggest directly substitutable corrections.

My hope for the --api output is that it will contain 
all of the information needed by typical client applications
(at least those whose job is to report grammatical errors to 
the user in one way or another -- things like Kevin Donnelly's
Klebran might need more than this).  This way no further calls
to the grammar checker should be necessary, e.g. calls
for converting a ruleId to a msg.   This conversion is sometimes
complicated in Gramadóir.

Kevin



More information about the kde-sonnet mailing list