Difference between revisions of "Sort a dictionary"
Jump to navigation
Jump to search
(12 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
+ | [[Tri d'un dictionnaire|En français]] |
||
+ | |||
== Sort task == |
== Sort task == |
||
− | A task for sorting dictionaries is available in the [[ |
+ | A task for sorting dictionaries is available in the [[apertium-dixtools]] package. |
+ | |||
+ | <pre> |
||
+ | Usage: apertium-dixtools sort [-group <symbol list>] [-right] [-ignorecase] <dic.dix> <out.dix> |
||
+ | |||
+ | -ignorecase ignore case when sorting |
||
+ | |||
+ | -right will sort according to value on right side (useful bidixes) |
||
+ | |||
+ | -group <commaseparated list> will group symbol categories together. For example: |
||
+ | -group n,n_symbol,adj,adv,vblex,vblex_symbol |
||
+ | will sort all nouns, adj, adv and verbs together. Other entries will be sorted separately |
||
+ | </pre> |
||
+ | |||
+ | There are also a number of [[apertium-dixtools#Usage|generic options]] |
||
+ | |||
+ | ===Examples=== |
||
+ | |||
+ | Simple sorting, piping to less |
||
+ | |||
+ | $ apertium-dixtools sort -alignBidix apertium-sv-da.sv-da.dix - | less |
||
+ | |||
+ | |||
+ | Sorting, grouping nouns together, overwriting the original file |
||
+ | $ apertium-dixtools sort -group n,n_symbol -alignBidix apertium-eo-en.en.dix apertium-eo-en.en.dix |
||
− | === "Same file" mode === |
||
− | ./dictools sort -mon '''-same-file''' dics/morf.dix morf-xincluded.dix |
||
+ | <!-- |
||
=== XInclude mode === |
=== XInclude mode === |
||
Line 41: | Line 66: | ||
$ ./dictools '''process-xincludes''' apertium-xx-yy.xx.dix apertium-xx-yy.xx-expanded.dix |
$ ./dictools '''process-xincludes''' apertium-xx-yy.xx.dix apertium-xx-yy.xx-expanded.dix |
||
+ | --> |
||
== See also == |
== See also == |
||
Line 46: | Line 72: | ||
* [[Merge dictionaries|How to merge dictionaries]] |
* [[Merge dictionaries|How to merge dictionaries]] |
||
− | [[Category: |
+ | [[Category:Dixtools]] |
+ | [[Category:Documentation in English]] |
Latest revision as of 09:40, 6 October 2014
Sort task[edit]
A task for sorting dictionaries is available in the apertium-dixtools package.
Usage: apertium-dixtools sort [-group <symbol list>] [-right] [-ignorecase] <dic.dix> <out.dix> -ignorecase ignore case when sorting -right will sort according to value on right side (useful bidixes) -group <commaseparated list> will group symbol categories together. For example: -group n,n_symbol,adj,adv,vblex,vblex_symbol will sort all nouns, adj, adv and verbs together. Other entries will be sorted separately
There are also a number of generic options
Examples[edit]
Simple sorting, piping to less
$ apertium-dixtools sort -alignBidix apertium-sv-da.sv-da.dix - | less
Sorting, grouping nouns together, overwriting the original file
$ apertium-dixtools sort -group n,n_symbol -alignBidix apertium-eo-en.en.dix apertium-eo-en.en.dix