-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenerate_fake_test.py
47 lines (41 loc) · 1.47 KB
/
generate_fake_test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import random
import pandas as pd
adjectives = [
"beautiful", "enchanting", "mysterious", "serene",
"vibrant", "ancient", "modern", "bustling", "tranquil", "majestic"
]
nouns = [
"forest", "city", "ocean", "mountain", "sky",
"river", "desert", "valley", "meadow", "canyon"
]
verbs = [
"walking", "exploring", "traveling", "wandering", "observing",
"studying", "photographing", "painting", "writing about", "researching"
]
places = [
"Europe", "Asia", "Africa", "North America", "South America",
"Antarctica", "Australia", "the Arctic", "the Caribbean", "the Middle East"
]
def generate_long_sentences():
sentences = []
while len(sentences) < 100:
sentence = "A {} {} in {} is known for its {}, where people often enjoy {} and {} the {}. This place, with its {} and {}, is a perfect example of {} and {}.".format(
random.choice(adjectives),
random.choice(nouns),
random.choice(places),
random.choice(nouns),
random.choice(verbs),
random.choice(verbs),
random.choice(nouns),
random.choice(adjectives),
random.choice(adjectives),
random.choice(nouns),
random.choice(nouns)
)
if len(sentence) >= 100:
sentences.append(sentence)
return sentences
long_sentences = generate_long_sentences()
data = pd.DataFrame({})
data["text"] = long_sentences
data.to_csv("fake_test_essays.csv", index=False)