Hi all,

Bruno Sant'Anna wrote:


> Um, Thomas, I am seriously thinking about changing this behavior, from
> passing the hole paragraph to pass just single sentences (look in the
> main thread, i posted a complete explanation) , it will not just help
> with sereval languages, it can avoid this kind of problems as well. It
> will be proper both for automatic checking (letting the user change the
> paragraf as he wants) and for interactive checking, It will check in
> real time. what do you think? (I've send you an e-mail about it
> yesterday did you received it?)

There is another approach that combines the advantages of both ideas:
- Pass the whole paragraph on to the grammar checker but specify the
  sub-string (the sentence) it should take care of now by supplying an
  index to start + the length (or the index to the end).

That way you will actually have the grammar checker only check a
sentence at a time. But you can retrieve the text in units of
paragraphs which is most efficient. And since text is internally
stored in paragraphs only a reference to the text needs to be
passed through the API. Whereas if you choose to have a string with that
sentence only one always has to create a new string which need not be.

Also there is an additional kind of flexibility available even though
I'm not sure if it is useful at all:
- For most sentences the grammar checker would be able to look before
  and past the sub-string (sentence) it has to take care of. If the
  text before and following the sentence is in the same language it
  might be of some use to the grammar checker.

The API in i18n is often designed this way.

>     > > In
>     > > the automatic checking, after every change of a paragraph the
>     API sends
>     > > it to checker, I was thinking about setting a time limit too, for
>     > > example, 60 seconds, what do you think?
> 
>     I'm quite unsure want you want to do here.
>     Do you want to stop grammar checking after 60s or at least 60s after
>     nothing was found incorrect?
> 
>  
> .. here changes too, we dont really need time to automatic check.

Ok.


> UM i think when the API define sentence endings it will be easier to
> check paragraph border texts, for e.g. enums.

Why do you think so?
As I see it would require that you can actually choose to access the
'next' paragraph. If that is possible will depend on the API we are
going to define.
I do not see where the end of sentence is of use here.

BTW: AFAIR the i18n breakiterator does not detect end of sentences
across paragraph borders. You may like to check this.
And if you can work around it with the means of the break iterator
remains to be seen.
That is because checking if end-of-sentence detection returns true at
the end of an unfinished sentence at the end of a paragraph depends
upon that implementation. I would guess it will still return true
even if the sentence is unfinished.
But if we need to be sure abut this we have to ask Karl Hong.
Maybe it is possible to change the behavior if it does not work out
currently or we may need some additional functionality to allow for
unfinished sentence detection across paragraph borders.


>     Two other question just popped into my mind:
>     - Should a grammar checker always implement the spell
>     checking API as well?
>     If not it would easily be possible that a spellchecker disagrees
>     with the grammar checker about a specific word or at least the
>     suggestions for it.
>     - Or more basically: if we have a grammar checker for a language should
>     we allow a spellchecker for the same language to be active as well?

Well, no one answered this one yet... :-/


>     > > I think the secure way of implement changes is by showing
>     dialogs, even
>     > > in authomatic checking, it just show the mistakes, a user have
>     to right
>     > > click in it and a dialog appears. Have you figured another way
>     to do it?
> 
>     I don't get what you mean here by showing a dialog even for automatic
>     checking. As I see it about the whole thing of automatic checking is
>     to not disrupt the users work-flow by raising dialogs.
>     Of course the should be the context-menu if you right-click on the
>     wrong text.
> 
>  
> Imagine if the grammar commited a mistake, to it not simply changes the
> sentence withot any advice the user must permit it.

Of course it is not allowed to automatically change anything!
If run interactive there will always be the dialog where the user makes
the changes and thus confirms them. And for automatic checking only the
colored underlines should be drawn.
Thus I still not see why automatic checking should involve a dialog.


Thomas

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

Reply via email to