wasBayesSharp – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 using System.Collections.Generic;
2  
3 namespace BayesSharp
4 {
5 public class TagData<TTokenType>
6 {
7 public int TrainCount { get; set; }
8 public int TokenCount { get; set; }
9 public Dictionary<TTokenType, double> Items { get; private set; }
10  
11 public TagData()
12 {
13 Items = new Dictionary<TTokenType, double>();
14 TrainCount = 0;
15 }
16  
17 public double Get(TTokenType token, double defaultValue)
18 {
19 if (Items.ContainsKey(token))
20 {
21 return Items[token];
22 }
23 return defaultValue;
24 }
25 }
26 }