|
From: Fredrik K. <fre...@li...> - 2004-07-11 08:08:33
|
Dear list,
I'm using the precompiled version of agtk for linux and want to load som
files in the XLabel format. This is a example file:
signal F10_2002-08-28m_511_1_sto
type 0
color 121
comment created using WaveSurfer ons jan 14 15:22:52 2004
font -misc-*-bold-*-*-*-15-*-*-*-*-*-*-*
separator ;
nfields 1
#
0.179313 121
0.273842 121 s
0.407352 121 t
0.796188 121 Oo
When I parse this file and look at the XML tree, I find that an anchor
is missing:
<?xml version="1.0"?>
<!DOCTYPE AGSet SYSTEM "ag.dtd">
<AGSet id="TIMIT" version="1.0"
xmlns="http://www.ldc.upenn.edu/atlas/ag/"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:dc="http://purl.org/DC/documents/rec-dces-19990702.htm">
<Metadata>
</Metadata>
<Timeline id="TIMIT:T1">
</Timeline>
<AG id="TIMIT:1" timeline="TIMIT:T1">
<Anchor id="TIMIT:1:1" offset="0.000000"></Anchor>
<Anchor id="TIMIT:1:2" offset="0.407352"></Anchor>
<Anchor id="TIMIT:1:3" offset="0.796188"></Anchor>
<Annotation id="TIMIT:1:E1" type="" start="TIMIT:1:1" end="TIMIT:1:2">
<Feature name="label">t</Feature>
</Annotation>
<Annotation id="TIMIT:1:E2" type="" start="TIMIT:1:2" end="TIMIT:1:3">
<Feature name="label">Oo</Feature>
</Annotation>
</AG>
</AGSet>
Strangelly enough, it is the second one that has been removed, and also
the second annotation! (The 's' in this case).
If I insert an '_' instead of the empty label in the labelfile, I ge the
correct output:
<?xml version="1.0"?>
<!DOCTYPE AGSet SYSTEM "ag.dtd">
<AGSet id="TIMIT" version="1.0"
xmlns="http://www.ldc.upenn.edu/atlas/ag/"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:dc="http://purl.org/DC/documents/rec-dces-19990702.htm">
<Metadata>
</Metadata>
<Timeline id="TIMIT:T1">
</Timeline>
<AG id="TIMIT:1" timeline="TIMIT:T1">
<Anchor id="TIMIT:1:1" offset="0.000000"></Anchor>
<Anchor id="TIMIT:1:2" offset="0.273842"></Anchor>
<Anchor id="TIMIT:1:3" offset="0.407352"></Anchor>
<Anchor id="TIMIT:1:4" offset="0.796188"></Anchor>
<Annotation id="TIMIT:1:E1" type="" start="TIMIT:1:1" end="TIMIT:1:2">
<Feature name="label">s</Feature>
</Annotation>
<Annotation id="TIMIT:1:E2" type="" start="TIMIT:1:2" end="TIMIT:1:3">
<Feature name="label">t</Feature>
</Annotation>
<Annotation id="TIMIT:1:E3" type="" start="TIMIT:1:3" end="TIMIT:1:4">
<Feature name="label">Oo</Feature>
</Annotation>
</AG>
</AGSet>
Checking the sources, it seems like 'xre2' of XLabelFile.cc would handle
this case OK, but it doesn't seem to work anyway. Or perhaps I'm doing
something stupid.
Yours,
/Fredrik Karlsson
|