aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/TextEncoding/NLangDetect/Language.cs
blob: e15263c05141ee2ed14945b3f57e097e8f58e900 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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
    }
}