Skip to content

Commit 2246c64

Browse files
WS-2744: add back (deprecated) numCategories to CategoriesOptions
1 parent 49953d7 commit 2246c64

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

model/src/main/java/com/basistech/rosette/apimodel/CategoriesOptions.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package com.basistech.rosette.apimodel;
1818

1919
import com.basistech.rosette.annotations.JacksonMixin;
20+
import javax.validation.constraints.Min;
2021
import lombok.Builder;
2122
import lombok.Value;
2223

@@ -28,6 +29,16 @@
2829
@JacksonMixin
2930
public class CategoriesOptions extends Options {
3031

32+
/**
33+
* @deprecated
34+
* Users should use {@link singleLabel} to return only one result
35+
* or {@link scoreThreshold} to filter results based on raw score
36+
* @return number of categories
37+
*/
38+
@Deprecated
39+
@Min(1)
40+
private final Integer numCategories;
41+
3142
/**
3243
* Single label mode will return only the highest scoring category, regardless of score
3344
* If singleLabel is false, every category whose score exceeds the default

0 commit comments

Comments
 (0)