Simple structured learning framework for python