KBCorpus implementation