On Thursday 21 July 2005 16:23, Keli Hu wrote:

> a sentence, locale of the sentence, other properties
>
> isValid() returns:
>
> true if the sentence is grammatically correct in the specified
> language, false otherwise.

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.

> 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.

> 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.

> 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.

Regards
 Daniel

-- 
http://www.danielnaber.de

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to