Difference between revisions of "Lttoolbox and lexc"
Jump to navigation
Jump to search
| Line 40: | Line 40: | ||
</section> |
</section> |
||
</dictionary> |
</dictionary> |
||
</pre> |
|||
And to compile and use this dictionary: |
|||
<pre> |
|||
$ lt-comp lr test.dix test.bin |
|||
root@standard 7 7 |
|||
$ echo "cat" | lt-proc test.bin |
|||
^cat/cat<n><sg>$ |
|||
$ echo "cats" | lt-proc test.bin |
|||
^cats/cat<n><pl>$ |
|||
</pre> |
</pre> |
||
Revision as of 13:17, 12 January 2010
Contents |
This page describes some how lttoolbox and HFST's lexc are similar.
Terminology
| lttoolbox | lexc | Notes |
|---|---|---|
| Paradigm | Continuation lexicon | |
| Section | Root lexicon | |
| Left | Up | Both left and upper correspond to surface form |
| Right | Down | Corresponds to lexical form |
| Symbol | Multichar symbol | Sequences of one or more symbol which are treated as one symbol |
Example
lttoolbox
<dictionary>
<sdefs>
<sdef n="n"/>
<sdef n="pl"/>
<sdef n="sg"/>
</sdefs>
<pardefs>
<pardef n="RegNounInfl">
<e><p><l/><r><s n="n"/><s n="sg"/></r></p></e>
<e><p><l>s</l><r><s n="n"/><s n="pl"/></r></p></e>
</pardef>
</pardefs>
<section id="root" type="standard">
<e lm="cat"><i>cat</i><par n="RegNounInfl"/></e> <!-- A noun -->
</section>
</dictionary>
And to compile and use this dictionary:
$ lt-comp lr test.dix test.bin root@standard 7 7 $ echo "cat" | lt-proc test.bin ^cat/cat<n><sg>$ $ echo "cats" | lt-proc test.bin ^cats/cat<n><pl>$
lexc
Multichar_Symbols +N +Pl +Sg LEXICON Root NounRoot ; LEXICON NounRoot cat RegNounInfl ; ! A noun LEXICON RegNounInfl :+N+Sg # ; s:+N+Pl # ;