Architecture
This is a brief overview over the architecture of the Language Support.
Documents and Types
Every Document object has a doctype. This doctype object knows about which plugin provides which support for this type of document. There is a global registry of doctypes supported in pida.core.doctype.Manager. Pida delivers a list of common used doctypes, but each language support plugin can create new ones.
Plugins and Language
Language support is just a plugin like every other pida plugin, with little differences.
1. Language plugins have a file called language.pida so pida detects it as a language plugin 2. There is a preloading phase for every language support plugin.
Preloading
Pida imports every language plugins init.py file and calls register_language() function if it exists.
Please notice: your init.py file should not import other files from your plugin or other modules as loading is done lazy to keep memory usage down.
Usually you create a LazyLoader? class from pida.services.language.utils.
Language support types
Language support can be one of many things. They must inherit from pida.services.language.interface objects.
See the file pida/services/language/interface.py for documentation.
