示例#1
0
        /// <summary>Return the word for the abbreviation.</summary>
        /// <param name="word">The word.</param>
        /// <param name="dictionary2Use">The dictionary2 use.</param>
        /// <returns></returns>
        public string Convert_Word(string word, enWord_Dictionary dictionary2Use)
        {
            IDictionary <string, string> wordDictionary = dictionary2Use.zLoadDictionary();
            string result;

            if (wordDictionary.TryGetValue(word, out result))
            {
                return(result);
            }

            return(word);
        }
示例#2
0
        /// <summary>Return dictionary of abbreviation to word.</summary>
        /// <returns></returns>
        public IDictionary <string, string> WordConversionDictionary(enWord_Dictionary wordDictionary)
        {
            IDictionary <string, string> result = null;

            switch (wordDictionary)
            {
            case enWord_Dictionary.Abbreviation_2Word:
                result = _abbr2WordDict ?? (_abbr2WordDict = _lamed.Types.List.String.ToDictionary(enWord_List.Abbreviations.zLoadList(), "="));
                break;

            case enWord_Dictionary.Abbreviation_FromWord:
                result = _abbrFromWordDict ?? (_abbrFromWordDict = _lamed.Types.List.String.ToDictionary(enWord_List.Abbreviations.zLoadList(), "=", true));
                break;

            case enWord_Dictionary.SimpleEnglish_2Word:
                result = _simpEngl2WordDict ?? (_simpEngl2WordDict = _lamed.Types.List.String.ToDictionary(enWord_List.SimpleEnglishWords.zLoadList(), "=", true));
                break;

            case enWord_Dictionary.SimpleEnglish_FromWord:
                result = _simpEnglFromWordDict ?? (_simpEnglFromWordDict = _lamed.Types.List.String.ToDictionary(enWord_List.SimpleEnglishWords.zLoadList(), "="));
                break;
            }
            return(result);
        }
示例#3
0
 // <summary>Loads the word list.</summary>
 /// <param name="wordDictionary">The word list.</param>
 /// <returns></returns>
 public static IDictionary <string, string> zLoadDictionary(this enWord_Dictionary wordDictionary)
 {
     return(LamedalCore_.Instance.lib.Words.LoadList.WordConversionDictionary(wordDictionary));
 }