[gtalk-dev 0005] CVS update: chaone

Back to archive index

galat****@lists***** galat****@lists*****
2006年 10月 22日 (日) 14:42:02 JST


Index: chaone/accent.xsl
diff -u chaone/accent.xsl:1.1.1.1 chaone/accent.xsl:1.2
--- chaone/accent.xsl:1.1.1.1	Thu Sep 14 14:45:38 2006
+++ chaone/accent.xsl	Sun Oct 22 14:42:02 2006
@@ -3,8 +3,9 @@
 <!-- XSLT stylesheet for ChaOne              -->
 <!--                     for msxml and exslt -->
 <!--  (3) Accent Combination                 -->
-<!--                            ver. 1.2.0b6 -->
-<!--                2006-07-25 by Studio ARC -->
+<!--                            ver. 1.3.0a1 -->
+<!--                        for UniDic 1.2.0 -->
+<!--                2006-10-12 by Studio ARC -->
 <!-- Copyright (c) 2004-2006 Studio ARC      -->
 
 <xsl:stylesheet
@@ -29,6 +30,13 @@
     <xsl:apply-templates />
   </xsl:template>
 
+  <xsl:template match="*">
+    <xsl:copy>
+      <xsl:copy-of select="@*"/>
+      <xsl:apply-templates/>
+    </xsl:copy>
+  </xsl:template>
+
   <xsl:template match="S">
     <xsl:variable name="ws">
       <xsl:apply-templates mode="preap"/>
@@ -385,9 +393,9 @@
       <xsl:attribute name="silence">
         <xsl:variable name="spos" select="$ap/*[1]/@pos"/>
         <xsl:choose>
-          <xsl:when test="($spos = '‚»‚Ì‘¼-“Ç“_') or ($spos = '‚»‚Ì‘¼-Š‡ŒÊŠJ') or ($spos = '‚»‚Ì‘¼-Š‡ŒÊ•Â') or ((self::SILENCE)
+          <xsl:when test="($spos = '•â•‹L†-“Ç“_') or ($spos = '•â•‹L†-Š‡ŒÊŠJ') or ($spos = '•â•‹L†-Š‡ŒÊ•Â') or ((self::SILENCE)
 and ($term = 'after'))">PAU</xsl:when>
-          <xsl:when test="$spos = '‚»‚Ì‘¼-‹å“_'">SILE</xsl:when>
+          <xsl:when test="$spos = '•â•‹L†-‹å“_'">SILE</xsl:when>
           <xsl:otherwise>NON</xsl:otherwise>
         </xsl:choose>
       </xsl:attribute>
Index: chaone/ap_rule.xml
diff -u chaone/ap_rule.xml:1.1.1.1 chaone/ap_rule.xml:1.2
--- chaone/ap_rule.xml:1.1.1.1	Thu Sep 14 14:44:13 2006
+++ chaone/ap_rule.xml	Sun Oct 22 14:42:02 2006
@@ -2,8 +2,9 @@
 
 <!-- ƒAƒNƒZƒ“ƒg‹åŒ‹‡‹K‘¥               -->
 <!--                    used in ChaOne  -->
-<!--           2005-03-24 by Studio ARC -->
-<!-- Copyright (c) 2005 Studio ARC      -->
+<!--                   for UniDic 1.2.0 -->
+<!--           2006-10-18 by Studio ARC -->
+<!-- Copyright (c) 2005-2006 Studio ARC -->
 
 <ap_rule>
 
@@ -24,14 +25,6 @@
 <!-- ‹£‡‚·‚é‹K‘¥‚ª‚ ‚Á‚½ê‡‚́A           -->
 <!-- ƒŠƒXƒgã‚Őæ‚ɏoŒ»‚µ‚½‚à‚Ì‚ª—Dæ‚³‚ê‚é -->
 
-<!-- ƒtƒBƒ‰[‚Í’P“Ƃ̃AƒNƒZƒ“ƒg‹å‚É -->
-<rule id="0" priority="1">
-  <cond>
-    <current pos="Š´“®ŽŒ-ƒtƒBƒ‰["/>
-  </cond>
-  <then ap="alone"/>
-</rule>
-
 <!-- 'H' ‚Ì‘O‚͕ʂ̃AƒNƒZƒ“ƒg‹å‚É -->
 <rule id="1" priority="50">
   <cond>
@@ -54,8 +47,8 @@
 <rule id="3-1" priority="48">
   <cond>
     <or>
-      <current pos="‚»‚Ì‘¼-‹å“_"/>
-      <current pos="‚»‚Ì‘¼-“Ç“_"/>
+      <current pos="•â•‹L†-‹å“_"/>
+      <current pos="•â•‹L†-“Ç“_"/>
     </or>
   </cond>
   <then ap="alone"/>
@@ -65,20 +58,62 @@
 <rule id="3-2" priority="48">
   <cond>
     <or>
-      <current pos="‚»‚Ì‘¼-Š‡ŒÊŠJ"/>
-      <current pos="‚»‚Ì‘¼-Š‡ŒÊ•Â"/>
+      <current pos="•â•‹L†-Š‡ŒÊŠJ"/>
+      <current pos="•â•‹L†-Š‡ŒÊ•Â"/>
     </or>
   </cond>
   <then ap="alone"/>
 </rule>
 
-<!-- “®ŽŒ-”ñŽ©—§ (‚¢‚éA‚È‚Ç) AŒ`—eŽŒ-”ñŽ©—§‚Í‘O‚É‚­‚Á‚‚¯‚é -->
-<rule id="4" priority="46">
+<!-- “®ŽŒ-”ñŽ©—§‚Í“®ŽŒ‚̘A—pŒ`CƒT•Ï‰Â”\–¼ŽŒCÚ‘±•ŽŒu‚āvu‚Łv‚ɐڑ±‚·‚éê‡‚É‘O‚É‚­‚Á‚‚¯‚é -->
+<rule id="4-1" priority="46">
   <cond>
-    <or>
+    <and>
       <current pos="“®ŽŒ-”ñŽ©—§‰Â”\"/>
+      <or>
+        <and>
+          <pre pos="“®ŽŒ"/>
+          <pre cForm="˜A—pŒ`"/>
+        </and>
+        <pre pos="–¼ŽŒ-•’Ê–¼ŽŒ-ƒT•Ï‰Â”\"/>
+        <and>
+          <pre pos="•ŽŒ-Ú‘±•ŽŒ"/>
+          <pre orth="‚Ä"/>
+        </and>
+        <and>
+          <pre pos="•ŽŒ-Ú‘±•ŽŒ"/>
+          <pre orth="‚Å"/>
+        </and>
+      </or>
+    </and>
+  </cond>
+  <then ap="cont"/>
+</rule>
+
+<!-- Œ`—eŽŒ-”ñŽ©—§‚Í“®ŽŒ‚̘A—pŒ`‚âÚ‘±•ŽŒu‚āvu‚Łv‚ɐڑ±‚·‚éê‡‚É‘O‚É‚­‚Á‚‚¯‚é -->
+<rule id="4-2" priority="46">
+  <cond>
+    <and>
       <current pos="Œ`—eŽŒ-”ñŽ©—§‰Â”\"/>
-    </or>
+      <or>
+        <and>
+          <pre pos="“®ŽŒ"/>
+          <pre cForm="˜A—pŒ`"/>
+        </and>
+        <and>
+          <pre pos="Œ`—eŽŒ"/>
+          <pre cForm="˜A—pŒ`"/>
+        </and>
+        <and>
+          <pre pos="•ŽŒ-Ú‘±•ŽŒ"/>
+          <pre orth="‚Ä"/>
+        </and>
+        <and>
+          <pre pos="•ŽŒ-Ú‘±•ŽŒ"/>
+          <pre orth="‚Å"/>
+        </and>
+      </or>
+    </and>
   </cond>
   <then ap="cont"/>
 </rule>
Index: chaone/chaone_t_main.xsl
diff -u chaone/chaone_t_main.xsl:1.1.1.1 chaone/chaone_t_main.xsl:1.2
--- chaone/chaone_t_main.xsl:1.1.1.1	Thu Sep 14 14:44:58 2006
+++ chaone/chaone_t_main.xsl	Sun Oct 22 14:42:02 2006
@@ -2,14 +2,15 @@
 
 <!-- XSLT stylesheet for ChaOne              -->
 <!--                     for msxml and exslt -->
-<!--                            ver. 1.2.0b5 -->
+<!--                            ver. 1.3.0a1 -->
+<!--                        for UniDic 1.2.0 -->
 <!-- ChaOne consists of the followings;      -->
 <!--  (0) preprocessing                      -->
 <!--  (1) ChaSen Chunker                     -->
 <!--  (2) Phonetic Alternation               -->
 <!--  (3) Accent Combination                 -->
-<!--                2005-07-09 by Studio ARC -->
-<!-- Copyright (c) 2004-2005 Studio ARC      -->
+<!--                2006-10-12 by Studio ARC -->
+<!-- Copyright (c) 2004-2006 Studio ARC      -->
 
 <!-- This program is based on the product    -->
 <!--   developed in IPA project 1999-2002    -->
@@ -47,8 +48,10 @@
 
   <xsl:variable name="ea_symbol_table" select="document('ea_symbol_table.xml')/ea_symbol_table"/>
   <xsl:variable name="chunk_rules" select="document('chunk_rules.xml')/chunk_rules"/>
-  <xsl:variable name="IPAForm_table" select="document('IPAForm.xml')/IPAForm_table"/>
-  <xsl:variable name="FPAForm_table" select="document('FPAForm.xml')/FPAForm_table"/>
+  <xsl:variable name="IPA_table" select="document('IPAfn.xml')"/>
+  <xsl:variable name="FPA_table" select="document('FPAfn.xml')"/>
+  <xsl:key name="IPAfn" match="ifn" use="concat(@iType, @iForm, @iConType)"/>
+  <xsl:key name="FPAfn" match="ffn" use="concat(@fType, @fForm, @fConType)"/>
   <xsl:variable name="pos_list" select="document('grammar.xml')"/>
   <xsl:variable name="pa_word_list" select="document('pa_word.xml')"/>
   <xsl:key name="pos" match="pos" use="@ipadic"/>
@@ -65,7 +68,14 @@
         <xsl:apply-templates select="." mode="text"/>
       </xsl:message>
     </xsl:if>
-    <xsl:apply-templates select="S"/>
+    <xsl:apply-templates/>
+  </xsl:template>
+
+  <xsl:template match="*">
+    <xsl:copy>
+      <xsl:copy-of select="@*"/>
+      <xsl:apply-templates/>
+    </xsl:copy>
   </xsl:template>
 
   <xsl:template match="S">
Index: chaone/chunk_rules.xml
diff -u chaone/chunk_rules.xml:1.1.1.1 chaone/chunk_rules.xml:1.2
--- chaone/chunk_rules.xml:1.1.1.1	Thu Sep 14 14:41:42 2006
+++ chaone/chunk_rules.xml	Sun Oct 22 14:42:02 2006
@@ -1,14 +1,20 @@
 <?xml version="1.0" encoding="Shift_JIS"?>
 
+<!-- ƒ`ƒƒƒ“ƒJ[Œ‹‡‹K‘¥                 -->
+<!--                    used in ChaOne  -->
+<!--                   for UniDic 1.2.0 -->
+<!--           2006-10-11 by Studio ARC -->
+<!-- Copyright (c) 2005-2006 Studio ARC -->
+
 <chunk_rules>
   <rule id="1">
-    <!-- –¼ŽŒ-•’Ê–¼ŽŒ-ˆê”Ê ::= (Ú“ªŽ«-–¼ŽŒÚ‘±-.*)? (–¼ŽŒ-.*)* –¼ŽŒ-•’Ê–¼ŽŒ-ˆê”Ê -->
+    <!-- –¼ŽŒ-•’Ê–¼ŽŒ-ˆê”Ê ::= (Ú“ªŽ«)? (–¼ŽŒ-.*)* –¼ŽŒ-•’Ê–¼ŽŒ-ˆê”Ê -->
     <lhs>
       <W2 pos="–¼ŽŒ-•’Ê–¼ŽŒ-ˆê”Ê"/>
     </lhs>
     <rhs>
       <optional>
-        <W1 pos="Ú“ªŽ«-–¼ŽŒÚ‘±-"/>
+        <W1 pos="Ú“ªŽ«"/>
       </optional>
       <zeroOrMore>
         <W1 pos="–¼ŽŒ-"/>
@@ -17,13 +23,13 @@
     </rhs>
   </rule>
   <rule id="2">
-    <!-- –¼ŽŒ-•’Ê–¼ŽŒ-ˆê”Ê ::= (Ú“ªŽ«-–¼ŽŒÚ‘±-.*)? (–¼ŽŒ-.*|“®ŽŒ-.*|Œ`—eŽŒ-.*)* (•“®ŽŒ)* (Ú”öŽ«-–¼ŽŒ“I-.*)* Ú”öŽ«-–¼ŽŒ“I-ˆê”Ê -->
+    <!-- –¼ŽŒ-•’Ê–¼ŽŒ-ˆê”Ê ::= (Ú“ªŽ«)? (–¼ŽŒ-.*|“®ŽŒ-.*|Œ`—eŽŒ-.*)* (•“®ŽŒ)* (Ú”öŽ«-–¼ŽŒ“I-.*)* Ú”öŽ«-–¼ŽŒ“I-ˆê”Ê -->
     <lhs>
       <W2 pos="–¼ŽŒ-•’Ê–¼ŽŒ-ˆê”Ê"/>
     </lhs>
     <rhs>
       <optional>
-        <W1 pos="Ú“ªŽ«-–¼ŽŒÚ‘±-"/>
+        <W1 pos="Ú“ªŽ«"/>
       </optional>
       <zeroOrMore>
         <choice>
@@ -42,13 +48,13 @@
     </rhs>
   </rule>
   <rule id="3">
-    <!-- –¼ŽŒ-•’Ê–¼ŽŒ-ƒT•Ï‰Â”\ ::= (Ú“ªŽ«-–¼ŽŒÚ‘±-.*)? (–¼ŽŒ-.*)* –¼ŽŒ-•’Ê–¼ŽŒ-ƒT•Ï‰Â”\ -->
+    <!-- –¼ŽŒ-•’Ê–¼ŽŒ-ƒT•Ï‰Â”\ ::= (Ú“ªŽ«)? (–¼ŽŒ-.*)* –¼ŽŒ-•’Ê–¼ŽŒ-ƒT•Ï‰Â”\ -->
     <lhs>
       <W2 pos="–¼ŽŒ-•’Ê–¼ŽŒ-ƒT•Ï‰Â”\"/>
     </lhs>
     <rhs>
       <optional>
-        <W1 pos="Ú“ªŽ«-–¼ŽŒÚ‘±-"/>
+        <W1 pos="Ú“ªŽ«"/>
       </optional>
       <zeroOrMore>
         <W1 pos="–¼ŽŒ-"/>
@@ -57,13 +63,13 @@
     </rhs>
   </rule>
   <rule id="4">
-    <!-- –¼ŽŒ-•’Ê–¼ŽŒ-ƒT•Ï‰Â”\ ::= (Ú“ªŽ«-–¼ŽŒÚ‘±-.*)? (–¼ŽŒ-.*|“®ŽŒ-.*|Œ`—eŽŒ-.*)* (•“®ŽŒ)* (Ú”öŽ«-–¼ŽŒ“I-.*)* Ú”öŽ«-–¼ŽŒ“I-ƒT•Ï‰Â”\ -->
+    <!-- –¼ŽŒ-•’Ê–¼ŽŒ-ƒT•Ï‰Â”\ ::= (Ú“ªŽ«)? (–¼ŽŒ-.*|“®ŽŒ-.*|Œ`—eŽŒ-.*)* (•“®ŽŒ)* (Ú”öŽ«-–¼ŽŒ“I-.*)* Ú”öŽ«-–¼ŽŒ“I-ƒT•Ï‰Â”\ -->
     <lhs>
       <W2 pos="–¼ŽŒ-•’Ê–¼ŽŒ-ƒT•Ï‰Â”\"/>
     </lhs>
     <rhs>
       <optional>
-        <W1 pos="Ú“ªŽ«-–¼ŽŒÚ‘±-"/>
+        <W1 pos="Ú“ªŽ«"/>
       </optional>
       <zeroOrMore>
         <choice>
@@ -82,28 +88,28 @@
     </rhs>
   </rule>
   <rule id="5">
-    <!-- –¼ŽŒ-•’Ê–¼ŽŒ-Œ`óŽŒ‰Â”\ ::= (Ú“ªŽ«-–¼ŽŒÚ‘±-.*)? (–¼ŽŒ-.*)* –¼ŽŒ-•’Ê–¼ŽŒ-Œ`óŽŒ‰Â”\ -->
+    <!-- –¼ŽŒ-•’Ê–¼ŽŒ-Œ`óŽŒ‰Â”\ ::= (Ú“ªŽ«)? (–¼ŽŒ-.*)* –¼ŽŒ-•’Ê–¼ŽŒ-Œ`óŽŒ‰Â”\ -->
     <lhs>
       <W2 pos="–¼ŽŒ-•’Ê–¼ŽŒ-Œ`óŽŒ‰Â”\"/>
     </lhs>
     <rhs>
       <optional>
-        <W1 pos="Ú“ªŽ«-–¼ŽŒÚ‘±-"/>
+        <W1 pos="Ú“ªŽ«"/>
       </optional>
       <zeroOrMore>
         <W1 pos="–¼ŽŒ-"/>
       </zeroOrMore>
-      <W1 pos="–¼ŽŒ-•’Ê–¼ŽŒ-Œ`óŽŒ‰Â”\" zzz="1"/>
+      <W1 pos="–¼ŽŒ-•’Ê–¼ŽŒ-Œ`óŽŒ‰Â”\"/>
     </rhs>
   </rule>
   <rule id="6">
-    <!-- –¼ŽŒ-•’Ê–¼ŽŒ-Œ`óŽŒ‰Â”\ ::= (Ú“ªŽ«-–¼ŽŒÚ‘±-.*)? (–¼ŽŒ-.*|“®ŽŒ-.*|Œ`—eŽŒ-.*)* (•“®ŽŒ)* (Ú”öŽ«-–¼ŽŒ“I-.*)* Ú”öŽ«-–¼ŽŒ“I-Œ`óŽŒ‰Â”\ -->
+    <!-- –¼ŽŒ-•’Ê–¼ŽŒ-Œ`óŽŒ‰Â”\ ::= (Ú“ªŽ«)? (–¼ŽŒ-.*|“®ŽŒ-.*|Œ`—eŽŒ-.*)* (•“®ŽŒ)* (Ú”öŽ«-–¼ŽŒ“I-.*)* Ú”öŽ«-–¼ŽŒ“I-Œ`óŽŒ‰Â”\ -->
     <lhs>
       <W2 pos="–¼ŽŒ-•’Ê–¼ŽŒ-Œ`óŽŒ‰Â”\"/>
     </lhs>
     <rhs>
       <optional>
-        <W1 pos="Ú“ªŽ«-–¼ŽŒÚ‘±-"/>
+        <W1 pos="Ú“ªŽ«"/>
       </optional>
       <zeroOrMore>
         <choice>
@@ -122,34 +128,31 @@
     </rhs>
   </rule>
   <rule id="7">
-    <!-- –¼ŽŒ-•’Ê–¼ŽŒ-•›ŽŒ‰Â”\ ::= (Ú“ªŽ«-–¼ŽŒÚ‘±-.*)? (–¼ŽŒ-”ŽŒ-ˆê”Ê)+ (–¼ŽŒ-”ŽŒ-Œ…)? (Ú”öŽ«-–¼ŽŒ“I-•”ŽŒ)* -->
+    <!-- –¼ŽŒ-•’Ê–¼ŽŒ-•›ŽŒ‰Â”\ ::= (Ú“ªŽ«)? (–¼ŽŒ-”ŽŒ)+ (Ú”öŽ«-–¼ŽŒ“I-•”ŽŒ)* -->
     <lhs>
       <W2 pos="–¼ŽŒ-•’Ê–¼ŽŒ-•›ŽŒ‰Â”\"/>
     </lhs>
     <rhs>
       <optional>
-        <W1 pos="Ú“ªŽ«-–¼ŽŒÚ‘±-"/>
+        <W1 pos="Ú“ªŽ«"/>
       </optional>
-      <W1 pos="–¼ŽŒ-”ŽŒ-ˆê”Ê"/>
+      <W1 pos="–¼ŽŒ-”ŽŒ"/>
       <zeroOrMore>
-        <W1 pos="–¼ŽŒ-”ŽŒ-ˆê”Ê"/>
+        <W1 pos="–¼ŽŒ-”ŽŒ"/>
       </zeroOrMore>
-      <optional>
-        <W1 pos="–¼ŽŒ-”ŽŒ-Œ…"/>
-      </optional>
       <zeroOrMore>
         <W1 pos="Ú”öŽ«-–¼ŽŒ“I-•”ŽŒ"/>
       </zeroOrMore>
     </rhs>
   </rule>
   <rule id="8">
-    <!-- –¼ŽŒ-•’Ê–¼ŽŒ-•›ŽŒ‰Â”\ ::= (Ú“ªŽ«-–¼ŽŒÚ‘±-.*)? (–¼ŽŒ-.*)* –¼ŽŒ-•’Ê–¼ŽŒ-•›ŽŒ‰Â”\ -->
+    <!-- –¼ŽŒ-•’Ê–¼ŽŒ-•›ŽŒ‰Â”\ ::= (Ú“ªŽ«)? (–¼ŽŒ-.*)* –¼ŽŒ-•’Ê–¼ŽŒ-•›ŽŒ‰Â”\ -->
     <lhs>
       <W2 pos="–¼ŽŒ-•’Ê–¼ŽŒ-•›ŽŒ‰Â”\"/>
     </lhs>
     <rhs>
       <optional>
-        <W1 pos="Ú“ªŽ«-–¼ŽŒÚ‘±-"/>
+        <W1 pos="Ú“ªŽ«"/>
       </optional>
       <zeroOrMore>
         <W1 pos="–¼ŽŒ-"/>
@@ -158,13 +161,13 @@
     </rhs>
   </rule>
   <rule id="9">
-    <!-- –¼ŽŒ-•’Ê–¼ŽŒ-•›ŽŒ‰Â”\ ::= (Ú“ªŽ«-–¼ŽŒÚ‘±-.*)? (–¼ŽŒ-.*|“®ŽŒ-.*|Œ`—eŽŒ-.*)* (•“®ŽŒ)* (Ú”öŽ«-–¼ŽŒ“I-.*)* Ú”öŽ«-–¼ŽŒ“I-•›ŽŒ‰Â”\ -->
+    <!-- –¼ŽŒ-•’Ê–¼ŽŒ-•›ŽŒ‰Â”\ ::= (Ú“ªŽ«)? (–¼ŽŒ-.*|“®ŽŒ-.*|Œ`—eŽŒ-.*)* (•“®ŽŒ)* (Ú”öŽ«-–¼ŽŒ“I-.*)* Ú”öŽ«-–¼ŽŒ“I-•›ŽŒ‰Â”\ -->
     <lhs>
       <W2 pos="–¼ŽŒ-•’Ê–¼ŽŒ-•›ŽŒ‰Â”\"/>
     </lhs>
     <rhs>
       <optional>
-        <W1 pos="Ú“ªŽ«-–¼ŽŒÚ‘±-"/>
+        <W1 pos="Ú“ªŽ«"/>
       </optional>
       <zeroOrMore>
         <choice>
@@ -192,19 +195,19 @@
     </rhs>
   </rule>
   <rule id="11">
-    <!-- –¼ŽŒ-ŒÅ—L–¼ŽŒ-l–¼-ˆê”Ê ::= –¼ŽŒ-ŒÅ—L–¼ŽŒ-l–¼ˆê”Ê (Ú”öŽ«-–¼ŽŒ“I-l–¼)H -->
+    <!-- –¼ŽŒ-ŒÅ—L–¼ŽŒ-l–¼-ˆê”Ê ::= –¼ŽŒ-ŒÅ—L–¼ŽŒ-l–¼ˆê”Ê (Ú”öŽ«-–¼ŽŒ“I-*)H -->
     <lhs>
       <W2 pos="–¼ŽŒ-ŒÅ—L–¼ŽŒ-l–¼-ˆê”Ê"/>
     </lhs>
     <rhs>
       <W1 pos="–¼ŽŒ-ŒÅ—L–¼ŽŒ-l–¼ˆê”Ê"/>
       <optional>
-        <W1 pos="Ú”öŽ«-–¼ŽŒ“I-l–¼"/>
+        <W1 pos="Ú”öŽ«-–¼ŽŒ“I-*"/>
       </optional>
     </rhs>
   </rule>
   <rule id="12">
-    <!-- –¼ŽŒ-ŒÅ—L–¼ŽŒ-l–¼-ˆê”Ê ::= (–¼ŽŒ-ŒÅ—L–¼ŽŒ-l–¼-©)H –¼ŽŒ-ŒÅ—L–¼ŽŒ-l–¼-–¼ (Ú”öŽ«-–¼ŽŒ“I-l–¼)H -->
+    <!-- –¼ŽŒ-ŒÅ—L–¼ŽŒ-l–¼-ˆê”Ê ::= (–¼ŽŒ-ŒÅ—L–¼ŽŒ-l–¼-©)H –¼ŽŒ-ŒÅ—L–¼ŽŒ-l–¼-–¼ (Ú”öŽ«-–¼ŽŒ“I-*)H -->
     <lhs>
       <W2 pos="–¼ŽŒ-ŒÅ—L–¼ŽŒ-l–¼-ˆê”Ê"/>
     </lhs>
@@ -214,12 +217,12 @@
       </optional>
       <W1 pos="–¼ŽŒ-ŒÅ—L–¼ŽŒ-l–¼-–¼"/>
       <optional>
-        <W1 pos="Ú”öŽ«-–¼ŽŒ“I-l–¼"/>
+        <W1 pos="Ú”öŽ«-–¼ŽŒ“I-*"/>
       </optional>
     </rhs>
   </rule>
   <rule id="13">
-    <!-- –¼ŽŒ-ŒÅ—L–¼ŽŒ-l–¼-ˆê”Ê ::= (–¼ŽŒ-ŒÅ—L–¼ŽŒ-l–¼-–¼)H –¼ŽŒ-ŒÅ—L–¼ŽŒ-l–¼-© (Ú”öŽ«-–¼ŽŒ“I-l–¼)H -->
+    <!-- –¼ŽŒ-ŒÅ—L–¼ŽŒ-l–¼-ˆê”Ê ::= (–¼ŽŒ-ŒÅ—L–¼ŽŒ-l–¼-–¼)H –¼ŽŒ-ŒÅ—L–¼ŽŒ-l–¼-© (Ú”öŽ«-–¼ŽŒ“I-*)H -->
     <lhs>
       <W2 pos="–¼ŽŒ-ŒÅ—L–¼ŽŒ-l–¼-ˆê”Ê"/>
     </lhs>
@@ -229,19 +232,19 @@
       </optional>
       <W1 pos="–¼ŽŒ-ŒÅ—L–¼ŽŒ-l–¼-©"/>
       <optional>
-        <W1 pos="Ú”öŽ«-–¼ŽŒ“I-l–¼"/>
+        <W1 pos="Ú”öŽ«-–¼ŽŒ“I-*"/>
       </optional>
     </rhs>
   </rule>
   <rule id="14">
-    <!-- –¼ŽŒ-ŒÅ—L–¼ŽŒ-’n–¼-ˆê”Ê ::= –¼ŽŒ-ŒÅ—L–¼ŽŒ-’n–¼-ˆê”Ê (Ú”öŽ«-–¼ŽŒ“I-’n–¼)? -->
+    <!-- –¼ŽŒ-ŒÅ—L–¼ŽŒ-’n–¼-ˆê”Ê ::= –¼ŽŒ-ŒÅ—L–¼ŽŒ-’n–¼-ˆê”Ê (Ú”öŽ«-–¼ŽŒ“I-*)? -->
     <lhs>
       <W2 pos="–¼ŽŒ-ŒÅ—L–¼ŽŒ-’n–¼-ˆê”Ê"/>
     </lhs>
     <rhs>
       <W1 pos="–¼ŽŒ-ŒÅ—L–¼ŽŒ-’n–¼-ˆê”Ê"/>
       <optional>
-        <W1 pos="Ú”öŽ«-–¼ŽŒ“I-’n–¼"/>
+        <W1 pos="Ú”öŽ«-–¼ŽŒ“I-*"/>
       </optional>
     </rhs>
   </rule>
@@ -255,7 +258,7 @@
     </rhs>
   </rule>
   <rule id="16">
-    <!-- –¼ŽŒ-ŒÅ—L–¼ŽŒ-‘gD–¼ ::= (–¼ŽŒ-.*)* –¼ŽŒ-ŒÅ—L–¼ŽŒ-‘gD–¼ (–¼ŽŒ-.*)* (Ú”öŽ«-–¼ŽŒ“I-‘gD–¼)? -->
+    <!-- –¼ŽŒ-ŒÅ—L–¼ŽŒ-‘gD–¼ ::= (–¼ŽŒ-.*)* –¼ŽŒ-ŒÅ—L–¼ŽŒ-‘gD–¼ (–¼ŽŒ-.*)* (Ú”öŽ«-–¼ŽŒ“I-*)? -->
     <lhs>
       <W2 pos="–¼ŽŒ-ŒÅ—L–¼ŽŒ-‘gD–¼"/>
     </lhs>
@@ -268,7 +271,7 @@
         <W1 pos="–¼ŽŒ-"/>
       </zeroOrMore>
       <optional>
-        <W1 pos="Ú”öŽ«-–¼ŽŒ“I-‘gD–¼"/>
+        <W1 pos="Ú”öŽ«-–¼ŽŒ“I-*"/>
       </optional>
     </rhs>
   </rule>
Index: chaone/chunker.xsl
diff -u chaone/chunker.xsl:1.1.1.1 chaone/chunker.xsl:1.2
--- chaone/chunker.xsl:1.1.1.1	Thu Sep 14 14:44:58 2006
+++ chaone/chunker.xsl	Sun Oct 22 14:42:02 2006
@@ -2,10 +2,10 @@
 
 <!-- XSLT stylesheet for ChaOne              -->
 <!--                     for msxml and exslt -->
-<!--                            ver. 1.2.0b4 -->
+<!--                            ver. 1.3.0a1 -->
 <!--  (1) ChaSen Chunker                     -->
-<!--                2005-03-25 by Studio ARC -->
-<!-- Copyright (c) 2004-2005 Studio ARC      -->
+<!--                2006-10-18 by Studio ARC -->
+<!-- Copyright (c) 2004-2006 Studio ARC      -->
 
 <xsl:stylesheet
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -21,7 +21,14 @@
   <xsl:variable name="chunk_rules" select="document('chunk_rules.xml')/chunk_rules"/>
 
   <xsl:template match="/">
-    <xsl:apply-templates select="S"/>
+    <xsl:apply-templates/>
+  </xsl:template>
+
+  <xsl:template match="*">
+    <xsl:copy>
+      <xsl:copy-of select="@*"/>
+      <xsl:apply-templates/>
+    </xsl:copy>
   </xsl:template>
 
   <xsl:template match="S">
@@ -851,7 +858,8 @@
     <xsl:choose>
       <xsl:when test="$target[name() = 'W1']">
         <W2>
-          <xsl:copy-of select="@*[(name() = 'orth') or (name() = 'pron') or (name() = 'pos')]"/>
+          <!-- xsl:copy-of select="@*[(name() = 'orth') or (name() = 'pron') or (name() = 'pos')]"/ -->
+          <xsl:copy-of select="@*[(name() = 'orth') or (name() = 'pos') or (name() = 'cType') or (name() = 'cForm')]"/>
           <xsl:copy-of select="$target"/>
         </W2>
       </xsl:when>
Index: chaone/phonetic.xsl
diff -u chaone/phonetic.xsl:1.1.1.1 chaone/phonetic.xsl:1.2
--- chaone/phonetic.xsl:1.1.1.1	Thu Sep 14 14:44:58 2006
+++ chaone/phonetic.xsl	Sun Oct 22 14:42:02 2006
@@ -2,11 +2,12 @@
 
 <!-- XSLT stylesheet for ChaOne              -->
 <!--                     for msxml and exslt -->
-<!--                            ver. 1.2.0b4 -->
+<!--                            ver. 1.3.0a1 -->
+<!--                        for UniDic 1.2.0 -->
 <!-- ChaOne consists of the followings;      -->
 <!--  (2) Phonetic Alternation               -->
-<!--                2005-03-25 by Studio ARC -->
-<!-- Copyright (c) 2004-2005 Studio ARC      -->
+<!--                2006-10-12 by Studio ARC -->
+<!-- Copyright (c) 2004-2006 Studio ARC      -->
 
 <xsl:stylesheet
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -19,11 +20,20 @@
 
   <xsl:output method="xml" encoding="Shift_JIS" omit-xml-declaration="yes" indent="yes"/>
 
-  <xsl:variable name="IPAForm_table" select="document('IPAForm.xml')/IPAForm_table"/>
-  <xsl:variable name="FPAForm_table" select="document('FPAForm.xml')/FPAForm_table"/>
+  <xsl:variable name="IPA_table" select="document('IPAfn.xml')"/>
+  <xsl:variable name="FPA_table" select="document('FPAfn.xml')"/>
+  <xsl:key name="IPAfn" match="ifn" use="concat(@iType, @iForm, @iConType)"/>
+  <xsl:key name="FPAfn" match="ffn" use="concat(@fType, @fForm, @fConType)"/>
 
   <xsl:template match="/">
-    <xsl:apply-templates select="S"/>
+    <xsl:apply-templates/>
+  </xsl:template>
+
+  <xsl:template match="*">
+    <xsl:copy>
+      <xsl:copy-of select="@*"/>
+      <xsl:apply-templates/>
+    </xsl:copy>
   </xsl:template>
 
   <xsl:template match="S">
@@ -57,142 +67,290 @@
 
   <!-- ChaOne inside W2 -->
   <xsl:template match="W1" mode="alt">
-    <xsl:variable name="ipaForm">
-      <xsl:if test="@ipaType">
-        <xsl:call-template name="calc-ipaForm"/>
+    <xsl:variable name="iForm_position">
+      <xsl:if test="@iType">
+        <xsl:call-template name="calc-iForm_position"/>
       </xsl:if>
     </xsl:variable>
-    <xsl:variable name="fpaForm">
-      <xsl:if test="@fpaType">
-        <xsl:call-template name="calc-fpaForm"/>
+    <xsl:variable name="fForm_position">
+      <xsl:if test="@fType">
+        <xsl:call-template name="calc-fForm_position"/>
       </xsl:if>
     </xsl:variable>
-    <xsl:variable name="pron">
-      <xsl:call-template name="calc-pron">
-        <xsl:with-param name="ipaForm" select="$ipaForm"/>
-        <xsl:with-param name="fpaForm" select="$fpaForm"/>
-      </xsl:call-template>
+    <xsl:variable name="position">
+      <xsl:choose>
+        <xsl:when test="$iForm_position > 0">
+          <xsl:value-of select="$iForm_position"/>
+        </xsl:when>
+        <xsl:when test="$fForm_position > 0">
+          <xsl:value-of select="$fForm_position"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <!-- select Šî–{Œ` (here ???) -->
+
+          <xsl:value-of select="1"/>
+
+        </xsl:otherwise>
+      </xsl:choose>
     </xsl:variable>
     <xsl:copy>
-      <xsl:copy-of select="@*"/>
-      <xsl:if test="string($ipaForm)">
-        <xsl:attribute name="ipaForm">
-          <xsl:value-of select="$ipaForm"/>
-        </xsl:attribute>
-      </xsl:if>
-      <xsl:if test="string($fpaForm)">
-        <xsl:attribute name="fpaForm">
-          <xsl:value-of select="$fpaForm"/>
-        </xsl:attribute>
-      </xsl:if>
-      <xsl:if test="string($pron)">
-        <xsl:attribute name="pron">
-          <xsl:value-of select="$pron"/>
-        </xsl:attribute>
-      </xsl:if>
+      <xsl:for-each select="@*">
+        <xsl:call-template name="nth_attr">
+          <xsl:with-param name="position" select="$position"/>
+        </xsl:call-template>
+      </xsl:for-each>
     </xsl:copy>
   </xsl:template>
 
-  <xsl:template name="calc-ipaForm">
-    <!-- current() = W1 -->
-    <!-- returns value of ipaForm or nothing -->
-    <xsl:variable name="ipaConType" select="preceding-sibling::W1[1]/@ipaConType"/>
-    <xsl:variable name="ipaType" select="@ipaType"/>
-    <xsl:if test="string($ipaConType)">
-      <xsl:value-of select="$IPAForm_table/IPAFormDefs[@IPAType = $ipaType]/IPAFormDef[@IPAConType = $ipaConType]/@IPAForm"/>
-    </xsl:if>
-  </xsl:template>
-
-  <xsl:template name="calc-fpaForm">
-    <!-- current() = W1 -->
-    <!-- returns value of fpaForm or nothing -->
-    <xsl:variable name="fpaConTypes" select="following-sibling::W1[1]/@fpaConType"/>
-    <xsl:variable name="fpaType" select="@fpaType"/>
-    <xsl:if test="string($fpaConTypes)">
-      <xsl:variable name="fpaConType">
+  <xsl:template name="nth_attr">
+    <!-- current() = W1/@* -->
+    <!-- return nth value (slash separated) of attribute -->
+    <xsl:param name="position"/>
+    <xsl:attribute name="{name()}">
+      <xsl:choose>
+        <xsl:when test="contains(., '/')">
+          <xsl:call-template name="nth_val">
+            <xsl:with-param name="position" select="$position"/>
+            <xsl:with-param name="pre" select="substring-before(., '{')"/>
+            <xsl:with-param name="post" select="substring-after(., '}')"/>
+            <xsl:with-param name="body" select="substring-before(substring-after(., '{'), '}')"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="."/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:attribute>
+  </xsl:template>
+
+  <xsl:template name="nth_val">
+    <!-- current() = W1/@* -->
+    <!-- return nth value (slash separated) of attribute -->
+    <!-- recursive -->
+    <xsl:param name="position"/>
+    <xsl:param name="pre"/>
+    <xsl:param name="post"/>
+    <xsl:param name="body"/>
+    <xsl:choose>
+      <xsl:when test="$position = 1">
         <xsl:choose>
-          <xsl:when test="contains($fpaConTypes, ',')">
-            <xsl:value-of select="substring-before($fpaConTypes, ',')"/>
+          <xsl:when test="contains($body, '/')">
+            <xsl:value-of select="concat($pre, substring-before($body, '/'), $post)"/>
           </xsl:when>
           <xsl:otherwise>
-            <xsl:value-of select="$fpaConTypes"/>
+            <xsl:value-of select="concat($pre, $body, $post)"/>
           </xsl:otherwise>
         </xsl:choose>
-      </xsl:variable>
-      <xsl:value-of select="$FPAForm_table/FPAFormDefs[@FPAType = $fpaType]/FPAFormDef[@FPAConType = $fpaConType]/@FPAForm"/>
-    </xsl:if>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="nth_val">
+          <xsl:with-param name="position" select="$position - 1"/>
+          <xsl:with-param name="pre" select="$pre"/>
+          <xsl:with-param name="post" select="$post"/>
+          <xsl:with-param name="body" select="substring-after($body, '/')"/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
   </xsl:template>
 
-  <xsl:template name="calc-pron">
+  <xsl:template name="calc-iForm_position">
     <!-- current() = W1 -->
-    <!-- returns value of pron -->
-    <xsl:param name="ipaForm"/>
-    <xsl:param name="fpaForm"/>
-    <xsl:call-template name="ipaForm-pron-alt">
-      <xsl:with-param name="ipaForm" select="$ipaForm"/>
-      <xsl:with-param name="pron">
-        <xsl:call-template name="fpaForm-pron-alt">
-          <xsl:with-param name="fpaForm" select="$fpaForm"/>
-          <xsl:with-param name="pron" select="@pron"/>
+    <!-- returns position (nth) of iForm or position of Šî–{Œ` -->
+    <xsl:call-template name="calc-iForm_position_main">
+      <xsl:with-param name="iType" select="@iType"/>
+      <xsl:with-param name="iConType">
+        <xsl:call-template name="get_first">
+          <xsl:with-param name="list" select="preceding-sibling::W1[1]/@iConType"/>
         </xsl:call-template>
       </xsl:with-param>
+      <xsl:with-param name="pre" select="substring-before(@iForm, '{')"/>
+      <xsl:with-param name="post" select="substring-after(@iForm, '}')"/>
+      <xsl:with-param name="iForms" select="substring-before(substring-after(@iForm, '{'), '}')"/>
+      <xsl:with-param name="position" select="1"/>
+      <xsl:with-param name="kihonkei" select="0"/>
     </xsl:call-template>
   </xsl:template>
 
-  <xsl:template name="ipaForm-pron-alt">
-    <!-- current() = W1 -->
-    <!-- returns value of pron -->
-    <xsl:param name="ipaForm"/>
-    <xsl:param name="pron"/>
-    <xsl:variable name="ipaType" select="@ipaType"/>
+  <xsl:template name="get_first">
+    <xsl:param name="list"/>
     <xsl:choose>
-      <xsl:when test="string($ipaForm)">
-        <xsl:call-template name="alt-head">
-          <xsl:with-param name="pron" select="$pron"/>
-          <xsl:with-param name="len" select="string-length($IPAForm_table/IPAFormDefs[@IPAType = $ipaType]/IPApronDef[@IPAForm = 'Šî–{Œ`']/@pron)"/>
-          <xsl:with-param name="alt" select="$IPAForm_table/IPAFormDefs[@IPAType = $ipaType]/IPApronDef[@IPAForm = $ipaForm]/@pron"/>
+      <xsl:when test="contains($list, '{')">
+        <xsl:call-template name="get_first_main">
+          <xsl:with-param name="pre" select="substring-before($list, '{')"/>
+          <xsl:with-param name="post" select="substring-after($list, '}')"/>
+          <xsl:with-param name="list" select="substring-before(substring-after($list, '{'), '}')"/>
         </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
-        <xsl:value-of select="$pron"/>
+        <xsl:value-of select="$list"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template name="get_first_main">
+    <xsl:param name="pre"/>
+    <xsl:param name="post"/>
+    <xsl:param name="list"/>
+    <xsl:choose>
+      <xsl:when test="contains($list, '/')">
+        <xsl:variable name="first" select="substring-before($list, '/')"/>
+        <xsl:choose>
+          <xsl:when test="string-length($first) = 0">
+            <xsl:call-template name="get_first_main">
+              <xsl:with-param name="pre" select="$pre"/>
+              <xsl:with-param name="post" select="$post"/>
+              <xsl:with-param name="list" select="substring-after($list, '/')"/>
+            </xsl:call-template>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="concat($pre, $first, $post)"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="concat($pre, $list, $post)"/>
       </xsl:otherwise>
     </xsl:choose>
   </xsl:template>
 
-  <xsl:template name="fpaForm-pron-alt">
+  <xsl:template name="calc-iForm_position_main">
     <!-- current() = W1 -->
-    <!-- returns value of pron -->
-    <xsl:param name="fpaForm"/>
-    <xsl:param name="pron"/>
-    <xsl:variable name="fpaType" select="@fpaType"/>
+    <!-- returns position (nth) of iForm whose ifn value = 1 -->
+    <!-- recursive -->
+    <xsl:param name="iType"/>
+    <xsl:param name="iConType"/>
+    <xsl:param name="pre"/>
+    <xsl:param name="post"/>
+    <xsl:param name="iForms"/>
+    <xsl:param name="position"/>
+    <xsl:param name="kihonkei"/>
+    <xsl:variable name="iForm">
+      <xsl:choose>
+        <xsl:when test="contains($iForms, '/')">
+          <xsl:value-of select="concat($pre, substring-before($iForms, '/'), $post)"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="concat($pre, $iForms, $post)"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:variable name="iForm_val">
+      <xsl:for-each select="$IPA_table">
+        <xsl:value-of select="key('IPAfn', concat($iType, $iForm, $iConType))/@val"/>
+      </xsl:for-each>
+    </xsl:variable>
     <xsl:choose>
-      <xsl:when test="string($fpaForm)">
-        <xsl:call-template name="alt-tail">
-          <xsl:with-param name="pron" select="$pron"/>
-          <xsl:with-param name="len" select="string-length($FPAForm_table/FPAFormDefs[@FPAType = $fpaType]/FPApronDef[@FPAForm = 'Šî–{Œ`']/@pron)"/>
-          <xsl:with-param name="alt" select="$FPAForm_table/FPAFormDefs[@FPAType = $fpaType]/FPApronDef[@FPAForm = $fpaForm]/@pron"/>
+      <xsl:when test="$iForm_val = 1">
+        <xsl:value-of select="$position"/>
+      </xsl:when>
+      <xsl:when test="contains($iForms, '/')">
+        <xsl:call-template name="calc-iForm_position_main">
+          <xsl:with-param name="iType" select="$iType"/>
+          <xsl:with-param name="iConType" select="$iConType"/>
+          <xsl:with-param name="pre" select="$pre"/>
+          <xsl:with-param name="post" select="$post"/>
+          <xsl:with-param name="iForms" select="substring-after($iForms, '/')"/>
+          <xsl:with-param name="position" select="$position + 1"/>
+          <xsl:with-param name="kihonkei">
+            <xsl:choose>
+              <xsl:when test="($iForm = 'Šî–{Œ`') and ($kihonkei = 0)">
+                <xsl:value-of select="$position"/>
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:value-of select="$kihonkei"/>
+              </xsl:otherwise>
+            </xsl:choose>
+          </xsl:with-param>
         </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
-        <xsl:value-of select="$pron"/>
+        <xsl:value-of select="$kihonkei"/>
       </xsl:otherwise>
     </xsl:choose>
   </xsl:template>
 
-  <xsl:template name="alt-head">
-    <xsl:param name="pron"/>
-    <xsl:param name="len"/>
-    <xsl:param name="alt"/>
-    <xsl:value-of select="$alt"/>
-    <xsl:value-of select="substring($pron, number($len) + 1)"/>
+  <xsl:template name="calc-fForm_position">
+    <!-- current() = W1 -->
+    <!-- returns position (nth) of fForm or position of Šî–{Œ` -->
+    <xsl:variable name="fConTypes" select="following-sibling::W1[1]/@fConType"/>
+    <xsl:call-template name="calc-fForm_position_main">
+      <xsl:with-param name="fType">
+        <xsl:call-template name="get_first">
+          <xsl:with-param name="list" select="@fType"/>
+        </xsl:call-template>
+      </xsl:with-param>
+      <xsl:with-param name="fConType">
+        <xsl:choose>
+          <xsl:when test="contains($fConTypes, ',')">
+            <xsl:value-of select="substring-before($fConTypes, ',')"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$fConTypes"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:with-param>
+      <xsl:with-param name="pre" select="substring-before(@fForm, '{')"/>
+      <xsl:with-param name="post" select="substring-after(@fForm, '}')"/>
+      <xsl:with-param name="fForms" select="substring-before(substring-after(@fForm, '{'), '}')"/>
+      <xsl:with-param name="position" select="1"/>
+      <xsl:with-param name="kihonkei" select="0"/>
+    </xsl:call-template>
   </xsl:template>
 
-  <xsl:template name="alt-tail">
-    <xsl:param name="pron"/>
-    <xsl:param name="len"/>
-    <xsl:param name="alt"/>
-    <xsl:value-of select="substring($pron, 1, string-length($pron) - number($len))"/>
-    <xsl:value-of select="$alt"/>
+  <xsl:template name="calc-fForm_position_main">
+    <!-- current() = W1 -->
+    <!-- returns position (nth) of fForm whose ffn value = 1 -->
+    <!-- recursive -->
+    <xsl:param name="fType"/>
+    <xsl:param name="fConType"/>
+    <xsl:param name="pre"/>
+    <xsl:param name="post"/>
+    <xsl:param name="fForms"/>
+    <xsl:param name="position"/>
+    <xsl:param name="kihonkei"/>
+    <xsl:variable name="fForm">
+      <xsl:choose>
+        <xsl:when test="contains($fForms, '/')">
+          <xsl:value-of select="concat($pre, substring-before($fForms, '/'), $post)"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="concat($pre, $fForms, $post)"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:variable name="fForm_val">
+      <xsl:for-each select="$FPA_table">
+        <xsl:value-of select="key('FPAfn', concat($fType, $fForm, $fConType))/@val"/>
+      </xsl:for-each>
+    </xsl:variable>
+    <xsl:choose>
+      <xsl:when test="$fForm_val = 1">
+        <xsl:value-of select="$position"/>
+      </xsl:when>
+      <xsl:when test="contains($fForms, '/')">
+        <xsl:call-template name="calc-fForm_position_main">
+          <xsl:with-param name="fType" select="$fType"/>
+          <xsl:with-param name="fConType" select="$fConType"/>
+          <xsl:with-param name="pre" select="$pre"/>
+          <xsl:with-param name="post" select="$post"/>
+          <xsl:with-param name="fForms" select="substring-after($fForms, '/')"/>
+          <xsl:with-param name="position" select="$position + 1"/>
+          <xsl:with-param name="kihonkei">
+            <xsl:choose>
+              <xsl:when test="($fForm = 'Šî–{Œ`') and ($kihonkei = 0)">
+                <xsl:value-of select="$position"/>
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:value-of select="$kihonkei"/>
+              </xsl:otherwise>
+            </xsl:choose>
+          </xsl:with-param>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$kihonkei"/>
+      </xsl:otherwise>
+    </xsl:choose>
   </xsl:template>
 
 </xsl:stylesheet>
Index: chaone/prep.xsl
diff -u chaone/prep.xsl:1.1.1.1 chaone/prep.xsl:1.2
--- chaone/prep.xsl:1.1.1.1	Thu Sep 14 14:45:41 2006
+++ chaone/prep.xsl	Sun Oct 22 14:42:02 2006
@@ -1,125 +1,132 @@
-<?xml version="1.0" encoding="Shift_JIS"?>
-
-<!-- XSLT stylesheet for ChaOne              -->
-<!--                     for msxml and exslt -->
-<!--                            ver. 1.2.0b5 -->
-<!--  (0) preprocessing                      -->
-<!--                2005-07-09 by Studio ARC -->
-<!-- Copyright (c) 2004-2005 Studio ARC      -->
-
-<xsl:stylesheet
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:exsl="http://exslt.org/common"
-  xmlns:msxml="urn:schemas-microsoft-com:xslt"
-  xmlns:ext="http://exslt.org/common"
-  exclude-result-prefixes="exsl msxml ext"
-  version="1.0"
-  xml:lang="ja">
-
-  <xsl:output method="xml" encoding="Shift_JIS" omit-xml-declaration="yes" indent="yes"/>
-
-  <xsl:param name="ipadic" select="'no'"/>
-
-  <xsl:variable name="ea_symbol_table" select="document('ea_symbol_table.xml')/ea_symbol_table"/>
-  <xsl:variable name="pos_list" select="document('grammar.xml')"/>
-  <xsl:variable name="pa_word_list" select="document('pa_word.xml')"/>
-  <xsl:key name="pos" match="pos" use="@ipadic"/>
-  <xsl:key name="pa_word" match="W1" use="concat(@orth, @pron, @pos)"/>
-
-  <xsl:template match="/">
-    <xsl:apply-templates select="S"/>
-  </xsl:template>
-
-  <xsl:template match="S">
-    <xsl:copy>
-      <xsl:apply-templates mode="prep"/>
-    </xsl:copy>
-  </xsl:template>
-
-  <xsl:template match="*" mode="prep">
-    <xsl:choose>
-      <xsl:when test="@pos = '–¢’mŒê'">
-        <xsl:call-template name="ea-symbol-chk">
-          <xsl:with-param name="orth" select="@orth"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:when test="self::W1 and ($ipadic = 'yes')">
-        <xsl:apply-templates select="." mode="ipadic"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:copy>
-          <xsl:copy-of select="@*"/>
-          <xsl:apply-templates select="*" mode="prep"/>
-        </xsl:copy>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-  <xsl:template match="W1" mode="ipadic">
-    <xsl:variable name="ipa_pos" select="@pos"/>
-    <xsl:variable name="uni_pos">
-      <xsl:for-each select="$pos_list">
-        <xsl:value-of select="key('pos',$ipa_pos)/@unidic"/>
-      </xsl:for-each>
-    </xsl:variable>
-    <xsl:variable name="orthpronpos" select="concat(@orth, @pron, $uni_pos)"/>
-    <xsl:copy>
-      <xsl:for-each select="@*[name()!='pos']">
-        <xsl:copy-of select="."/>
-      </xsl:for-each>
-      <xsl:attribute name="pos">
-        <xsl:value-of select="$uni_pos"/>
-      </xsl:attribute>
-      <xsl:for-each select="$pa_word_list">
-        <xsl:for-each select="key('pa_word',$orthpronpos)">
-          <xsl:for-each select="@*[starts-with(name(), 'ipa') or starts-with(name(), 'fpa')]">
-            <xsl:copy-of select="."/>
-          </xsl:for-each>
-        </xsl:for-each>
-      </xsl:for-each>
-      <xsl:apply-templates select="*" mode="prep"/>
-    </xsl:copy>
-  </xsl:template>
-
-  <!-- preprocess for unknown pos with English Alphabet -->
-  <xsl:template name="ea-symbol-chk">
-    <xsl:param name="orth"/>
-    <xsl:variable name="hits">
-      <xsl:for-each select="$ea_symbol_table/W1[starts-with($orth, @orth)]">
-        <xsl:sort select="string-length(@orth)"/>
-        <xsl:copy-of select="."/>
-      </xsl:for-each>
-    </xsl:variable>
-    <xsl:choose>
-      <xsl:when test="ext:node-set($hits)/W1[1]/@orth">
-        <xsl:apply-templates select="ext:node-set($hits)/W1[1]" mode="ea-symbol">
-          <xsl:with-param name="orgW1" select="."/>
-          <xsl:with-param name="orth" select="$orth"/>
-        </xsl:apply-templates>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:copy-of select="."/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-  <xsl:template match="W1" mode="ea-symbol">
-    <xsl:param name="orgW1"/>
-    <xsl:param name="orth"/>
-    <xsl:choose>
-      <xsl:when test="@orth">
-        <xsl:copy-of select="."/>
-        <xsl:if test="string-length($orth) > string-length(@orth)">
-          <!-- *** recursive call *** -->
-          <xsl:call-template name="ea-symbol-chk">
-            <xsl:with-param name="orth" select="substring($orth, string-length(@orth) + 1)"/>
-          </xsl:call-template>
-        </xsl:if>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:copy-of select="$orgW1"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-</xsl:stylesheet>
+<?xml version="1.0" encoding="Shift_JIS"?>
+
+<!-- XSLT stylesheet for ChaOne              -->
+<!--                     for msxml and exslt -->
+<!--                            ver. 1.3.0a1 -->
+<!--  (0) preprocessing                      -->
+<!--                2006-10-12 by Studio ARC -->
+<!-- Copyright (c) 2004-2006 Studio ARC      -->
+
+<xsl:stylesheet
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:exsl="http://exslt.org/common"
+  xmlns:msxml="urn:schemas-microsoft-com:xslt"
+  xmlns:ext="http://exslt.org/common"
+  exclude-result-prefixes="exsl msxml ext"
+  version="1.0"
+  xml:lang="ja">
+
+  <xsl:output method="xml" encoding="Shift_JIS" omit-xml-declaration="yes" indent="yes"/>
+
+  <xsl:param name="ipadic" select="'no'"/>
+
+  <xsl:variable name="ea_symbol_table" select="document('ea_symbol_table.xml')/ea_symbol_table"/>
+  <xsl:variable name="pos_list" select="document('grammar.xml')"/>
+  <xsl:variable name="pa_word_list" select="document('pa_word.xml')"/>
+  <xsl:key name="pos" match="pos" use="@ipadic"/>
+  <xsl:key name="pa_word" match="W1" use="concat(@orth, @pron, @pos)"/>
+
+  <xsl:template match="/">
+    <xsl:apply-templates/>
+  </xsl:template>
+
+  <xsl:template match="*">
+    <xsl:copy>
+      <xsl:copy-of select="@*"/>
+      <xsl:apply-templates/>
+    </xsl:copy>
+  </xsl:template>
+
+  <xsl:template match="S">
+    <xsl:copy>
+      <xsl:apply-templates mode="prep"/>
+    </xsl:copy>
+  </xsl:template>
+
+  <xsl:template match="*" mode="prep">
+    <xsl:choose>
+      <xsl:when test="@pos = '–¢’mŒê'">
+        <xsl:call-template name="ea-symbol-chk">
+          <xsl:with-param name="orth" select="@orth"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:when test="self::W1 and ($ipadic = 'yes')">
+        <xsl:apply-templates select="." mode="ipadic"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:copy>
+          <xsl:copy-of select="@*"/>
+          <xsl:apply-templates select="*" mode="prep"/>
+        </xsl:copy>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template match="W1" mode="ipadic">
+    <xsl:variable name="ipa_pos" select="@pos"/>
+    <xsl:variable name="uni_pos">
+      <xsl:for-each select="$pos_list">
+        <xsl:value-of select="key('pos',$ipa_pos)/@unidic"/>
+      </xsl:for-each>
+    </xsl:variable>
+    <xsl:variable name="orthpronpos" select="concat(@orth, @pron, $uni_pos)"/>
+    <xsl:copy>
+      <xsl:for-each select="@*[name()!='pos']">
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+      <xsl:attribute name="pos">
+        <xsl:value-of select="$uni_pos"/>
+      </xsl:attribute>
+      <xsl:for-each select="$pa_word_list">
+        <xsl:for-each select="key('pa_word',$orthpronpos)">
+          <xsl:for-each select="@*[starts-with(name(), 'ipa') or starts-with(name(), 'fpa')]">
+            <xsl:copy-of select="."/>
+          </xsl:for-each>
+        </xsl:for-each>
+      </xsl:for-each>
+      <xsl:apply-templates select="*" mode="prep"/>
+    </xsl:copy>
+  </xsl:template>
+
+  <!-- preprocess for unknown pos with English Alphabet -->
+  <xsl:template name="ea-symbol-chk">
+    <xsl:param name="orth"/>
+    <xsl:variable name="hits">
+      <xsl:for-each select="$ea_symbol_table/W1[starts-with($orth, @orth)]">
+        <xsl:sort select="string-length(@orth)"/>
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+    </xsl:variable>
+    <xsl:choose>
+      <xsl:when test="ext:node-set($hits)/W1[1]/@orth">
+        <xsl:apply-templates select="ext:node-set($hits)/W1[1]" mode="ea-symbol">
+          <xsl:with-param name="orgW1" select="."/>
+          <xsl:with-param name="orth" select="$orth"/>
+        </xsl:apply-templates>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:copy-of select="."/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template match="W1" mode="ea-symbol">
+    <xsl:param name="orgW1"/>
+    <xsl:param name="orth"/>
+    <xsl:choose>
+      <xsl:when test="@orth">
+        <xsl:copy-of select="."/>
+        <xsl:if test="string-length($orth) > string-length(@orth)">
+          <!-- *** recursive call *** -->
+          <xsl:call-template name="ea-symbol-chk">
+            <xsl:with-param name="orth" select="substring($orth, string-length(@orth) + 1)"/>
+          </xsl:call-template>
+        </xsl:if>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:copy-of select="$orgW1"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+</xsl:stylesheet>


Galateatalk-dev メーリングリストの案内
Back to archive index