-
Notifications
You must be signed in to change notification settings - Fork 18
APIs
This page offers an overview of the programmatic interfaces into the entities and context iKnow will identify in natural language text. We offer Core APIs for accessing the iKnow engine directly and tapping into the output in all of its glory, as well as a handful of other interfaces to easily pair up with other NLP and ML technology.
The iKnow engine is written in C++ and therefore this is the primary interface into its functionality.
The main C++ API file is engine.h
(modules\engine\src), defining the class iKnowEngine
with the main entry point:
index(TextSource, language)
After indexing all data is stored in iknowdata::Text_Source m_index
. "iknowdata" is the namespace used for all classes that contain meaningful data :
-
iknowdata::struct Entity
: represents a text entity after indexing. -
iknowdata::struct Sent_Attribute
: represents an attribute sentence marker. -
iknowdata::struct Path_Attribute_Span
: represents a span in the sentence' path after attribute expansion. -
iknowdata::struct Sentence
: represents a sentence in the text source after indexing. -
iknowdata::Sentence::Path
: represents a path in a sentence. -
iknowdata::struct Text_Source
: represents the whole text after indexing.
enginetest.cpp
(modules\enginetest\enginetest.cpp) has a demo function (void a_short_demo(void)
) that explains every step from indexing to retrieving the results. See also the wiki section on our source code
iKnowEngine::index()
method currently has 2 limitations : it only works synchronously and single threaded. A mutex is used to synchronize threads internally, no protection is needed from the side of the client.
The C++ library is also exposed through CPython for easy access from Python. See here for more on getting started.
WIP
WIP