Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 142955

Design Guidelines for Grammar Checker or Similar Background Story Monitoring

$
0
0

I have already built a spell checker based on CHLinguistic successfully.

 

Now, I was given a task to incorporate a proprietary grammar checker into InDesign CS5 for one of our customers. After initial review the task seemed difficult but doable. Unfortunately, I got lost in the complexity of InDesign after I started. Looking into SDK and documentation seems like I have to learn complete InDesign internals to get it done.

 

I’ve made two plugins by now: model and UI.

 

The UI is based on SpellingPanel source code. It attaches an observer to monitor “Dynamic Grammar Check” setting and installs IEventWatcher to watch for keyboard events. The later installs an idle task after user stops typing. The idle task invalidates the paragraph of the text user is editing. I’ve implemented kGlobalTextAdornmentServiceImpl and kGalleyTextAdornmentAfterServiceImpl services for drawing the adornments.

 

The model plugin is where I should implement the very grammar checking and my own data strand to save grammar meta-info, right? The grammar checking itself is very slow: up to 10 seconds per sentence, so it has to be asynchronous.

 

My questions are:

 

  1. How would you design a background task to check grammar?
    A thread to attach on each document when it’s is opened, and an observer of the IID_ITEXTMODEL to recheck what gets changed later on? Saving grammar results in a separate data strand?

    I am looking fora a simple recipe. Hopefully, I can work out the details myself.

  2. Is it possible to get a source code of Linguistic plugin? After signing a non-disclosure agreement of course. There might be some valuable clues there. Basically, spell checking could be used for grammar checking if only the Linguistic wouldn’t chop text to single words.
  3. Does the Debug version of InDesign enable a developer to breakpoint and step thru the Adobe’s code? Are PDBs included? Is there really no way to get Debug version before buying Adobe Partnership?
  4. There are some grammar checkers already available for InDesign. Is there any vendor to build the grammar checking into InDesign in such a way, a third-party plugin could add another language support to it using a simple approach?

  

I am desperately searching for clues. Any help is greatly appreciated.


Viewing all articles
Browse latest Browse all 142955

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>