demo_iso-tei.xml 9.1 KB
<?xml version="1.0" encoding="UTF-8" ?>
<mtas>
    
    <!-- START MTAS INDEX CONFIGURATION -->
    <index>
        <!-- START GENERAL SETTINGS MTAS INDEX PROCESS -->
        <payload index="true" />
        <offset index="true" />
        <realoffset index="true" />
        <parent index="true" />
        <!-- END GENERAL SETTINGS MTAS INDEX PROCESS -->
    </index>
    <!-- END MTAS INDEX CONFIGURATION -->
    
    <!-- START CONFIGURATION MTAS ISO/TEI PARSER -->
    <parser name="mtas.analysis.parser.MtasTEIParser">
        
        <!-- START GENERAL SETTINGS MTAS ISO/TEI PARSER -->
        <autorepair value="true" />
        <makeunique value="true" />
        <!-- END GENERAL SETTINGS MTAS ISO/TEI PARSER -->
        
        <!-- START VARIABLES -->
        <variables>
            <variable name="when" value="interval">
                <value>
                    <item type="attribute" name="interval" />
                </value>
            </variable>
            <variable name="person" value="sex">
                <value>
                    <item type="attribute" name="sex" />
                </value>
            </variable>
        </variables>
        <!-- END VARIABLES -->
        
        <!-- START REFERENCES -->
        <!-- END REFERENCES -->
        
        <!-- START MAPPINGS -->
        <mappings>
            
            <!-- START WORDS -->
            <mapping type="word" name="w" start="#" end="#">
                <token type="string" offset="false" realoffset="false" parent="true">
                    <pre>
						<item type="string" value="w" />
					</pre>
                    <post>
                        <item type="text" />
                    </post>
                </token>
                <token type="string" offset="false" realoffset="false" parent="false">
                    <pre>
						<item type="string" value="w_lc" />
					</pre>
                    <post>
                        <item type="text" filter="ascii,lowercase" />
                    </post>
                </token>
                <token type="string" offset="false" realoffset="false" parent="true">
                    <pre>
                        <item type="string" value="w.id" />
                    </pre>
                    <post>
                        <item type="attribute" name="#" />
                    </post>
                </token> 
            </mapping>
            <mapping type="word" name="anchor" start="synch" end="synch">
                <token type="string" offset="false" realoffset="false" parent="false">
                    <pre>
						<item type="name" />
						<item type="string" value=".time" />
					</pre>
                    <post>
                        <item type="variableFromAttribute" name="interval" value="synch" />
                    </post>
                </token>
            </mapping>
            <mapping type="word" name="pause">
                <token type="string" offset="false" realoffset="false" parent="false">
                    <pre>
                        <item type="name" />
                    </pre>
                    <post>
                        <item type="attribute" name="type" />
                    </post>
                </token>
            </mapping>
            <mapping type="word" name="pc">
                <token type="string" offset="false" realoffset="false" parent="false">
                    <pre>
                        <item type="name" />
                    </pre>
                    <post>
                        <item type="text" />
                    </post>
                </token>
            </mapping>
            <mapping type="word" name="vocal"></mapping>
            <mapping type="word" name="incident"></mapping>
            <mapping type="word" name="kinesic"></mapping>
            <!-- END WORDS -->
            
            <!-- START WORD ANNOTATIONS -->
            <mapping type="wordAnnotation" name="desc">
                <token type="string" offset="false" realoffset="false" parent="false">
                    <pre>
            <item type="ancestorWordName" />
          </pre>
                    <post>
                        <item type="text" />
                    </post>
                </token>        
            </mapping>
            <!-- END WORD ANNOTATIONS -->
            
            <!-- START RELATIONS -->
            <!-- END RELATIONS -->
            
            
            <!-- START GROUPS -->
            <mapping type="group" name="annotationBlock" start="start"
                end="end">
                <token type="string" offset="false" realoffset="false" parent="false">
                    <pre>
						<item type="name" />
						<item type="string" value=".interval" />
					</pre>
                    <post>
                        <item type="variableFromAttribute" name="interval" value="start" />
                        <item type="variableFromAttribute" name="interval" value="end"
                            prefix=" - " />
                    </post>
                </token>
                <token type="string" offset="false" realoffset="false" parent="false">
                    <pre>
						<item type="name" />
						<item type="string" value=".sex" />
					</pre>
                    <post>
                        <item type="variableFromAttribute" name="sex" value="who" />
                    </post>
                </token>
                <token type="string" offset="false" realoffset="false" parent="true">
                    <pre>
                        <item type="string" value="annotationBlock.id" />
                    </pre>
                    <post>
                        <item type="attribute" name="#" />
                    </post>
                </token> 
            </mapping>
            <mapping type="group" name="u" >
                <token type="string" offset="false" realoffset="false" parent="true">
                    <pre>
                        <item type="name" />
                    </pre>
                </token>
                <token type="string" offset="false" realoffset="false" parent="true">
                    <pre>
                        <item type="string" value="u.id" />
                    </pre>
                    <post>
                        <item type="attribute" name="#" />
                    </post>
                </token> 
            </mapping>
            <mapping type="group" name="seg" >
                <token type="string" offset="false" realoffset="false" parent="true">
                    <pre>
                        <item type="name" />
                    </pre>
                </token>
            </mapping>
            <mapping type="group" name="choice" >
                <token type="string" offset="false" realoffset="false" parent="true">
                    <pre>
                        <item type="name" />
                    </pre>
                </token>
            </mapping>
            <mapping type="group" name="unclear" >
                <token type="string" offset="false" realoffset="false" parent="true">
                    <pre>
                        <item type="name" />
                    </pre>
                    <post>
                        <item type="attribute" name="reason" />
                    </post>
                </token>
            </mapping>
            <!-- END GROUPS -->
            
            <!-- START GROUP ANNOTATIONS -->
            <mapping type="groupAnnotation" name="spanGrp">
            </mapping>
            
            <mapping type="groupAnnotation" name="span" start="from" end="to">				
                <token type="string" offset="false" realoffset="false" parent="false">
                    <pre>
						<item type="name" />
						<item type="ancestorAttribute" distance="0" name="type"
							prefix="." />
						<item type="string" value=".interval" />
					</pre>
                    <post>
                        <item type="variableFromAttribute" name="interval" value="from" />
                        <item type="variableFromAttribute" name="interval" value="to"
                            prefix=" - " />
                    </post>
                </token>
            </mapping>
            
            <mapping type="groupAnnotation" name="span" start="from" end="to">
                <token type="string" offset="false" realoffset="false" parent="false">
                    <pre>
						<item type="ancestorAttribute" distance="0" name="type" />
					</pre>
                    <post>
                        <item type="text" />
                    </post>
                </token>				
            </mapping>
            <mapping type="groupAnnotation" name="gap" start="start" end="end">
                <token type="string" offset="false" realoffset="false" parent="false">
                    <pre>
						<item type="name" />
					</pre>
                    <post>
                        <item type="attribute" name="reason" />
                    </post>
                </token>				
            </mapping>
            
            <!-- END GROUP ANNOTATIONS -->
            
        </mappings>
        <!-- END MAPPINGS -->
        
    </parser>
    <!-- END CONFIGURATION MTAS ISO/TEI PARSER -->
    
</mtas>