lib for machine learning and connect to prolog database