Usage

  --help                produce help message
  --lsd arg             LSD dictionary to decode
  --duden arg           Duden dictionary to decode (.inf file)
  --lsa arg             LSA sound archive to decode
  --source-filter arg   ignore dictionaries with source language !=
                        source-filter
  --target-filter arg   ignore dictionaries with target language !=
                        target-filter
  --codes               print supported languages and their codes
  --out arg             output directory
  --dumb                don't combine variant headings and headings referencing
                        the same article
  --verbose             verbose logging
  --version             print version

Lingvo examples

Converting a single dictionary

$ lsd2dsl --lsd /path/to/dictionary.lsd --out /output/directory

Notice that a directory is being specified for output. The reason is that the output is not necessarily a single DSL file, but rather a set of the dictionary and attached data.

Filtering by language

When processing many dictionaries at once, e.g. the whole set bundled with a Lingvo installation, you might want to only process certain languages.

First, determine the codes for languages you are interested in. Either look at the list of known language codes using

$ lsd2dsl --codes

Or omit the --out argument and look at the language codes used in a particular dictionary

$ lsd2dsl --lsd /tmp/CommunicationDeRu.lsd
Header:
  Version:  141004
  Headings: 66
  Source:   1031 (German)
  Target:   1049 (Russian)
  Name:     Communication (De-Ru)

Knowing the right language codes you can now process a directory containing several dictionaries, filtering out uninteresting ones.

The following command will select all DE-RU dictionaries in the folder, ignoring all other languages

$ for f in /path/to/dir/*.lsd; do lsd2dsl --lsd $f --out /output/dir --source-filter 1031 --target-filter 1049; done

Other combinations like DE-any or any-DE are possible by omiting either --source-filter or --target-filter.

The --dumb switch

See Variant headings for explanation.

Converting a single audio archive

lsd2dsl --lsa /path/to/archive.lsa --out /output/dir