def __compute_arg_tmp(self): #arg_tmp s1_arg_tmp = "" for s in self.s1_TMP: s1_arg_tmp += s + ' ' s2_arg_tmp = "" for s in self.s2_TMP: s2_arg_tmp += s + ' ' if s1_arg_tmp == s2_arg_tmp and s1_arg_tmp != '': self.value_tmp = 1 elif s1_arg_tmp == '' or s2_arg_tmp == '': self.value_tmp = 0.25 else: result = cosineSimilarity.compare(s1_arg_tmp ,s2_arg_tmp) if result == result: self.value_tmp = result else: self.value_tmp = 0.25
def __compute_arg_loc(self): #arg_loc s1_arg_loc = "" for s in self.s1_LOC: s1_arg_loc += s + ' ' s2_arg_loc = "" for s in self.s2_LOC: s2_arg_loc += s + ' ' if s1_arg_loc == s2_arg_loc and s1_arg_loc != '': self.value_loc = 1 elif s1_arg_loc == '' or s2_arg_loc == '': self.value_loc = 0.25 else: result = cosineSimilarity.compare(s1_arg_loc ,s2_arg_loc) if result == result: self.value_loc = result else: self.value_loc = 0.25
def __compute_arg3(self): #arg3 s1_arg3 = "" for s in self.s1_A3: s1_arg3 += s + ' ' s2_arg3 = "" for s in self.s2_A3: s2_arg3 += s + ' ' if s1_arg3 == s2_arg3 and s1_arg3 != '': self.value_arg3 = 1 elif s1_arg3 == '' or s2_arg3 == '': self.value_arg3 = 0.25 else: result = cosineSimilarity.compare(s1_arg3 ,s2_arg3) if result == result: self.value_arg3 = result else: self.value_arg3 = 0.25
def __compute_arg2(self): #arg2 s1_arg2 = "" for s in self.s1_A2: s1_arg2 += s + ' ' s2_arg2 = "" for s in self.s2_A2: s2_arg2 += s + ' ' if s1_arg2 == s2_arg2 and s1_arg2 != '': self.value_arg2 = 1 elif s1_arg2 == '' or s2_arg2 == '': self.value_arg2 = 0.25 else: result = cosineSimilarity.compare(s1_arg2 ,s2_arg2) if result == result: self.value_arg2 = result else: self.value_arg2 = 0.25
def __compute_arg1(self): #arg1 s1_arg1 = "" for s in self.s1_A1: s1_arg1 += s + ' ' s2_arg1 = "" for s in self.s2_A1: s2_arg1 += s + ' ' if s1_arg1 == s2_arg1 and s1_arg1 != '': self.value_arg1 = 1 elif s1_arg1 == '' or s2_arg1 == '': self.value_arg1 = 0.25 else: result = cosineSimilarity.compare(s1_arg1 ,s2_arg1) if result == result: self.value_arg1 = result else: self.value_arg1 = 0.25
def __compute_arg0(self): #arg0 s1_arg0 = "" for s in self.s1_A0: s1_arg0 += s + ' ' s2_arg0 = "" for s in self.s2_A0: s2_arg0 += s + ' ' if s1_arg0 == s2_arg0 and s1_arg0 != '': self.value_arg0 = 1 elif s1_arg0 == '' or s2_arg0 == '': self.value_arg0 = 0.25 else: result = cosineSimilarity.compare(s1_arg0 ,s2_arg0) if result == result: self.value_arg0 = result else: self.value_arg0 = 0.25