wasBayesSharp

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ HEAD  →  ?path2? @ 1
/BayesSharp/BayesClassifier.cs
@@ -141,18 +141,8 @@
/// <param name="json">The json content to be loaded</param>
public void ImportJsonData(string json)
{
var result = JsonConvert.DeserializeObject<TagDictionary<TTokenType, TTagType>>(json);
switch (result != null)
{
case true:
_tags = result;
_mustRecache = true;
break;
 
default:
_tags = new TagDictionary<TTokenType, TTagType>();
break;
}
_tags = JsonConvert.DeserializeObject<TagDictionary<TTokenType, TTagType>>(json);
_mustRecache = true;
}
 
/// <summary>
@@ -160,10 +150,7 @@
/// </summary>
public string ExportJsonData()
{
return _tags?.Items != null &&
_tags.Items.Any() ?
JsonConvert.SerializeObject(_tags) :
string.Empty;
return JsonConvert.SerializeObject(_tags);
}
 
/// <summary>
@@ -330,6 +317,7 @@
return probs.OrderByDescending(p => p).Take(2048);
}
 
#endregion Private Methods
#endregion
 
}
}
}