SWI-Prolog Did You Know Did you know? You can train markov chains with BIMS Search Documentation:
Predicate prolog_edit:edit_source/1