wasBayesSharp

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 3  →  ?path2? @ 2
/BayesSharp/BayesSharp.csproj
@@ -44,7 +44,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.10.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
<HintPath>..\..\packages\Newtonsoft.Json.10.0.2\lib\net40\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
/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
 
}
}
}