[Sv1-commits] SF.net SVN: sv1:[1664] annotation-converter
Brought to you by:
cannam
From: <ca...@us...> - 2009-10-20 16:16:47
|
Revision: 1664 http://sv1.svn.sourceforge.net/sv1/?rev=1664&view=rev Author: cannam Date: 2009-10-20 16:16:37 +0000 (Tue, 20 Oct 2009) Log Message: ----------- * base path, etc Modified Paths: -------------- annotation-converter/convert-all.sh annotation-converter/index-all.sh Modified: annotation-converter/convert-all.sh =================================================================== --- annotation-converter/convert-all.sh 2009-10-20 15:11:03 UTC (rev 1663) +++ annotation-converter/convert-all.sh 2009-10-20 16:16:37 UTC (rev 1664) @@ -5,10 +5,26 @@ if [ -d "$y/$x" ] ; then find "$y/$x" -type f -print | \ while read z ; do + args="" + args="-d `date '+%Y-%m-%d'`" case "$z" in + *chord*Beatles*) + echo "Confidence: High" + args="$args -c 0.95 -v 2.0";; + *beat*Beatles*|*chord*Zweieck*|*chord*Queen*|*key*Carole*|*key*Queen*|*key*Zweieck*|*beat*Zweieck*) + echo "Confidence: Moderate" + args="$args -c 0.8 -v 1.0";; + *chord*Carole*|*seglab*|*key*Beatles*) + echo "Confidence: Low" + args="$args -c 0.6 -v 1.0";; + *) + echo "***ERROR*** Confidence unknown!" + ;; + esac + case "$z" in *.lab|*.txt) - echo ; echo $z - ./converter "$z" -o "${z%.*}.ttl" + echo ; echo $z + ./converter $args "$z" -o "${z%.*}.ttl" ;; *) ;; esac @@ -21,8 +37,9 @@ cat /tmp/$$ | grep -v /all/ | grep -v allannotations | \ sed -e 's/^[^\/]*\/[^\/]*\///' -e 's/\.[^.]*$//' | \ sort | uniq | \ - while read stem; do + while read stem; do echo "stem is $stem" + args="-d `date '+%Y-%m-%d'`" mkdir -p "all/`dirname \"$stem\"`" rm -f "all/$stem.total" fgrep "$stem" /tmp/$$ | while read x; do @@ -30,7 +47,7 @@ cat "$x" >> "all/$stem.total" fi done - ./converter "all/$stem.total" -o "all/$stem.ttl" + ./converter $args "all/$stem.total" -o "all/$stem.ttl" rm -f "all/$stem.total" done Modified: annotation-converter/index-all.sh =================================================================== --- annotation-converter/index-all.sh 2009-10-20 15:11:03 UTC (rev 1663) +++ annotation-converter/index-all.sh 2009-10-20 16:16:37 UTC (rev 1664) @@ -11,13 +11,15 @@ esac } +hrefroot="/files/annotations/" + echo "<h2>Available annotations</h2><ul>" > ../index.html for x in *; do ( cd .. ; tar czf "$x Annotations.tar.gz" */"$x" ) ( - echo "<li><a href=\"$x.html\">$x</a><br>" >> ../index.html + echo "<li><a href=\"${hrefroot}$x.html\">$x</a><br>" >> ../index.html echo "<h2>$x</h2>" - echo "<a href=\"$x Annotations.tar.gz\">All $x annotations in a single tar.gz file</a>" + echo "<a href=\"${hrefroot}$x Annotations.tar.gz\">All $x annotations in a single tar.gz file</a>" firsttrack="yes" for y in "$x"/*; do if [ -d "$y" ]; then @@ -45,16 +47,16 @@ label $q echo ":" if [ -f "../$q/$base.txt" ]; then - echo "<a href=\"$q/$base.txt\">csv</a>" - echo "<a href=\"$q/$base.ttl\">rdf</a>" + echo "<a href=\"${hrefroot}$q/$base.txt\">csv</a>" + echo "<a href=\"${hrefroot}$q/$base.ttl\">rdf</a>" else - echo "<a href=\"${q}lab/$base.lab\">csv</a>" - echo "<a href=\"${q}lab/$base.ttl\">rdf</a>" + echo "<a href=\"${hrefroot}${q}lab/$base.lab\">csv</a>" + echo "<a href=\"${hrefroot}${q}lab/$base.ttl\">rdf</a>" fi if [ -f "../$q/$base.svl" ]; then - echo "<a href=\"$q/$base.svl\">svl</a>" + echo "<a href=\"${hrefroot}$q/$base.svl\">svl</a>" elif [ -f "../${q}lab/$base.svl" ]; then - echo "<a href=\"${q}lab/$base.svl\">svl</a>" + echo "<a href=\"${hrefroot}${q}lab/$base.svl\">svl</a>" fi case $q in seg) ;; @@ -63,7 +65,7 @@ fi done if [ -n "$all" ]; then - echo "<li>All of the above: <a href=\"all/$base.ttl\">rdf</a>" + echo "<li>All of the above: <a href=\"${hrefroot}all/$base.ttl\">rdf</a>" fi echo "</ul>" firsttrack="" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |