From 7817b677c177a41244aee6dec3a3c8cca8866f26 Mon Sep 17 00:00:00 2001 From: "St.Huang" Date: Wed, 29 Aug 2018 01:32:43 +0800 Subject: [PATCH] fix #46 --- addons/fastwq/query/common.py | 2 +- addons21/fastwq/query/common.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/fastwq/query/common.py b/addons/fastwq/query/common.py index f055486..59264bf 100644 --- a/addons/fastwq/query/common.py +++ b/addons/fastwq/query/common.py @@ -272,5 +272,5 @@ def cloze_deletion(text, term): if not "{{" in text[word:word + len(term)] or "}}" in text[word:word + len(term)]: result = result[:word + len(term)] + "}}" + result[word + len(term):] result = result[:word] + "{{c" + str(index) + "::" + result[word:] - index += 1 + #index += 1 return result diff --git a/addons21/fastwq/query/common.py b/addons21/fastwq/query/common.py index fc2c66b..9587211 100644 --- a/addons21/fastwq/query/common.py +++ b/addons21/fastwq/query/common.py @@ -273,5 +273,5 @@ def cloze_deletion(text, term): if not "{{" in text[word:word + len(term)] or "}}" in text[word:word + len(term)]: result = result[:word + len(term)] + "}}" + result[word + len(term):] result = result[:word] + "{{c" + str(index) + "::" + result[word:] - index += 1 + #index += 1 return result