Exemplo n.º 1
0
 public IEnumerable<double> ContainsIndividualWords(Comment comment)
 {
     return Words.Select(word => comment.Text.ToLower().Contains(word) ? 1d : 0d);
 }
Exemplo n.º 2
0
 public int NumberOfBadWords(Comment comment)
 {
     return Words.Count(comment.Text.ToLower().Contains);
 }
Exemplo n.º 3
0
 public bool ContainsFeature(Comment comment)
 {
     return Words.Any(comment.Text.ToLower().Contains);
 }