num_query_word
This commit is contained in:
parent
fe1211a907
commit
361d4eb1d4
@ -179,7 +179,13 @@ Ensure to generate only the JSON output with content in English.
|
|||||||
# for key in data:
|
# for key in data:
|
||||||
# example[key] = data[key]
|
# 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
|
return config
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user