|
12 | 12 | */ |
13 | 13 | package com.ibm.watson.developer_cloud.discovery.v1.model; |
14 | 14 |
|
15 | | -import java.util.List; |
16 | | - |
17 | 15 | import com.ibm.watson.developer_cloud.service.model.GenericModel; |
18 | 16 |
|
19 | 17 | /** |
20 | 18 | * Options which are specific to a particular enrichment. |
21 | 19 | */ |
22 | 20 | public class EnrichmentOptions extends GenericModel { |
23 | 21 |
|
24 | | - /** |
25 | | - * If provided, then do not attempt to detect the language of the input document. Instead, assume the language is the |
26 | | - * one specified in this field. You can set this property to work around `unsupported-text-language` errors. Supported |
27 | | - * languages include English, German, French, Italian, Portuguese, Russian, Spanish and Swedish. Supported language |
28 | | - * codes are the ISO-639-1, ISO-639-2, ISO-639-3, and the plain english name of the language (for example "russian"). |
29 | | - */ |
30 | | - public interface Language { |
31 | | - /** english. */ |
32 | | - String ENGLISH = "english"; |
33 | | - /** german. */ |
34 | | - String GERMAN = "german"; |
35 | | - /** french. */ |
36 | | - String FRENCH = "french"; |
37 | | - /** italian. */ |
38 | | - String ITALIAN = "italian"; |
39 | | - /** portuguese. */ |
40 | | - String PORTUGUESE = "portuguese"; |
41 | | - /** russian. */ |
42 | | - String RUSSIAN = "russian"; |
43 | | - /** spanish. */ |
44 | | - String SPANISH = "spanish"; |
45 | | - /** swedish. */ |
46 | | - String SWEDISH = "swedish"; |
47 | | - /** en. */ |
48 | | - String EN = "en"; |
49 | | - /** eng. */ |
50 | | - String ENG = "eng"; |
51 | | - /** de. */ |
52 | | - String DE = "de"; |
53 | | - /** ger. */ |
54 | | - String GER = "ger"; |
55 | | - /** deu. */ |
56 | | - String DEU = "deu"; |
57 | | - /** fr. */ |
58 | | - String FR = "fr"; |
59 | | - /** fre. */ |
60 | | - String FRE = "fre"; |
61 | | - /** fra. */ |
62 | | - String FRA = "fra"; |
63 | | - /** it. */ |
64 | | - String IT = "it"; |
65 | | - /** ita. */ |
66 | | - String ITA = "ita"; |
67 | | - /** pt. */ |
68 | | - String PT = "pt"; |
69 | | - /** por. */ |
70 | | - String POR = "por"; |
71 | | - /** ru. */ |
72 | | - String RU = "ru"; |
73 | | - /** rus. */ |
74 | | - String RUS = "rus"; |
75 | | - /** es. */ |
76 | | - String ES = "es"; |
77 | | - /** spa. */ |
78 | | - String SPA = "spa"; |
79 | | - /** sv. */ |
80 | | - String SV = "sv"; |
81 | | - /** swe. */ |
82 | | - String SWE = "swe"; |
83 | | - } |
84 | | - |
85 | | - private List<String> extract; |
86 | | - private Boolean sentiment; |
87 | | - private Boolean quotations; |
88 | | - private Boolean showSourceText; |
89 | | - private Boolean hierarchicalTypedRelations; |
90 | | - private String model; |
91 | | - private String language; |
92 | | - |
93 | | - /** |
94 | | - * Gets the extract. |
95 | | - * |
96 | | - * A comma-separated list of analyses that will be applied when using the `alchemy_language` enrichment. See the |
97 | | - * service documentation for details on each extract option. Possible values include: * entity * keyword * taxonomy * |
98 | | - * concept * relation * doc-sentiment * doc-emotion * typed-rels |
99 | | - * |
100 | | - * @return the extract |
101 | | - */ |
102 | | - public List<String> getExtract() { |
103 | | - return extract; |
104 | | - } |
105 | | - |
106 | | - /** |
107 | | - * Gets the sentiment. |
108 | | - * |
109 | | - * @return the sentiment |
110 | | - */ |
111 | | - public Boolean isSentiment() { |
112 | | - return sentiment; |
113 | | - } |
114 | | - |
115 | | - /** |
116 | | - * Gets the quotations. |
117 | | - * |
118 | | - * @return the quotations |
119 | | - */ |
120 | | - public Boolean isQuotations() { |
121 | | - return quotations; |
122 | | - } |
123 | | - |
124 | | - /** |
125 | | - * Gets the showSourceText. |
126 | | - * |
127 | | - * @return the showSourceText |
128 | | - */ |
129 | | - public Boolean isShowSourceText() { |
130 | | - return showSourceText; |
131 | | - } |
| 22 | + private NluEnrichmentFeatures features; |
132 | 23 |
|
133 | 24 | /** |
134 | | - * Gets the hierarchicalTypedRelations. |
| 25 | + * Gets the features. |
135 | 26 | * |
136 | | - * @return the hierarchicalTypedRelations |
137 | | - */ |
138 | | - public Boolean isHierarchicalTypedRelations() { |
139 | | - return hierarchicalTypedRelations; |
140 | | - } |
141 | | - |
142 | | - /** |
143 | | - * Gets the model. |
144 | | - * |
145 | | - * Required when using the `typed-rel` extract option. Should be set to the ID of a previously published custom Watson |
146 | | - * Knowledge Studio model. |
147 | | - * |
148 | | - * @return the model |
149 | | - */ |
150 | | - public String getModel() { |
151 | | - return model; |
152 | | - } |
153 | | - |
154 | | - /** |
155 | | - * Gets the language. |
156 | | - * |
157 | | - * If provided, then do not attempt to detect the language of the input document. Instead, assume the language is the |
158 | | - * one specified in this field. You can set this property to work around `unsupported-text-language` errors. Supported |
159 | | - * languages include English, German, French, Italian, Portuguese, Russian, Spanish and Swedish. Supported language |
160 | | - * codes are the ISO-639-1, ISO-639-2, ISO-639-3, and the plain english name of the language (for example "russian"). |
161 | | - * |
162 | | - * @return the language |
163 | | - */ |
164 | | - public String getLanguage() { |
165 | | - return language; |
166 | | - } |
167 | | - |
168 | | - /** |
169 | | - * Sets the extract. |
170 | | - * |
171 | | - * @param extract the new extract |
172 | | - */ |
173 | | - public void setExtract(final List<String> extract) { |
174 | | - this.extract = extract; |
175 | | - } |
176 | | - |
177 | | - /** |
178 | | - * Sets the sentiment. |
179 | | - * |
180 | | - * @param sentiment the new sentiment |
181 | | - */ |
182 | | - public void setSentiment(final Boolean sentiment) { |
183 | | - this.sentiment = sentiment; |
184 | | - } |
185 | | - |
186 | | - /** |
187 | | - * Sets the quotations. |
188 | | - * |
189 | | - * @param quotations the new quotations |
190 | | - */ |
191 | | - public void setQuotations(final Boolean quotations) { |
192 | | - this.quotations = quotations; |
193 | | - } |
194 | | - |
195 | | - /** |
196 | | - * Sets the showSourceText. |
197 | | - * |
198 | | - * @param showSourceText the new showSourceText |
199 | | - */ |
200 | | - public void setShowSourceText(final Boolean showSourceText) { |
201 | | - this.showSourceText = showSourceText; |
202 | | - } |
203 | | - |
204 | | - /** |
205 | | - * Sets the hierarchicalTypedRelations. |
206 | | - * |
207 | | - * @param hierarchicalTypedRelations the new hierarchicalTypedRelations |
208 | | - */ |
209 | | - public void setHierarchicalTypedRelations(final Boolean hierarchicalTypedRelations) { |
210 | | - this.hierarchicalTypedRelations = hierarchicalTypedRelations; |
211 | | - } |
212 | | - |
213 | | - /** |
214 | | - * Sets the model. |
| 27 | + * An object representing the enrichment features that will be applied to the specified field. |
215 | 28 | * |
216 | | - * @param model the new model |
| 29 | + * @return the features |
217 | 30 | */ |
218 | | - public void setModel(final String model) { |
219 | | - this.model = model; |
| 31 | + public NluEnrichmentFeatures getFeatures() { |
| 32 | + return features; |
220 | 33 | } |
221 | 34 |
|
222 | 35 | /** |
223 | | - * Sets the language. |
| 36 | + * Sets the features. |
224 | 37 | * |
225 | | - * @param language the new language |
| 38 | + * @param features the new features |
226 | 39 | */ |
227 | | - public void setLanguage(final String language) { |
228 | | - this.language = language; |
| 40 | + public void setFeatures(final NluEnrichmentFeatures features) { |
| 41 | + this.features = features; |
229 | 42 | } |
230 | 43 | } |