QuickDict 1.0.0
dotnet add package QuickDict --version 1.0.0
NuGet\Install-Package QuickDict -Version 1.0.0
<PackageReference Include="QuickDict" Version="1.0.0" />
<PackageVersion Include="QuickDict" Version="1.0.0" />
<PackageReference Include="QuickDict" />
paket add QuickDict --version 1.0.0
#r "nuget: QuickDict, 1.0.0"
#:package QuickDict@1.0.0
#addin nuget:?package=QuickDict&version=1.0.0
#tool nuget:?package=QuickDict&version=1.0.0
QuickDict
QuickDict is an open-source .NET library for generating language dictionaries in a variety of digital dictionary formats.
Install
QuickDict is published on NuGet Gallery: https://www.nuget.org/packages/QuickDict
Use this command in the NuGet Package Manager console to install QuickDict manually:
Install-Package QuickDict
Usage
Using QuickDict is as easy as:
- Create a
StarDictDictionary
orXdxfDictionary
instance - Set the dictionary's metadata (i.e. title, authors, languages, etc.)
- (Optional) Implement any of a dictionary's hooks with any custom processing code
- Add all of the dictionary's articles (i.e. term and definition pairs)
- (Optional) Add all of the dictionary's abbreviations (i.e. term and definition pairs)
- Save the dictionary to disk
Note: The library works best when using plain text in the
Sample Code
/// Create XdxfDictionary instance
var dict = new XdxfDictionary();
// Set the dictionary's metadata
dict.Metadata.LongTitle = "My Fancy French to English Dictionary";
dict.Metadata.Description = "Sample Dictionary made by QuickDict";
dict.Metadata.ArticleKeyLangCode = "FRA";
dict.Metadata.ArticleValueLangCode = "ENG";
// (Optional) Implement any of a dictionary's hooks
dict.GetXdxfKeysFromArticle = a =>
{
// XDXF can support an article with multiple terms for the same defintions,
// so assuming my input data has articles with multiple terms divided by commas,
// I split them here by the comma into separate keys
return a.Key.Split(',', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries).ToList();
};
dict.GetXdxfKeyOptionalTerms = () =>
{
// XDXF can support specifying parts of an article's terms which are "optional",
// and do not need to be matched when performing a search, so assuming my input data
// has these these gender terms "(masc)" and "(fem)" that aren't part of the actual word
// I can specify them here to be flagged as optional
return new HashSet<string>() { "(masc)", "(fem)" };
};
dict.GetXdxfValuesFromArticle = a =>
{
// XDXF can support an article with multiple defintions for the same terms,
// so assuming my input data has articles with multiple numbered definitions
// (i.e. 1. definition 2. other definition) I use the GetDefintions helper to
// split the single string into separate (unnumbered) definitions
return a.Value.GetDefinitions(false).ToList();
};
// Add all of the dictionary's articles
dict.AddArticle("bonjour", "1. interj. hello 2. dated. interj. good day");
dict.AddArticle("examinateur (masc), examinatrice (fem)", "n. examiner");
dict.AddArticle("horloge", "n. clock");
// (Optional) Add all of the dictionary's abbreviations
dict.AddAbbreviation("dated.", "interjection", AbbreviationType.Stylistic);
dict.AddAbbreviation("interj.", "interjection", AbbreviationType.Grammatical);
dict.AddAbbreviation("n.", "noun", AbbreviationType.Grammatical);
// Save the dictionary to disk
dict.Save("MyFancyFrenchToEnglishDictionary.xdxf");
This sample code will create a file named MyFancyFrenchToEnglishDictionary.xdxf
with the following contents:
<?xml version="1.0" encoding="utf-8"?>
<xdxf format="logical" revision="33" lang_from="FRA" lang_to="ENG">
<meta_info>
<full_title>My Fancy French to English Dictionary</full_title>
<description>Sample Dictionary made by QuickDict</description>
<abbreviations>
<abbr_def type="stl">
<abbr_k>dated.</abbr_k>
<abbr_v>interjection</abbr_v>
</abbr_def>
<abbr_def type="grm">
<abbr_k>interj.</abbr_k>
<abbr_v>interjection</abbr_v>
</abbr_def>
<abbr_def type="grm">
<abbr_k>n.</abbr_k>
<abbr_v>noun</abbr_v>
</abbr_def>
</abbreviations>
<creation_date>24-07-2025</creation_date>
</meta_info>
<lexicon>
<ar>
<k>bonjour</k>
<def>
<def>
<deftext>
<abbr>interj.</abbr> hello</deftext>
</def>
<def>
<deftext>
<abbr>dated.</abbr>
<abbr>interj.</abbr> good day</deftext>
</def>
</def>
</ar>
<ar>
<k>examinateur <opt>(masc)</opt></k>
<k>examinatrice <opt>(fem)</opt></k>
<def>
<deftext>
<abbr>n.</abbr> examiner</deftext>
</def>
</ar>
<ar>
<k>horloge</k>
<def>
<deftext>
<abbr>n.</abbr> clock</deftext>
</def>
</ar>
</lexicon>
</xdxf>
Build
Building QuickDict requires:
- A PC with the .NET 8 SDK installed
- The QuickDict source
Then you should be able to run the following command to build QuickDict from within its source folder:
dotnet build ./src/QuickDict.sln
Test
With the above setup, you should be able to run the following command to test QuickDict from within its source folder:
dotnet test ./src/QuickDict.sln
Errata
QuickDict is open-source under the MIT license.
Copyright (c) 2025 Jon Thysell.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.