Skip to content

Commit

Permalink
compose with detriple.dix
Browse files Browse the repository at this point in the history
lt-compose --anywhere
  • Loading branch information
unhammer committed Oct 3, 2022
1 parent cc35677 commit bcd7228
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 2 deletions.
8 changes: 7 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,17 @@ $(LANG1).autogen.bin: $(BASENAME).$(LANG1).dix
apertium-validate-dictionary $<
lt-comp rl $< $@

$(LANG1).automorf.bin: $(BASENAME).$(LANG1).dix $(BASENAME).$(LANG1).acx
.deps/$(LANG1).automorf.bin: $(BASENAME).$(LANG1).dix $(BASENAME).$(LANG1).acx .deps/.d
apertium-validate-dictionary $<
apertium-validate-acx $(BASENAME).$(LANG1).acx
lt-comp lr $< $@ $(BASENAME).$(LANG1).acx

.deps/$(LANG1).detriple.bin: $(BASENAME).detriple.dix
lt-comp lr $< $@

$(LANG1).automorf.bin: .deps/$(LANG1).automorf.bin .deps/$(LANG1).detriple.bin
lt-compose --inverted --anywhere $^ $@

$(LANG1).autogen.att.gz: $(LANG1).autogen.bin
lt-print $< | gzip -9 -c -n > $@

Expand Down
48 changes: 48 additions & 0 deletions apertium-nob.detriple.dix
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<dictionary>
<alphabet>ABCDEFGHIJKLMNOPQRSTUVWXYZÀÁÂÄÅÆÇÈÉÊËÍÑÒÓÔÕÖØÙÚÜČĐŊŠŦŽabcdefghijklmnopqrstuvwxyzàáâäåæçèéêëíñòóôõöøùúüčđŋšŧž­-</alphabet>
<sdefs>
<sdef n="n" c="Noun"/>
</sdefs>
<pardefs>
</pardefs>
<section id="main" type="standard">
<!--
Turn double consonants in front of ¤ into single consonants,
in order to allow compounds where triple consonants are just
double, ie. ^toppoeng/topp+poeng$ (the forms being top+poeng).
The analyser puts a ¤ right before the compound border to
allow this.
-->

<e><p><l>bb¤</l><r>b</r></p></e>

<e><p><l>dd¤</l><r>d</r></p></e>

<e><p><l>ff¤</l><r>f</r></p></e>

<e><p><l>gg¤</l><r>g</r></p></e>

<e><p><l>kk¤</l><r>k</r></p></e>

<e><p><l>ll¤</l><r>l</r></p></e>

<e><p><l>mm¤</l><r>m</r></p></e>

<e><p><l>nn¤</l><r>n</r></p></e>

<e><p><l>pp¤</l><r>p</r></p></e>

<e><p><l>rr¤</l><r>r</r></p></e>

<e><p><l>ss¤</l><r>s</r></p></e>

<e><p><l>tt¤</l><r>t</r></p></e>

<e><p><l>vv¤</l><r>v</r></p></e>

<!-- <e><p><l>¤</l><r></r></p></e> -->

</section>
</dictionary>
4 changes: 3 additions & 1 deletion apertium-nob.nob.dix
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@
<sdef n="compound-R" c="May be the right-side of a compound, or a full word"/>
<sdef n="cmp" c="Generation only: added by transfer to say we have a compound"/>
<sdef n="guio" c="Dash, also: Generation only-mark added by transfer to say we should add a dash (e.g. for split compounds)"/>
<sdef n="cmp-split" c="Left part of a split compound"/>
<sdef n="detriple" c="Left part of a compound where the double consonant is turned single (by composing with detriple.dix)"/>
<sdef n="cmp-split" c="Left part of a split compound"/>

<sdef n="remspc" c="Tell transfer to remove preceding space"/>
</sdefs>
Expand Down Expand Up @@ -235,6 +236,7 @@
<e r="LR"><p><l></l> <r><s n="cmp"/><s n="compound-only-L"/></r></p></e>
<e r="RL"><p><l>-</l> <r><s n="cmp"/><s n="guio"/></r></p></e>
<e r="LR"><p><l>-</l> <r><s n="cmp"/><s n="guio"/><s n="compound-only-L"/></r></p></e>
<e r="LR"><p><l>¤</l> <r><s n="cmp"/><s n="detriple"/><s n="compound-only-L"/></r></p></e>
<e> <p><l>-</l> <r><s n="cmp-split"/></r></p></e>
</pardef>
<pardef n="cp-R" c="cp-R, for forms that can only end compounds, with untagged fallthrough">
Expand Down

0 comments on commit bcd7228

Please sign in to comment.