<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Offline Lookup on Jingyuan</title>
        <link>https://jingyuan-zheng.github.io/tags/offline-lookup/</link>
        <description>Recent content in Offline Lookup on Jingyuan</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en-US</language>
        <copyright>Jingyuan Zheng</copyright>
        <lastBuildDate>Mon, 26 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://jingyuan-zheng.github.io/tags/offline-lookup/index.xml" rel="self" type="application/rss+xml" /><item>
            <title>Ġabra Dictionary Update: Offline Maltese Lookup on Phones, Windows, and Linux</title>
            <link>https://jingyuan-zheng.github.io/p/gabra-mdx-cross-platform-update/</link>
            <pubDate>Fri, 02 Oct 2026 00:00:00 +0000</pubDate>
            <guid>https://jingyuan-zheng.github.io/p/gabra-mdx-cross-platform-update/</guid>
            <description>&lt;img src=&#34;https://jingyuan-zheng.github.io/img/gabra-mdx-cross-platform-update/macos-dictionary.png&#34; alt=&#34;Featured image of post Ġabra Dictionary Update: Offline Maltese Lookup on Phones, Windows, and Linux&#34; /&gt;&lt;p&gt;Ġabra Maltese Dictionary now has an MDX edition for compatible readers on phones and computers. Mac users can continue using the native dictionary with macOS lookup features.&lt;/p&gt;&#xA;&lt;p&gt;The &lt;a class=&#34;link&#34; href=&#34;https://jingyuan-zheng.github.io/p/introducing-%c4%a1abra-a-native-maltese-dictionary-for-macos/&#34; &gt;earlier article&lt;/a&gt; introduced the Mac edition. The project has since moved from &lt;code&gt;gabra-maltese-macos-dictionary&lt;/code&gt; to &lt;a class=&#34;link&#34; href=&#34;https://github.com/Jingyuan-Zheng/gabra-maltese-dictionary&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;gabra-maltese-dictionary&lt;/a&gt;, adding ready-made MDX files and cross-platform conversion tools. You can download the dictionary for a phone without first converting it on a Mac.&lt;/p&gt;&#xA;&lt;h2 id=&#34;choose-the-format-before-downloading&#34;&gt;Choose the format before downloading&#xA;&lt;/h2&gt;&lt;p&gt;The &lt;a class=&#34;link&#34; href=&#34;https://github.com/Jingyuan-Zheng/gabra-maltese-dictionary/releases/tag/v1.0&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;v1.0 release&lt;/a&gt; now contains both an MDX ZIP and the native macOS DMG. Their lookup coverage differs.&lt;/p&gt;&#xA;&lt;table&gt;&#xA;&#x9;&lt;thead&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;Edition&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;Contents and lookup&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;How to use it&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/thead&gt;&#xA;&#x9;&lt;tbody&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;MDX + CSS&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;19,831 searchable headwords containing 21,083 source records&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Import into an MDX-compatible reader&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;macOS &lt;code&gt;.dictionary&lt;/code&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;21,083 entries with approximately 4.5 million searchable word forms&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Install in Dictionary and use supported system lookup features&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;p&gt;The MDX headword count is lower because one headword can contain several records. The project&amp;rsquo;s &lt;a class=&#34;link&#34; href=&#34;https://github.com/Jingyuan-Zheng/gabra-maltese-dictionary/blob/main/docs/mdx-validation.json&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;validation report&lt;/a&gt; records all 21,083 source entries as retained. A lower headword count does not by itself mean entries were dropped.&lt;/p&gt;&#xA;&lt;p&gt;The approximately 4.5 million searchable forms belong to the native macOS edition. MDX provides headword lookup without the same inflected-form index. Keep the native edition on Mac if you often look up conjugations or plurals while reading. MDX makes the entries portable, with a different search scope.&lt;/p&gt;&#xA;&lt;h2 id=&#34;continue-using-the-native-mac-dictionary&#34;&gt;Continue using the native Mac dictionary&#xA;&lt;/h2&gt;&lt;p&gt;Download &lt;code&gt;GabraMalteseDict_v1.0.dmg&lt;/code&gt; from &lt;a class=&#34;link&#34; href=&#34;https://github.com/Jingyuan-Zheng/gabra-maltese-dictionary/releases&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Releases&lt;/a&gt;, open it, and copy &lt;code&gt;Gabra.dictionary&lt;/code&gt; into &lt;code&gt;~/Library/Dictionaries&lt;/code&gt;. In Finder, press &lt;strong&gt;Shift-Command-G&lt;/strong&gt; and enter that path if the folder is difficult to locate.&lt;/p&gt;&#xA;&lt;p&gt;Open Dictionary, enable Ġabra Maltese Dictionary in &lt;strong&gt;Dictionary → Settings&lt;/strong&gt;, and try a Maltese word. The native view displays definitions and any part-of-speech, phonetic, and root information present in the entry (see Figure 1).&lt;/p&gt;&#xA;&lt;div class=&#34;post-figure&#34;&gt;&#xA;&lt;img src=&#34;https://jingyuan-zheng.github.io/img/gabra-mdx-cross-platform-update/macos-dictionary.png&#34; alt=&#34;Ġabra Maltese entries in the macOS Dictionary app&#34;&gt;&#xA;&lt;div class=&#34;caption&#34;&gt;Figure 1: The native macOS dictionary. Other platforms use the MDX edition described below.&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;In supported apps, use the Look Up contextual-menu command, three-finger tap, or Force Click. Choose the gesture in &lt;strong&gt;System Settings → Trackpad → Point &amp;amp; Click → Look up &amp;amp; data detectors&lt;/strong&gt;. Spotlight dictionary results depend on your macOS configuration. Confirm lookup in Dictionary first, then check the other entry points.&lt;/p&gt;&#xA;&lt;p&gt;You can keep an existing native installation. Adding the MDX edition does not require removing the Mac dictionary.&lt;/p&gt;&#xA;&lt;h2 id=&#34;import-mdx-on-a-phone-or-another-computer&#34;&gt;Import MDX on a phone or another computer&#xA;&lt;/h2&gt;&lt;p&gt;Download &lt;a class=&#34;link&#34; href=&#34;https://github.com/Jingyuan-Zheng/gabra-maltese-dictionary/releases/download/v1.0/GabraMalteseDict_MDX_v1.0.zip&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;GabraMalteseDict_MDX_v1.0.zip&lt;/a&gt;. Extract these two files and keep them together:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;&#xA;&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1&#xA;&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2&#xA;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#xA;&lt;td class=&#34;lntd&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Gabra.mdx&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Gabra.css&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&lt;p&gt;&lt;code&gt;Gabra.mdx&lt;/code&gt; contains the dictionary; &lt;code&gt;Gabra.css&lt;/code&gt; controls entry styling. A reader may use its own default appearance when the stylesheet is missing, so transfer both files when copying or syncing the dictionary.&lt;/p&gt;&#xA;&lt;p&gt;You also need an MDX-compatible reader. The ZIP supplies dictionary files, without installing a reader. The project README lists these choices:&lt;/p&gt;&#xA;&lt;table&gt;&#xA;&#x9;&lt;thead&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;Platform&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;Readers listed by the project&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/thead&gt;&#xA;&#x9;&lt;tbody&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;iPhone / iPad&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;&lt;a class=&#34;link&#34; href=&#34;https://apps.apple.com/app/id6759032057&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;OpenMDict&lt;/a&gt; or &lt;a class=&#34;link&#34; href=&#34;https://apps.apple.com/app/id389083586&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;MDict&lt;/a&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Android&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/Jimex/DictTango-Android/releases&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;DictTango&lt;/a&gt; or &lt;a class=&#34;link&#34; href=&#34;https://www.mdict.cn/wp/?page_id=5227&amp;amp;lang=en&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;MDict&lt;/a&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Windows&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/xiaoyifang/goldendict-ng/releases/latest&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;GoldenDict-ng&lt;/a&gt; or &lt;a class=&#34;link&#34; href=&#34;https://github.com/Jimex/DictTango-Windows/releases&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;DictTango Windows&lt;/a&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Linux&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;&lt;a class=&#34;link&#34; href=&#34;https://xiaoyifang.github.io/goldendict-ng/install/#linux&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;GoldenDict-ng&lt;/a&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;MDX on macOS&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;GoldenDict-ng or MDict; Apple Dictionary uses the native edition above&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;p&gt;Use the reader&amp;rsquo;s dictionary-import or add-folder feature. On a phone or tablet, transfer both files into storage the reader can access. Import screens vary, so follow the selected app&amp;rsquo;s instructions.&lt;/p&gt;&#xA;&lt;p&gt;Try a headword after importing and check its definition and appearance. Entries retain available parts of speech, phonetics, and roots. The stylesheet follows the reader&amp;rsquo;s light or dark theme; edit &lt;code&gt;Gabra.css&lt;/code&gt; to customize it. Check a few entries because rendering can differ between readers.&lt;/p&gt;&#xA;&lt;h2 id=&#34;if-a-word-does-not-appear-after-importing&#34;&gt;If a word does not appear after importing&#xA;&lt;/h2&gt;&lt;p&gt;First check whether Ġabra appears in the reader&amp;rsquo;s dictionary list and is enabled. If it is missing, return to the import step and select the extracted &lt;code&gt;Gabra.mdx&lt;/code&gt;, rather than the downloaded ZIP. For a desktop reader that scans folders, confirm that the configured folder contains the dictionary file.&lt;/p&gt;&#xA;&lt;p&gt;If the dictionary is listed but a search returns nothing, open a known headword within the dictionary and try searching for it. This helps distinguish a loading problem from an unmatched query. A form copied from a sentence may be a conjugation or a plural. Try its dictionary form next. The native Mac edition has broader word-form lookup; changing MDX readers does not supply that missing index.&lt;/p&gt;&#xA;&lt;p&gt;If definitions appear but the layout looks wrong, check that &lt;code&gt;Gabra.css&lt;/code&gt; was transferred alongside the MDX. Keep the filenames unchanged. If the files ended up in different folders, put them together again and refresh or reimport them as your reader requires. Open several entries in dark mode too, checking that the text remains readable against the background.&lt;/p&gt;&#xA;&lt;p&gt;Before relying on the dictionary somewhere without internet access, disconnect and look up a word. This checks that the files are actually available on the device, rather than waiting to download from cloud storage when you need them.&lt;/p&gt;&#xA;&lt;h2 id=&#34;rebuilding-uses-two-separate-tools&#34;&gt;Rebuilding uses two separate tools&#xA;&lt;/h2&gt;&lt;p&gt;Download the ready-made files if you only want to use the dictionary. To customize the stylesheet or rebuild MDX, run these commands from the new repository&amp;rsquo;s root:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;&#xA;&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1&#xA;&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2&#xA;&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3&#xA;&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4&#xA;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#xA;&lt;td class=&#34;lntd&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;python3 -m venv .venv&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;source&lt;/span&gt; .venv/bin/activate&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;python -m pip install -r requirements.txt&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;python scripts/convert_to_mdx.py sources/gabra/Body.data&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&lt;p&gt;This requires Python 3.10 or newer and works on macOS, Windows, and Linux. On Windows, activate with &lt;code&gt;.venv\Scripts\activate&lt;/code&gt;. Output goes into &lt;code&gt;dictionaries/mdx/&lt;/code&gt; as &lt;code&gt;Gabra.mdx&lt;/code&gt; and &lt;code&gt;Gabra.css&lt;/code&gt;. Edit &lt;code&gt;assets/mdx/Gabra.css&lt;/code&gt; before building to change the generated stylesheet.&lt;/p&gt;&#xA;&lt;p&gt;The included &lt;code&gt;Body.data&lt;/code&gt; snapshot contains entry bodies extracted from an existing native dictionary. Rebuilding MDX from it does not fetch newer upstream data or regenerate the native word-form index. A newer build date alone does not indicate newer dictionary content.&lt;/p&gt;&#xA;&lt;p&gt;The native edition has a separate BSON build, requiring macOS and Apple&amp;rsquo;s Dictionary Development Kit. Put one upstream &lt;code&gt;.tar.gz&lt;/code&gt; containing &lt;code&gt;gabra/lexemes.bson&lt;/code&gt; and &lt;code&gt;gabra/wordforms.bson&lt;/code&gt; in &lt;code&gt;data/&lt;/code&gt;, then run:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;&#xA;&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1&#xA;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#xA;&lt;td class=&#34;lntd&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bash scripts/update_macos.sh&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&lt;p&gt;The result is &lt;code&gt;macos/objects/Gabra.dictionary&lt;/code&gt;. Use &lt;code&gt;bash scripts/update_macos.sh --install&lt;/code&gt; to install it too; an existing installed dictionary is backed up under &lt;code&gt;build/&lt;/code&gt; first. This script expects you to supply the upstream archive. It does not download the latest BSON automatically.&lt;/p&gt;&#xA;&lt;h2 id=&#34;data-and-licensing&#34;&gt;Data and licensing&#xA;&lt;/h2&gt;&lt;p&gt;Dictionary data comes from Ġabra / MLRS at the University of Malta under &lt;strong&gt;CC BY 3.0&lt;/strong&gt;. Project code is licensed under &lt;strong&gt;GNU GPL v3&lt;/strong&gt;. Check the data and code licenses separately when redistributing files or building another dictionary; the &lt;a class=&#34;link&#34; href=&#34;https://github.com/Jingyuan-Zheng/gabra-maltese-dictionary/blob/main/docs/ATTRIBUTION.md&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;attribution page&lt;/a&gt; records the source.&lt;/p&gt;&#xA;&lt;p&gt;Use the native edition for system integration and inflected-form lookup on Mac. Use MDX for headword lookup on other devices, keeping its stylesheet with the dictionary. Current downloads and build requirements are in the &lt;a class=&#34;link&#34; href=&#34;https://github.com/Jingyuan-Zheng/gabra-maltese-dictionary#readme&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;new repository README&lt;/a&gt;.&lt;/p&gt;&#xA;</description>
        </item></channel>
</rss>
