Difference between revisions of "Sort a dictionary"

From Apertium
Jump to navigation Jump to search
m
m
Line 38: Line 38:
== See also ==
== See also ==
* [[Crossdics|How to cross language pairs]]
* [[Crossdics|How to cross language pairs]]

[[Category:Documentation]]

Revision as of 19:00, 11 July 2007

Sort task

A task for sorting dictionaries is available in the crossdics package.

"Same file" mode

./dictools sort -mon -same-file dics/morf.dix morf-xincluded.dix

XInclude mode

./dictools sort -mon -xinclude dics/morf.dix morf-xincluded.dix

Using this mode elements are grouped by category and splitted in different XML files -- in folder morf-xincluded.dix-include. Definitions and paradigms are written in different files too (sdefs.dix and pardefs.dix).

The main file is morf-xinclude.dix and it looks like this:

<?xml version="1.0" encoding="iso-8859-1"?>
<dictionary>
  <alphabet>ÀÁÂÄÇÈÉÊËÌÍÎÏÑÒÓÔÖÙÚÛÜàáâäçèéêëìíîïñòóôöùúûüABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz</alphabet>
    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apertium-es-ca.es-xincluded.dix-includes/sdefs.dix"/>
    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apertium-es-ca.es-xincluded.dix-includes/pardefs.dix"/>
    <section id="main" type="standard">
      <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apertium-es-ca.es-xincluded.dix-includes/det.dix"/>
      <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apertium-es-ca.es-xincluded.dix-includes/predet.dix"/>
      <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apertium-es-ca.es-xincluded.dix-includes/np.dix"/>
      <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apertium-es-ca.es-xincluded.dix-includes/n.dix"/>
      <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apertium-es-ca.es-xincluded.dix-includes/ij.dix"/>
      <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apertium-es-ca.es-xincluded.dix-includes/adj.dix"/>
      ...
      <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apertium-es-ca.es-xincluded.dix-includes/adv.dix"/>
  </section>
  <section id="final" type="inconditional">
  </section>
</dictionary>

See also