From fa4479af60dae03b6498ea1cb3c698000297a5a8 Mon Sep 17 00:00:00 2001 From: Luka Date: Thu, 26 Nov 2020 09:45:22 +0100 Subject: [PATCH] Fixed repeating words bug --- luscenje_struktur/component.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luscenje_struktur/component.py b/luscenje_struktur/component.py index 752479e..a9517a7 100644 --- a/luscenje_struktur/component.py +++ b/luscenje_struktur/component.py @@ -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