Skip to content
Snippets Groups Projects
Commit 0b8e87cb authored by Jettka, Daniel's avatar Jettka, Daniel
Browse files

changed temp file extension to usas

parent 2200cfe6
No related branches found
No related tags found
No related merge requests found
#!/bin/bash #!/bin/bash
java -jar software/saxon9he.jar usas-annotation/insert-usas-annotations.xsl -xsl:usas-annotation/insert-usas-annotations.xsl java -jar software/saxon9he.jar usas-annotation/insert-usas-annotations.xsl -xsl:usas-annotation/insert-usas-annotations.xsl
for file in $(find corpora/ -name '*.exbu') for file in $(find corpora/ -name '*.usas')
do do
mv $file $(echo "$file" | sed -r 's|.exbu|.exb|g') mv $file $(echo "$file" | sed -r 's|.usas|.exb|g')
done done
\ No newline at end of file
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<xsl:copy-of select="document(.)//*:u"/> <xsl:copy-of select="document(.)//*:u"/>
</xsl:for-each> </xsl:for-each>
</xsl:variable> </xsl:variable>
<xsl:variable name="result-files-extension" select="'.exbu'"/> <xsl:variable name="result-files-extension" select="'.usas'"/>
<!-- Keys --> <!-- Keys -->
<xsl:key name="words" match="w" use="concat(../@file-ref, '#', ../@tier-category, '#', ../@speaker, '#', ../@start, '#', ../@end)"/> <xsl:key name="words" match="w" use="concat(../@file-ref, '#', ../@tier-category, '#', ../@speaker, '#', ../@start, '#', ../@end)"/>
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
<xsl:variable name="doc" select="document($file-ref)"/> <xsl:variable name="doc" select="document($file-ref)"/>
<!-- overwrite the document --> <!-- overwrite the document -->
<xsl:for-each select="$doc"> <xsl:for-each select="$doc">
<xsl:result-document href="{concat(replace($file-ref, '\.exb$', ''), $result-files-extension)}"> <xsl:result-document href="{concat(string-join(tokenize($file-ref, '\.')[position() != last()], '.'), $result-files-extension)}">
<xsl:apply-templates/> <xsl:apply-templates/>
</xsl:result-document> </xsl:result-document>
</xsl:for-each> </xsl:for-each>
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
</spanGrp> </spanGrp>
</xsl:for-each> </xsl:for-each>
<xsl:message select="concat('*** Inserted USAS tier/s for speaker ', $speaker, ' in file ', base-uri())"/> <xsl:message select="concat('*** Inserted USAS tier/s for speaker ', $speaker, ' in file ', concat(string-join(tokenize(base-uri(), '\.')[position() != last()], '.'), $result-files-extension))"/>
</xsl:template> </xsl:template>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment