Пример #1
0
    public static void exportWordTypes()
    {
        //KDict
        var items = DictK.Lib.readDict().SelectMany(en => en.dictEntries).SelectMany(de => de.descendants());

        File.WriteAllLines(@"d:\temp\kdict.txt", items.OfType <DictK.MPartOfSpeech>().Select(p => p.content).Distinct().OrderBy(w => w));
        //UltraLingua
        var ulDicts = DictLib.allDicts(@"d:\LMCom\rew\Web4\RwDicts\Sources\Ultralingua.back\", "dict_").Select(d => Ultralingua.Lib.readDict(d));

        File.WriteAllLines(@"d:\temp\UltraLingua.txt", ulDicts.SelectMany(dict => dict.Entries.SelectMany(en => en.Body.DescendantsAttr("class", "partofspeech").Select(e => e.Value))).Distinct().OrderBy(w => w));
        //Lingea
        var lingDicts = DictLib.allDicts(@"d:\LMCom\rew\Web4\RwDicts\Sources\LingeaOld\").Select(d => LingeaDictionary.readDict(d));

        File.WriteAllLines(@"d:\temp\lingea.txt", lingDicts.SelectMany(dict => dict.entries.SelectMany(en => en.entry.DescendantsAttr("class", "morf").Select(e => e.Value))).Distinct().OrderBy(w => w));
        //Wiki
        var wikiDicts = DictLib.allDicts(@"d:\LMCom\rew\Web4\RwDicts\Sources\Wiktionary\", "dict_").Select(d => Wikdionary.Lib.readDict(d));

        File.WriteAllLines(@"d:\temp\wiki.txt", wikiDicts.SelectMany(dict => dict.entries.SelectMany(en => en.entry.DescendantsAttr("class", "morf").Select(e => e.Value))).Distinct().OrderBy(w => w));
        //RJ
        var rjDicts = DictLib.allDicts(@"d:\LMCom\rew\Web4\RwDicts\Sources\RJ\").Select(d => DictLib.readDict(@"d:\LMCom\rew\Web4\RwDicts\Sources\RJ\", d));

        File.WriteAllLines(@"d:\temp\rj.txt", rjDicts.SelectMany(dict => dict.entries.SelectMany(en => en.entry.DescendantsAttr("class", "morf").Select(e => e.Value))).Distinct().OrderBy(w => w));
    }
Пример #2
0
 public static Complexes readDict(DictLib.dictId id) {
   return XmlUtils.FileToObject<Complexes>(id.fileName(@"d:\LMCom\rew\Web4\RwDicts\Sources\Ultralingua.back\"));
 }
Пример #3
0
 public static DictObj readDict(DictLib.dictId id) {
   return DictLib.readDict(@"d:\LMCom\rew\Web4\RwDicts\Sources\Wiktionary\", id);
 }
Пример #4
0
 public static DictObj readDict(DictLib.dictId id) {
   return DictLib.readDict(@"d:\LMCom\rew\Web4\RwDicts\Sources\LingeaOld\", id);
 }