-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathModels.cs
51 lines (36 loc) · 990 Bytes
/
Models.cs
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
46
47
48
49
50
51
// Copyright © Benjamin Abt 2021, all rights reserved
using CsvHelper.Configuration.Attributes;
using Microsoft.ML.Data;
namespace ToxicSentimentSample;
public class TrainInput
{
[Index(0)]
public string CommentId { get; set; } = null!;
[Index(1)]
public string Text { get; set; } = null!;
[Index(2)]
public bool IsToxic { get; set; }
[Index(3)]
public bool IsSevereToxic { get; set; }
[Index(4)]
public bool IsObscene { get; set; }
[Index(5)]
public bool IsThreat { get; set; }
[Index(6)]
public bool IsInsult { get; set; }
[Index(7)]
public bool IsIdentityHate { get; set; }
}
public class TextInput
{
public string Text { get; set; } = null!;
}
public class TextIntentBinaryPrediction
{
[ColumnName("PredictedLabel")]
public bool Prediction { get; set; }
[ColumnName("Probability")]
public float Probability { get; set; }
[ColumnName("Score")]
public float Score { get; set; }
}