From c062ab232d213c89077b3c170dcf2cf16f2ce376 Mon Sep 17 00:00:00 2001 From: shenleban tongying Date: Thu, 2 May 2024 10:45:34 -0400 Subject: [PATCH] doc: extra info about morphology --- website/docs/dictformats.md | 19 +-------------- website/docs/manage_sources.md | 44 +++++++++++++++++++++++++--------- 2 files changed, 34 insertions(+), 29 deletions(-) diff --git a/website/docs/dictformats.md b/website/docs/dictformats.md index 43d3de97..59971181 100644 --- a/website/docs/dictformats.md +++ b/website/docs/dictformats.md @@ -28,24 +28,7 @@ Popular dictionary formats are all supported. ## Other Sources -**Programs** - -Any external apps can be added by setting a launch command. The `%GDWORD%` will be replaced by word from search line. If command line don't contains such template the word will be fed into standard input stream in 8-bit current locale encoding. - -| Type | Notes | -|--|--| -| Audio| Application play sound. A sound icon will be provided as article, click it will trigger the program. | -| Text | Application output some plain text in 8-bit current locale encoding into standard output stream. This text will be shown as separate article. | -| Html | Application output some html code into standard output stream. This code will be shown as separate article. | -| Prefix | Application output some word list into standard output stream. This list will be added in common matches list.| - -**System Text-to-speech engines** - -Its capability is provided via Qt Speech. - -On Windows & macOS, the system provides sounds. - -On Linux, speech-dispatcher and flite are the backends. +Various special "dictionaries" can be added, such as Programs, TTS, Morphology, Transliteration, etc... Their doc located at [Sources Management](manage_sources.md) ## Additional info diff --git a/website/docs/manage_sources.md b/website/docs/manage_sources.md index 151e518f..78baf1a9 100644 --- a/website/docs/manage_sources.md +++ b/website/docs/manage_sources.md @@ -28,11 +28,21 @@ Goldendict will search through the sound file names when querying words. ## Morphology -Here you can turn on/off morphology dictionaries. +A word could have several forms, but sometimes a dictionary only contains one form that could not be found unless you search the normalized form. -You can specify a path that includes Hunspell format data files (.aff + .dic). +Morphology dictionary uses Hunspell's morphological analysis to obtain word's variant forms. -GoldenDict scan this folder and create list of available dictionaries. To turn on dictionary just set mark in corresponding column. +You can specify a path that includes Hunspell format data files (`.aff` + `.dic`). GoldenDict scan this folder and create a list of available dictionaries. + +One possible source of Hunspell dictionaries is Libreoffice's [dictionaries](https://github.com/LibreOffice/dictionaries). + +The detailed document about the affix file (`.aff`) and the dict file (`.dic`) can be found at [hunspell.5](https://man.archlinux.org/man/hunspell.5.en). + +Note that lots of Hunspell's dictionaries are for mostly for spell checking, and they may lack special morphological rules (For example, related words don't share the same stem in `.dic` file). +There are some specially tailored hunspell dicts to use for Morphology. Such as + +* +* ## Websites @@ -58,17 +68,29 @@ In the "Icon" column you can set custom icon for every server. If you add icon f ## Programs -Here you can add external applications. To add such application you should set command line for its launch, name for dictionaries list and application type. The `%GDWORD%` template in command line will be replaced by word from search line. If command line don't contains such template the word will be fed into standard input stream in 8-bit current locale encoding. +Here you can add external applications. To add such application, you should set command line for its launch, name for the dictionary list and application type. -| Application type | The purpose of application | -|---|---| -| Audio | Application play sound. | -| Text | Application output some plain text in 8-bit current locale encoding into standard output stream. This text will be shown as separate article. | -| Html | Application output some html code into standard output stream. This code will be shown as separate article. | -| Prefix | Application output some word list into standard output stream. This list will be added in common matches list. | +The `%GDWORD%` in command line will be replaced by word from search line. If the command line doesn't contain such `%GDWORD%` the word will be fed into standard input stream in 8-bit current locale encoding. -In the "Icon" column you can set custom icon for every application. If you add icon file name without path GoldenDict will search this file in configuration folder. +| Program type | Purpose | +|--------------|---------------------------------------------------------------------------------------| +| Audio | Play sound. | +| Text | Text printed by the program will be shown as separate article. | +| HTML | HTML printed by the program Will be shown as separate article. | +| Prefix match | A list of words printed by the program will be added to search bar's completion list. | + +Other than "Audio", the program should print the content to standard output. + +In the "Icon" column, you can set a custom icon for every application. If you add icon file name without a path, GoldenDict will search this file in the configuration folder. ## Transliteration Here you can add transliteration algorithms. To add algorithm into dictionaries list just set mark beside it. When such dictionary added into current dictionaries group GoldenDict will search word in the input line as well as result of its handling by corresponding transliteration algorithm. + +## System Text-to-speech engines + +Its capability is provided via Qt Speech. + +On Windows & macOS, the system provides sounds. + +On Linux, speech-dispatcher and flite are the backends. \ No newline at end of file