Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix errors in scripts for dataset creation
- Loading branch information
1 parent
568348c
commit b0e04fc
Showing
3 changed files
with
29 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# A python script that creates 'test.fileids' file | ||
# for a certain dataset. This file contains the id | ||
# of each file in the dataset in the form dataset_{id}. | ||
|
||
import sys | ||
|
||
f = open("test.fileids", 'w') | ||
|
||
name = raw_input("Give dataset: ") | ||
if (name != "radio" and name != "paramythi"): | ||
sys.exit("Wrong dataset (should be either radio or paramythi)") | ||
name = name.strip('\n') + "_" | ||
|
||
n = int(input("Give number of examples: ")) | ||
|
||
for i in range(n): | ||
if name == "radio_": | ||
f.write(name + format(i, '02d') + '\n') | ||
if name == "paramythi_": | ||
f.write("Paramythi_horis_onoma_" + format(i, '04d') + '\n') | ||
f.close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters