Example #1
0
        private FlexEntry MakeFwEntryFromWeSayEntry(WeSay.LexicalModel.LexEntry weSayEntry)
        {
            //MoStemMsa msa = new MoStemMsa();
            //// I wouldn't even *pretend* to understand this weirdness. Is 'dummy' a technical term?
            //DummyGenericMSA dmsa = DummyGenericMSA.Create(msa);
            //MoMorphType mmt = _flexMorphTypes.Item(MoMorphType.kmtStem);
            //LexEntry entry = LexEntry.CreateEntry(_cache, EntryType.ketMajorEntry, mmt, weSayEntry.LexicalForm, null, weSayEntry.Gloss, dmsa);
            FlexEntry entry = new FlexEntry();

            _cache.LangProject.LexDbOA.EntriesOC.Add(entry);
            //(_cache, EntryType.ketMajorEntry, mmt, weSayEntry.LexicalForm, null, weSayEntry.Gloss, dmsa);

            entry.Guid = weSayEntry.Guid;

            entry.LexemeFormOA = new MoStemAllomorph();
//            entry.LexemeFormOA.Form.VernacularDefaultWritingSystem
//                    = weSayEntry.LexicalForm;
            //LexSense.CreateSense(entry, dmsa, weSayEntry.Gloss);

            MakeSense(weSayEntry, entry);

//            if (Merged != null)
//            {
//                Merged.Invoke(this, "Added");
//            }
            return(entry);
        }
Example #2
0
        private static void MakeSense(WeSay.LexicalModel.LexEntry weSayEntry, FlexEntry flexEntry)
        {
            FlexSense sense = new FlexSense();

            flexEntry.SensesOS.Append(sense);
            //  sense.Gloss.AnalysisDefaultWritingSystem = weSayEntry.Senses[0];

//            if (weSayEntry.Example != null && weSayEntry.Example.Length >0)
//            {
//                LexExampleSentence example = new LexExampleSentence();
//                sense.ExamplesOS.Append(example);
//                 example.Example.VernacularDefaultWritingSystem.Text = weSayEntry.Example;
//          }
        }