示例#1
0
        private void UpdateNounPhraseLayerFor(NounPhraseBuilder nounPhraseBuilder)
        {
            LayerNounPhrase dbSavedNounPhraseLayer;
            LayerNounPhrase existingNounPhraseLayer = LayerNounPhrases.FirstOrDefault(nounPhraseLayer => nounPhraseLayer.ID.Equals(nounPhraseBuilder.FlexDB_ID));

            if (existingNounPhraseLayer != null)
            {
                dbSavedNounPhraseLayer = existingNounPhraseLayer;
            }
            else
            {
                dbSavedNounPhraseLayer = new LayerNounPhrase {
                    ID = nounPhraseBuilder.FlexDB_ID
                };
                LayerNounPhrases.InsertOnSubmit(dbSavedNounPhraseLayer);
            }
            dbSavedNounPhraseLayer.AdjectiveOrdering = nounPhraseBuilder.AdjectiveOrderingSpecified ? nounPhraseBuilder.AdjectiveOrdering : null;
            dbSavedNounPhraseLayer.Elided            = nounPhraseBuilder.ElidedSpecified ? nounPhraseBuilder.Elided : null;
            dbSavedNounPhraseLayer.Number            = nounPhraseBuilder.NumberSpecified ? (byte)nounPhraseBuilder.Number : null;
            dbSavedNounPhraseLayer.Gender            = nounPhraseBuilder.GenderSpecified ? (byte)nounPhraseBuilder.Gender : null;
            dbSavedNounPhraseLayer.Person            = nounPhraseBuilder.PersonSpecified ? (byte)nounPhraseBuilder.Person : null;
            dbSavedNounPhraseLayer.Possessive        = nounPhraseBuilder.PossessiveSpecified ? nounPhraseBuilder.Possessive : null;
            dbSavedNounPhraseLayer.Pronominal        = nounPhraseBuilder.PronominalSpecified ? nounPhraseBuilder.Pronominal : null;
            UpdateLayerNounPhrase(dbSavedNounPhraseLayer);
        }
示例#2
0
 private void BuildNounPhraseLayerOf(NounPhraseBuilder nounPhraseBuilder, UnifiedNode phraseResult)
 {
     nounPhraseBuilder.AdjectiveOrderingSpecified = phraseResult.NP_AdjectiveOrdering != null;
     if (nounPhraseBuilder.AdjectiveOrderingSpecified)
     {
         nounPhraseBuilder.AdjectiveOrdering = (bool)phraseResult.NP_AdjectiveOrdering;
     }
     nounPhraseBuilder.ElidedSpecified = phraseResult.NP_Elided != null;
     if (nounPhraseBuilder.ElidedSpecified)
     {
         nounPhraseBuilder.Elided = (bool)phraseResult.NP_Elided;
     }
     nounPhraseBuilder.NumberSpecified = phraseResult.NP_Number != null;
     if (nounPhraseBuilder.NumberSpecified)
     {
         nounPhraseBuilder.Number = (numberAgreement)phraseResult.NP_Number;
     }
     nounPhraseBuilder.GenderSpecified = phraseResult.NP_Gender != null;
     if (nounPhraseBuilder.GenderSpecified)
     {
         nounPhraseBuilder.Gender = (gender)phraseResult.NP_Gender;
     }
     nounPhraseBuilder.PersonSpecified = phraseResult.NP_Person != null;
     if (nounPhraseBuilder.PersonSpecified)
     {
         nounPhraseBuilder.Person = (person)phraseResult.NP_Person;
     }
     nounPhraseBuilder.PossessiveSpecified = phraseResult.NP_Possessive != null;
     if (nounPhraseBuilder.PossessiveSpecified)
     {
         nounPhraseBuilder.Possessive = (bool)phraseResult.NP_Possessive;
     }
     nounPhraseBuilder.PronominalSpecified = phraseResult.NP_Pronominal != null;
     if (nounPhraseBuilder.PronominalSpecified)
     {
         nounPhraseBuilder.Pronominal = (bool)phraseResult.NP_Pronominal;
     }
 }
示例#3
0
 internal NounPhraseProperties(NounPhraseBuilder npb) : base(npb)
 {
     Model = npb;
 }