Hi Daniel, On 7/22/05, Daniel Naber <[EMAIL PROTECTED]> wrote: > 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. >
Yes we can't just look for "." as sentence boundary, especially when there are other languages that use totally different punctuations. However, according to description of the existing XBreakIterator interface in OOo, XBreakIterator "contains the base routines for iteration in Unicode string. Iterates over characters, words, sentences and line breaks.", so maybe we could just let the caller use XBreakIterator interface for sentence boundry detection? > > 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. Hmm, maybe we should just do what Eleonora said, "new calling, new life" :-) Regards, Keli --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
