Difference between revisions of "Format dictionaries"

From Apertium
Jump to navigation Jump to search
m
m
Line 1: Line 1:
You can use the dictools script ([[Crossdics|crossdics]] package) to format each '''<code><e></code>''' tag in the dictionary.
You can use the dictools script ([[Crossdics|crossdics]] package) to format each '''<code><e></code>''' tag in the dictionary.


$ ./dictools format-1line <dic> <dic.out>
$ apertium-dixtools '''format-1line''' <dic> <dic.out>





Revision as of 14:04, 17 March 2008

You can use the dictools script (crossdics package) to format each <e> tag in the dictionary.

$ apertium-dixtools format-1line <dic> <dic.out>


For example, these lines:

...
<e>
  <p>
    <l>estilo<s n="n"/></l>
    <r>estil<s n="n"/></r>
  </p>
</e>
...

will be displayed in one line.

...
<e><p><l>estilo<s n="n"/></l><r>estil<s n="n"/></r></p></e>
...

The 1-line format can be useful if you use grep or any similar tool to process dictionaries.