Support json output, add py4j gateway, add a function for machine learning (weka)