SWI-Prolog Did You Know Did you know? SWI-Prolog has probabilistic logic Search Documentation:
Predicate trie_insert_new/3