Hi Daniel,
i totally agree with most of your points
some remarks in addition
One problem is that you often don't know where a sentence starts and ends.
Just looking for "." is not enough (e.g. because of abbreviations that end
with a dot -- and these are different in all languages). So the API
shouldn't know about sentences and needs to leave the sentence boundary
detection to the grammar checker.
I think this should be left to the grammar engine
The work unit that is passed to it should be the paragraph
This is IMHO the most well-defined (line break, paragraph break - there
is an OOo API for that - look at TextCursors)
complex structure with all the errors seems not so wise to me, because
once the user notices there is a grammar error indication, he/she
might edit the sentence immediately and it's quite possible that all
errors go away
If the user changes text, it needs to be re-checked immediately anyway, so
the errors will disappear.
Yes !
So if the caller has to call grammar() more then once, probably we
need to remember some of the states information, such as previous
errors/corrections or position of error, to make this more efficient.
I think having this kind of state in the API would be bad design.
yes, not needed at all
new query, new life as well said by eleonora
Also there are a few user options that I can think of that can affect
the API, such as custom dictionaries, and whether to check quoted
sentences or not (should this one just affect the caller?).
Each grammar checker will have its own set of settings and it will be
rather complex. So hard-coding settings in OOo doesn't seem to make sense
anyway.
yes
regarding the returned information, be carefull when giving positions as
some element inside an OOo text may interfer ith the counting og the
words : fopr example, notes are counted as 1 character but are obviously
not takent into account in rough texts
Laurent
--
Laurent Godard <[EMAIL PROTECTED]> - Ingénierie OpenOffice.org
Indesko >> http://www.indesko.com
Nuxeo CPS >> http://www.nuxeo.com - http://www.cps-project.org
Livre "Programmation OpenOffice.org", Eyrolles 2004
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]