While trying to assert fact with single quote ' in input string, swi-prolog gives this error:
raise PrologError("".join(["Caused by: '", query, "'."]))
pyswip.prolog.PrologError: Caused by: 'assertz((fact('kh'an'))).'.
This is python snippet where error occurs:
linkage = "linkage('"+str(read_str.lower())+"', '"+ str(sub_link) +"')"
self.prolog_rule_identify.assertz(linkage)
for read_str as today's date, Men's wear etc