Add customized functions for factorie data type by implicit convert to
local data type:document, sentence, token.
Modified current code to adapt to this implicit conversion and use
customized functions