added CRF in Python stuff for TH