You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
855 B
46 lines
855 B
using System.Globalization;
|
|
|
|
namespace NLangDetect.Core
|
|
{
|
|
// TODO IMM HI: name??
|
|
public class Language
|
|
{
|
|
#region Constructor(s)
|
|
|
|
public Language(string name, double probability)
|
|
{
|
|
Name = name;
|
|
Probability = probability;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Object overrides
|
|
|
|
public override string ToString()
|
|
{
|
|
if (Name == null)
|
|
{
|
|
return "";
|
|
}
|
|
|
|
return
|
|
string.Format(
|
|
CultureInfo.InvariantCulture.NumberFormat,
|
|
"{0}:{1:0.000000}",
|
|
Name,
|
|
Probability);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Properties
|
|
|
|
public string Name { get; set; }
|
|
|
|
public double Probability { get; set; }
|
|
|
|
#endregion
|
|
}
|
|
}
|