Added similarity function, separated mysql and neo4j functions.