Skip to content

Commit

Permalink
Updated with new evaluate_xml bash script
Browse files Browse the repository at this point in the history
  • Loading branch information
apmcleod committed Mar 27, 2020
1 parent 8d3607b commit d5e2d11
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ To evaluate a time-aligned transcription and ground truth:

### Other File Formats
#### MusicXML
There is now a bash script that will perform this evaluation in one command: `evaluate_xml.bash gt.xml transcription.xml`

It automatically removes all of the intermediate files as well. If you would like to save them, you can remove those lines
from the script, or perform the process manually with the following steps:

1. Convert MusicXML into a text-based format:
`./MusicXMLParser/MusicXMLToFmt1x gt.xml gt_xml.txt`
(The C++ converter must be compiled first using `./compile.sh` in the `MusicXMLParser` directory.)
Expand Down
17 changes: 17 additions & 0 deletions evaluate_xml.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

if [ "$#" -ne 2 ]; then
echo "USAGE: evaluate.bash ref.xml transcription.xml"
exit 1
fi

./MusicXMLParser/MusicXMLToFmt1x $1 $1.txt
java -cp bin mv2h.tools.Converter -x <$1.txt >$1.conv.txt
rm $1.txt

./MusicXMLParser/MusicXMLToFmt1x $2 $2.txt
java -cp bin mv2h.tools.Converter -x <$2.txt >$2.conv.txt
rm $2.txt

java -cp bin mv2h.Main -g $1.conv.txt -t $2.conv.txt -a
rm $1.conv.txt $2.conv.txt

0 comments on commit d5e2d11

Please sign in to comment.