Extending / Chaining Spell Checker
Guenter Bartsch
guenter.bartsch at gmail.com
Thu May 30 03:46:06 PDT 2013
hi all,
we're currently trying to implement a small, db-based terminology
checker plugin. essentially, this plugin will check for certain
phrases in a document and offer replacements for faulty ones.
a first implementation works, however, the spell checker gets in the
way: since we implemented our extension as a grammer checker plugin,
the spell checker will complain about certain (potentially correct)
technical terms not found in its dictionary.
now, we're planning to implement our own spell checker that goes along
with the grammer checker. it's only purpose would be to accept all the
technical words in the database and hand through all other words to
the real spell checker (i.e. hunspell)
is this possible? is there a mechanism to chain several spell checker
plugins? i.e. could explicitly instantiate the hunspell checker and
hand through all function calls to it?
something like:
print ("Speller: instatiating hunspell...")
smgr = ctx.ServiceManager
hunspell = smgr.createInstanceWithContext(
"org.openoffice.lingu.HspellHunspellChecker", ctx)
print ("Speller: hunspell instance: %s" % repr(hunspell))
would be nice - however, we'd have to be able to specify an
instantiation name instead of a service name when instantiating the
object.
thanks,
guenter
More information about the LibreOffice
mailing list