I've tried to make use of the code for the sentence similarity, but receive the following error:
Traceback (most recent call last):
File "sentence-similarity.py", line 236, in <module>
print(similarity("hello world I like ice cream", "hello earth I don't like ice cream ", True))
File "sentence-similarity.py", line 208, in similarity
return DELTA * semantic_similarity(sentence_1, sentence_2, info_content_norm) + (1.0 - DELTA) * word_order_similarity(sentence_1, sentence_2)
TypeError: semantic_similarity() takes 1 positional argument but 3 were given
def semantic_similarity(sentence_1, sentence_2, info_content_norm):
# sentence_1 = re.sub('[^A-Za-z0-9\s]', '', row['question1']).lower()
# sentence_2 = re.sub('[^A-Za-z0-9\s]', '', row['question2']).lower()
the resulting similarity is 1.0. As described in your paper this should not be the case, as the method is not supposed to treat the sentences as bag of words.
I'm not sure if I'm correct in changing the parameters to the function and/or if the first two lines should be commented out.
Thanks in advance.