File:  [Repository] / ECHO_content / analyseAndTag / lemmatize.xsl
Revision 1.3: download - view: text, annotated - select for diffs - revision graph
Mon Sep 11 14:43:23 2006 UTC (17 years, 10 months ago) by dwinter
Branches: MAIN
CVS tags: cleanup, Root_cleanup, HEAD
verbesserung fŸr text unterstŸtzung, text kann jetzt aus url kommen, sprache bisher nur deutsch

    1: 
    2: <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:str="http://exslt.org/strings" extension-element-prefixes="str"
    3:   exclude-result-prefixes="str" xmlns:mpiwg="http://www.mpiwg-berlin.mpg.de/namespace">
    4: 	
    5: <xsl:template match="/" >
    6: <text>
    7:   <xsl:apply-templates />
    8: </text>
    9: </xsl:template>
   10: <xsl:template match="*">
   11: <xsl:apply-templates mode="body"/>
   12: </xsl:template>
   13: 
   14: <xsl:template match="text()" mode="body">
   15: <xsl:variable name="tokenizedSample" select="str:tokenize(.)"/>
   16:     <xsl:for-each select="$tokenizedSample">
   17:       <mpiwg:w><xsl:attribute name="lang">de</xsl:attribute><xsl:value-of select="."/></mpiwg:w>      
   18:     </xsl:for-each>
   19: </xsl:template>
   20: 
   21: <xsl:template match="head" mode="body"/>
   22: 
   23: <xsl:template match="*" mode="body">
   24: <!--<xsl:element name="{local-name()}">-->
   25: <xsl:copy>
   26: <xsl:for-each select="@*"><xsl:copy/></xsl:for-each>
   27: <xsl:apply-templates mode="body"/>
   28: </xsl:copy>
   29: </xsl:template>
   30: 
   31: </xsl:stylesheet>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>