Skip to content

Commit

Permalink
Added some comma and puntutaution rules (Issue marytts-it#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
ftesser authored and giuliopaci committed Mar 8, 2013
1 parent c34aba5 commit afc8157
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ protected synchronized void getAccentPosition(Element token, NodeList tokens, in
protected synchronized boolean getAccentShape(Element token, NodeList tokens, int position, String sentenceType,
String specialPositionType, boolean nucleusAssigned)
{
System.out.println("getAccentShape");
//System.out.println("getAccentShape");
String tokenText = MaryDomUtils.tokenText(token); // text of current token

// prosodic position (prenuclear, nuclear, postnuclear)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ Possible values are only: "enfofpar"(end of paragraph) and "endofvorfeld"(end of
<!-- R1: è, ho, ha, TOCHECK ma anche coniugazioni: erano sono avevano-->
<list name="verbs0" items="è:ho:ha"/>


<list name="openFB" items="«:(:{:["/>

<!-- R2: DE, DQ, PQ ad inizio frase ricevono accento -->
<list name="det0" items="DE:DQ:PQ"/>

Expand Down Expand Up @@ -394,14 +395,72 @@ Possible values are only: "enfofpar"(end of paragraph) and "endofvorfeld"(end of
(chi, che, cosa, perché, quale, quali, quanto, come, dove, ...) (PR,PQ,DQ,E,B,CS) allora -> L-L% altrimenti (non inizia con: ...) -> L-H% -->



<rule> <!-- comma or ellipsis (FF , ...) after al leats 5 token of not punctuation
type major boundary after a punctuation mark in the middle of the sentence -->
<attributes pos="FF"/>
<folTokens num="1+"/>
<prevTokens num="1+"/>
<nextAttributes pos="!INLIST:pos_punctuation"/>
<previousAttributes pos="!INLIST:pos_punctuation"/>
<previousMinus1Attributes pos="!INLIST:pos_punctuation"/>
<previousMinus2Attributes pos="!INLIST:pos_punctuation"/>
<previousMinus3Attributes pos="!INLIST:pos_punctuation"/>
<previousMinus4Attributes pos="!INLIST:pos_punctuation"/>
<previousMinus5Attributes pos="!INLIST:pos_punctuation"/>
<action bi="4" tone="H-L%"/>
</rule>

<rule> <!-- comma or ellipsis (FF , ...) after al leats 5 token of not punctuation
type major boundary after a punctuation mark in the middle of the sentence -->
<attributes pos="FF"/>
<nextAttributes pos="!INLIST:pos_punctuation"/>
<previousAttributes pos="!INLIST:pos_punctuation"/>
<folTokens num="1+"/>
<prevTokens num="1+"/>
<action bi="3" tone="H-"/>
</rule>

<!-- Not used
<rule> (FB « » ( ) " ') minor boundary after in the middle of the sentence
<attributes pos="FB"/>
<text word="INLIST:openFB"/>
<nextAttributes pos="!INLIST:pos_punctuation"/>
<previousAttributes pos="!INLIST:pos_punctuation"/>
<folTokens num="1+"/>
<prevTokens num="1+"/>
<action bi="3" tone="H-"/>
</rule>
-->

<rule> <!-- (FB « » ( ) " ') sentence type major boundary after a punctuation mark in the middle of the sentence -->
<attributes pos="FB"/>
<folTokens num="1+"/>
<prevTokens num="1+"/>
<action bi="4" tone="H-L%"/>
</rule>


<rule> <!-- (FC : ; -) sentence type major boundary after a punctuation mark in the middle of the sentence -->
<attributes pos="FC"/>
<folTokens num="1+"/>
<prevTokens num="1+"/>
<nextAttributes pos="!INLIST:pos_punctuation"/>
<previousAttributes pos="!INLIST:pos_punctuation"/>
<previousMinus1Attributes pos="!INLIST:pos_punctuation"/>
<action bi="4" tone="H-L%"/>
</rule>


<rule> <!-- major boundary after a punctuation mark in the middle of the sentence -->
<rule> <!-- others major boundary after a punctuation mark in the middle of the sentence -->
<attributes pos="INLIST:pos_punctuation"/>
<folTokens num="1+"/>
<prevTokens num="1+"/>
<action bi="4" tone="H-L%"/>
</rule>




<!-- TOCHECK: insert the , ; : rules -->

Expand Down

0 comments on commit afc8157

Please sign in to comment.