public RatingData CalculateSentiment() { RatingData data = new RatingData(); foreach (var wordEx in Words) { if (wordEx.CalculatedValue.HasValue) { data.AddSetiment(wordEx.CalculatedValue.Value); } else if (wordEx.Value.HasValue) { data.AddSetiment(wordEx.Value.Value); } } return(data); }