From 361d4eb1d497b49b27c68d41fca20588c75e73d4 Mon Sep 17 00:00:00 2001 From: hediehloo Date: Tue, 2 Dec 2025 15:57:26 +0000 Subject: [PATCH] num_query_word --- src/configuration.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/configuration.py b/src/configuration.py index 5d69d91..ab8477c 100644 --- a/src/configuration.py +++ b/src/configuration.py @@ -179,7 +179,13 @@ Ensure to generate only the JSON output with content in English. # for key in data: # example[key] = data[key] - config["length"] = random.choice([5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 40, 60, 80, 100, 150]) + num_query_word = [5, 5, 6, 6, 7, 7, 8, 9, 10, 12, 14, 16, 18, 20, 40, 60, 80, 100, 150] + while True: + config["length"] = random.choice(num_query_word) + if config["length"] * 3 < len(passage): + break + if config["length"] == min(num_query_word): + break return config