Fixed repeating words bug

This commit is contained in:
Luka 2020-11-26 09:45:22 +01:00
parent 25db8eeb7a
commit fa4479af60

View File

@ -111,7 +111,7 @@ class Component:
new_to_ret = []
for tr in to_ret:
# make sure that one word is not used twice in same to_ret
new_to_ret.extend([{**dict(tr), **m} for m in cmatch if any([m_v not in dict(tr).values() for m_v in m.values()])])
new_to_ret.extend([{**dict(tr), **m} for m in cmatch if all([m_v not in dict(tr).values() for m_v in m.values()])])
if len(new_to_ret) == 0:
return None
to_ret = new_to_ret