Is there a mathematical example for Conditional Random Fields?
CRF is for HMM in sequences classification as Logistic Regression is for Naive Bayes for simple classification. For a in depth difference between them I strongly suggest you to read the classical Sutton article "An Introduction to Conditional
Random Fields". For a more practical example explaining how to apply the math I suggest you to read this article.