Custom similarity functions to work with values extracted by the Textual CBR methods