Zamia AI - Architecture
Zamia AI uses XSB Prolog at the core for knowledge storage, processing and
reasoning plus a seq2seq model to map natural language to python code which
queries the Prolog engine:
The principle behind Zamia AI's processing is quite simple:
Natural language triggers actions(code)
Or, to put it in other words: Zamia AI is a generic system that transform
inputs into actions(code) via a neural seq2seq network.
At the foundation of Zamia AI lies a set of innovative ideas and principles:
- The synthesis of declarative (Prolog) and imperative programming (Python)
with deep learning for seq2seq neural networks.
- Training deep neural networks with patterns, i.e. generating training-data for the
neural network using a macro engine:
The neural network is trained with explicitly modeled data.
The training material can be enriched with macros to yield more training samples.
- Structured data as training basis for nlp systems:
Training samples can be expanded by pulling information from structured data sources like wikidata,
yielding an exponentially growing training sample base.
- Triggered actions can utilize the Prolog-based reasoning engine:
Reasoning tasks can range from simple data lookup (e.g. names and properties of entities)
to more elaborate tasks such as processing contextual information or true
reasoning about relationships between entities.
Actions can also modify the knowledge base by modifying or appending facts and rules to it,
so Zamia AI can learn from the inputs it processes.
- All structured data is converted to Prolog:
Zamia AI comes with a set of utilities that automatically convert data sources
in various formats to Prolog source code which can then be compiled into the internal
A typical example is WikiData which is available in RDF format via LDF.
Zamia AI comes with tools that retrieve relevant subgraphs via LDF and convert the RDF data
to Prolog source code.
Zamia AI Parts
Zamia AI - being a framework - follows a very modular approach to its architecture.
Here, we give a brief overview of the various sub-projects that Zamia AI consists of. Please
note that - depending on your application - you can but do not have to use all components but instead
you can mix and match and add your own components as you see fit.
- Zamia AI: The core A.I. engine itself:
- XSB Prolog + Runtime
- Knowledge Base / NLP modules
- CLI tools to compile, test and try out modules
- Data Tools to convert and import structured data (RDF/LDF, AIML, ...)
- Neural network training tools
- Demo applications
- speech: Tools to train ASR models and pretrained models for Kaldi and CMU Sphinx
- nltools: A collection of low-level tools and abstraction layers
- Speech synthesis
- Voice activity detection
- Natural language tokenizers
- Phonetic alphabet conversion
- Grapheme to Phoneme (g2p) conversion
- ASR engines
- Audio input and output
- Python wrappers:
- py-kaldi-asr: Python Kaldi ASR Wrapper
- py-espeak-ng: Python eSpeak NG Wrapper
- py-xsb-prolog: Python XSB Prolog Wrapper
- py-marytts: Python Mary TTS Wrapper
What is provided
- Training data
- Pre-trained models for ASR and NLP