SushantGautam
commited on
Commit
•
e731661
1
Parent(s):
693ca0a
Update SoccerNet-Echoes.py
Browse files- SoccerNet-Echoes.py +2 -3
SoccerNet-Echoes.py
CHANGED
@@ -99,12 +99,11 @@ class FootballASRDataset(datasets.GeneratorBasedBuilder):
|
|
99 |
with open(os.path.join(root, file), encoding="utf-8") as f:
|
100 |
data = json.load(f)
|
101 |
for segment_index, segment_data in data["segments"].items():
|
102 |
-
|
103 |
yield f"{file}_{segment_index}", {
|
104 |
"segment_index": str(segment_index),
|
105 |
"start_time": segment_data[0],
|
106 |
"end_time": segment_data[1],
|
107 |
"transcribed_text": segment_data[2],
|
108 |
-
"game":
|
109 |
-
|
110 |
}
|
|
|
99 |
with open(os.path.join(root, file), encoding="utf-8") as f:
|
100 |
data = json.load(f)
|
101 |
for segment_index, segment_data in data["segments"].items():
|
102 |
+
filename= "/".join(root.split("/")[-3:])+"/"+str(file[0])
|
103 |
yield f"{file}_{segment_index}", {
|
104 |
"segment_index": str(segment_index),
|
105 |
"start_time": segment_data[0],
|
106 |
"end_time": segment_data[1],
|
107 |
"transcribed_text": segment_data[2],
|
108 |
+
"game": filename,
|
|
|
109 |
}
|