By looking up a word with transform
from the active line menu or
lookup_transform
during target selection (both bound to Ctrl
+⏎
by default),
transformations are applied to the selected text before searching the
dictionary. All possible results are looked up, including the untransformed
selection.
Transformations must be defined for each dictionary by adding an entry named
transformations
to its section in immersive-dicts.conf
. The value of the
entry should be a comma-separated list of IDs, depending on the type of
transformation with an additional parameter in parentheses following
immediately after:
transformations=deinflect-japanese,deinflect-migaku(ja.json),kana
Deinflection based on the language-agnostic format used by the Migaku Dictionary
addon for Anki. The parameter is the path to a deconjugation file and can be either
absolute, or relative to <mpv config dir>/immersive-data/inflection-tables/
.
The tables (conjugations.json
) can be taken from the addon's directories or
the Migaku Mega folder.
Built-in Japanese-specific deinflection based on the five basic forms (未然形, 連用形, 終止・連体形, 仮定形, 命令形).
The following inflections are supported. The characters enclosed in 「」 are what needs to be selected, everything following is only meant to serve as an example, e.g. a selection of 迷わ from 迷わず also results in 迷う, even though the example given is 「◯わ」ない:
Deinflected | Inflections |
---|---|
五段 | |
◯う | 「◯わ」ない, 「◯お」う, 「◯い」ます, 「◯っ」て, 「◯え」ば |
◯く | 「◯か」ない, 「◯こ」う, 「◯き」ます, 「◯い」て, 「◯け」ば |
◯ぐ | 「◯が」ない, 「◯ご」う, 「◯ぎ」ます, 「◯い」で, 「◯げ」ば |
◯す | 「◯さ」ない, 「◯そ」う, 「◯し」ます, 「◯せ」ば |
◯つ | 「◯た」ない, 「◯と」う, 「◯ち」ます, 「◯っ」て, 「◯て」ば |
◯ぬ | 「◯な」ない, 「◯の」う, 「◯に」ます, 「◯ん」で, 「◯ね」ば |
◯ぶ | 「◯ば」ない, 「◯ぼ」う, 「◯び」ます, 「◯ん」で, 「◯べ」ば |
◯む | 「◯ま」ない, 「◯も」う, 「◯み」ます, 「◯ん」で, 「◯め」ば |
◯る | 「◯ら」ない, 「◯ろ」う, 「◯り」ます, 「◯っ」て, 「◯れ」ば |
一段 | |
Any stem that could theoretically exist, i.e. all selections ending in い・え段 hiragana or non-hiragana (e.g. 「見」た or 「ウケ」て). | |
サ変 | |
◯する | 「◯さ」ない, 「◯し」ます, 「◯す」, 「◯せ」, 「◯そ」う, 「◯すれ」ば, 「◯しろ」, 「◯しよ」, 「◯せよ」 |
◯ずる | 「◯じ」ない, 「◯ぜ」ず, 「◯ずれ」ば, 「◯じろ」, 「◯じよ」, 「◯ぜよ」 |
形容詞 | |
◯い | 「◯かろ」う, 「◯く」, 「◯かっ」た, 「◯き」, 「◯けれ」ば, 「◯かれ」, 「◯さ」, 「◯そう」 |
Special Cases | |
する | 「為」ない, 「さ」せる, 「し」よう, 「せ」ず, 「為れ」ば, 「すれ」ば, 「為よ」, 「せよ」, 「為ろ」, 「しろ」 |
来る | 「来」ない, 「來」ない, 「こ」よう, 「き」て, 「来れ」ば, 「來れ」ば, 「くれ」ば, 「来い」, 「來い」, 「こい」 |
行く | 「行っ」た |
逝く | 「逝っ」た |
往く | 「往っ」た |
いらっしゃる | いらっしゃい |
おっしゃる | おっしゃい, 仰っしゃい, 仰しゃい, 仰い, 仰有い |
くださる | ください, 下ださい, 下さい |
ござる | ござい, 御座い, ご座い |
なさる | なさい, 為さい |
Converts any kana in the selection to hiragana and katakana. For example, あイうエお will result in a lookup of あイうエお, あいうえお, and アイウエオ.