An Introduction to Conditional Random Fields