Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
berndmoos committed Nov 5, 2024
1 parent 651d82b commit 52b463e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@
<xsl:choose>
<xsl:when test="//ts[@n='cGAT:w']">cGAT</xsl:when>
<xsl:when test="//ts[@n='GEN:w']">GEN</xsl:when>
<!-- added 05-11-2024 for issue #497 -->
<xsl:when test="//ts[@n='INEL:w']">INEL</xsl:when>
<xsl:otherwise>HIAT</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="SEGMENTATION_NAME">
<xsl:choose>
<xsl:when test="$SEGMENTATION='cGAT'">SpeakerContribution_Word</xsl:when>
<xsl:when test="$SEGMENTATION='GEN'">SpeakerContribution_Word</xsl:when>
<!-- added 05-11-2024 for issue #497 -->
<xsl:when test="$SEGMENTATION='INEL'">SpeakerContribution_Utterance_Word</xsl:when>
<xsl:otherwise>SpeakerContribution_Utterance_Word</xsl:otherwise>
</xsl:choose>
</xsl:variable>
Expand Down Expand Up @@ -82,6 +86,25 @@
</xsl:attribute>
</xsl:element>
</xsl:if>

<!-- ********** FOR INEL ONLY *************** -->

<!-- added 05-11-2024 for issue #497 -->
<xsl:if test="$SEGMENTATION='INEL'">
<xsl:element name="count">
<xsl:attribute name="segment-name">Utterances</xsl:attribute>
<xsl:attribute name="count">
<xsl:value-of select="count(*//ts[@n='INEL:u'])"/>
</xsl:attribute>
</xsl:element>
<xsl:element name="count">
<xsl:attribute name="segment-name">Punctuation</xsl:attribute>
<xsl:attribute name="count">
<xsl:value-of select="count(*//nts[@n='INEL:ip'])"/>
</xsl:attribute>
</xsl:element>
</xsl:if>

</xsl:element>
</xsl:for-each>
</xsl:element>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class SegmentsCounter {
String currentFilename;
Element currentElement;
int count = 0;
private HashSet<String> errorList = new HashSet<String>();
private HashSet<String> errorList = new HashSet<>();

public SegmentsCounter() throws JDOMException, IOException {
Document xslDocument = new IOUtilities()
Expand Down

0 comments on commit 52b463e

Please sign in to comment.