Пример #1
0
 public EnglishWordSentiment(string word, string valence,
                             string stateIntensity, string emotion, string judgment,
                             string agreement, string intention)
 {
     Word = word;
     if (!Enum.TryParse(valence, out this.valence))
     {
         this.valence = Valence.NULL;
     }
     if (!Enum.TryParse(stateIntensity, out this.stateIntensity))
     {
         this.stateIntensity = StateIntensity.NULL;
     }
     if (!Enum.TryParse(emotion, out this.emotion))
     {
         this.emotion = Emotion.NULL;
     }
     if (!Enum.TryParse(judgment, out this.judgment))
     {
         this.judgment = Judgment.NULL;
     }
     if (!Enum.TryParse(agreement, out this.agreement))
     {
         this.agreement = Agreement.NULL;
     }
     if (!Enum.TryParse(intention, out this.intention))
     {
         this.intention = Intention.NULL;
     }
 }
Пример #2
0
 public EnglishWordSentiment(string word, Valence valence,
                             StateIntensity stateIntensity, Emotion emotion, Judgment judgment,
                             Agreement agreement, Intention intention)
 {
     Word                = word;
     this.valence        = valence;
     this.stateIntensity = stateIntensity;
     this.emotion        = emotion;
     this.judgment       = judgment;
     this.agreement      = agreement;
     this.intention      = intention;
 }