1
1
/*
2
- * Copyright 2023-2024 the original author or authors.
2
+ * Copyright 2023-2025 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
26
26
* @author Ahmed Yousri
27
27
* @author Ilayaperumal Gopinathan
28
28
* @author Ricken Bazolo
29
+ * @author Jonghoon Park
29
30
* @since 1.0.0
30
31
*/
31
32
public final class CategoryScores {
@@ -129,6 +130,26 @@ public double getViolence() {
129
130
return this .violence ;
130
131
}
131
132
133
+ public double getDangerousAndCriminalContent () {
134
+ return dangerousAndCriminalContent ;
135
+ }
136
+
137
+ public double getHealth () {
138
+ return health ;
139
+ }
140
+
141
+ public double getFinancial () {
142
+ return financial ;
143
+ }
144
+
145
+ public double getLaw () {
146
+ return law ;
147
+ }
148
+
149
+ public double getPii () {
150
+ return pii ;
151
+ }
152
+
132
153
@ Override
133
154
public boolean equals (Object o ) {
134
155
if (this == o ) {
@@ -147,14 +168,18 @@ public boolean equals(Object o) {
147
168
&& Double .compare (that .selfHarmIntent , this .selfHarmIntent ) == 0
148
169
&& Double .compare (that .selfHarmInstructions , this .selfHarmInstructions ) == 0
149
170
&& Double .compare (that .harassmentThreatening , this .harassmentThreatening ) == 0
150
- && Double .compare (that .violence , this .violence ) == 0 ;
171
+ && Double .compare (that .violence , this .violence ) == 0
172
+ && Double .compare (that .dangerousAndCriminalContent , this .dangerousAndCriminalContent ) == 0
173
+ && Double .compare (that .health , this .health ) == 0 && Double .compare (that .financial , this .financial ) == 0
174
+ && Double .compare (that .law , this .law ) == 0 && Double .compare (that .pii , this .pii ) == 0 ;
151
175
}
152
176
153
177
@ Override
154
178
public int hashCode () {
155
179
return Objects .hash (this .sexual , this .hate , this .harassment , this .selfHarm , this .sexualMinors ,
156
180
this .hateThreatening , this .violenceGraphic , this .selfHarmIntent , this .selfHarmInstructions ,
157
- this .harassmentThreatening , this .violence );
181
+ this .harassmentThreatening , this .violence , this .dangerousAndCriminalContent , this .health ,
182
+ this .financial , this .law , this .pii );
158
183
}
159
184
160
185
@ Override
@@ -163,7 +188,9 @@ public String toString() {
163
188
+ ", selfHarm=" + this .selfHarm + ", sexualMinors=" + this .sexualMinors + ", hateThreatening="
164
189
+ this .hateThreatening + ", violenceGraphic=" + this .violenceGraphic + ", selfHarmIntent="
165
190
+ this .selfHarmIntent + ", selfHarmInstructions=" + this .selfHarmInstructions
166
- + ", harassmentThreatening=" + this .harassmentThreatening + ", violence=" + this .violence + '}' ;
191
+ + ", harassmentThreatening=" + this .harassmentThreatening + ", violence=" + this .violence
192
+ + ", dangerousAndCriminalContent=" + dangerousAndCriminalContent + ", health=" + health + ", financial="
193
+ + financial + ", law=" + law + ", pii=" + pii + '}' ;
167
194
}
168
195
169
196
public static class Builder {
0 commit comments