File size: 659 Bytes
fb6d339
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import json

with open("data/bigfive_questions_real.json", "r", encoding="utf-8") as f:
    data = json.load(f)

enhanced_data = []

for item in data:
    reverse = "(R)" in item["question"]
    clean_question = item["question"].replace("(R)", "").strip()
    enhanced_data.append({
        "id": item["id"],
        "trait": item["trait"],
        "question": clean_question,
        "reverse": reverse
    })

# Save to new file
with open("data/bigfive_questions_cleaned.json", "w", encoding="utf-8") as f:
    json.dump(enhanced_data, f, indent=2, ensure_ascii=False)

print("✅ Cleaned and saved to bigfive_questions_cleaned.json")