⚒️How it works
How does it work?
This function first downloads the word information from the dictionary API if it's not cached yet. If the word is cached, it'll return the cached DictionaryWord instance in an array.
However, if it's the first time using the word, it attempts to serialize the result into a DictionaryWord array that contains necessary information.
A DictionaryWord contains the following properties:
string WordThe actual word
string PhoneticWordThe base phonetic representation of the word
List<Phonetic> PhoneticsThe alternative phonetic representations
List<Meaning> MeaningsWord meanings
License LicenseInfoLicense information
List<string> SourceUrlsList of where we got the word information from
A Phonetic class contains the following properties:
string TextPhonetic representation of the word
string AudioLink to the pronounciation, usually in MP3 format. Use NAudio (Windows) to play it.
string SourceUrlFrom where did we get the audio from?
License LicenseLicense information for the source
A Meaning class contains the following properties:
string PartOfSpeechPart of speech, usually noun, verb, adjective, adverb, interjection, etc.
List<DefinitionType> DefinitionsList of word definitions. Words usually come with one or more definitions.
List<string> SynonymsList of synonyms based on the word meaning
List<string> AntonymsList of antonyms based on the word meaning
A DefinitionType class contains the following properties:
string DefinitionWord definition
List<string> SynonymsList of synonyms based on the definition
List<object> AntonymsList of antonyms based on the definition
string ExampleExample in sentence
A License class contains the following properties:
string NameLicense name
string UrlLicense URL
You should be showing the license information somewhere in your program, usually in the About section, using the License class found within the dictionary word instance.
Last updated