Hi, > > For the automatic checking in the background: > I have noticed that the Spanish grammar checker for MSWord tries to > check everytime the user types a character that is a "candidate" for > ending a sentence (for example, a dot). If the user goes on typing on > the same paragraph, eventualy some fragments are checked again (it seems > like there are "hard" ends, that can't be changed by the following text, > and "soft" ends, that depend on the text that follows (for example, an > abbreviation can appear at the end of the sentence or in the middle)). I > think that we should check the grammar as soon as possible, not when all > the paragraph has been typed. > > > As we discussed before, letting the OO determine the end of sentences is > difficult. I think the right time to start checking is after every > Return Key press. Letting the grammar checkers analyse blocks is more > secure, the grammar checker can commit few mistakes when we act like it.
Just looking for the Return key won't work. If you are inserting a new sentence in a paragraph or cut or paste text that key will not be pressed. You also need to have in mind that text may get changed via API as well. To word it somewhat sloppy I would say "whenever the text changed by at least a word". > > 5. OpenOffice should be able to replace the wrong sentences. > > The checker should preserve formating, footnotes, etc. Ideally these > things should not be passed to the checker (the footnotes and the like > could be passed when the paragraph or the sentence that includes them > has been checked, for example), but if the user chooses to accept a > suggestion, the format (i.e. italics), the footnotes, etc. should remain > in the original places. Perhaps we could pass "markers" embedded in the > paragraph text and then return them in the corrected text to "align" > the > original and the checked sentences. > > > hum... I think API can deal with it, my idea is not letting grammar > checkers deal with these details, only analyse and suggests corrections. > It could be difficult letting a grammar checker deal with indexes, text > positions, underlining etc. That would be my suggestion as well. Let the grammar checker care about checking text only. That way it will be either to provide a new one and does require less changes to existing ones if document internals change. But I'm quite sure that CoGrOO currently has to handle a lot of this by itself right now. ^_~ > Yes, You are correct, the users may in several times just correct the > sentences, but the process of analysing the Paragraph is processed just > once per change (after a change or a return key press, as I told > before). And a single check should provide all information regarding the > block analysed, IT not means that everything will be showed to the user, > it will just be stored in some place (an object in memory) for the User > Interface deal with it. I hope you don't intend to create such objects hidden in the memory for later use by the auto checking as well. I think it will be way to easily to have many of such objects created by accident (e.g. wrong language set at paragraph). Caching a very limited number of results will be Ok though. The main question is if it is not much more efficient (time and memory) for auto checking if the suggestions are not retrieved. AFAIK for spell checkers at least retrieving suggestions is a considerable task compared to only find out that sth is wrong somewhere. Thus it might be a good idea to only keep one (or at most a very limited number) of that sth-is-wrong-somewhere data if that can be used to speed up the suggestion retrieval. But most likely that will be of not much use either when you can not cache all of them (which is likely a memory no-go). And caching a small number will probably not help either since when it is about up grammar checking those will be obsolete almost instantly. Thus currently me thinks there is no use in retrieving or caching any data beyond the minimum required results to mark the text portion when running in the background. TL->Bruno: Please check if I'm wrong here. Thomas --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
