|
| 1 | +/** |
| 2 | +* Copyright 2015 IBM Corp. All Rights Reserved. |
| 3 | +* |
| 4 | +* Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +* you may not use this file except in compliance with the License. |
| 6 | +* You may obtain a copy of the License at |
| 7 | +* |
| 8 | +* http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +* |
| 10 | +* Unless required by applicable law or agreed to in writing, software |
| 11 | +* distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +* See the License for the specific language governing permissions and |
| 14 | +* limitations under the License. |
| 15 | +* |
| 16 | +*/ |
| 17 | + |
| 18 | +using UnityEngine; |
| 19 | +using System.Collections; |
| 20 | + |
| 21 | +namespace IBM.Watson.DeveloperCloud.Services.PersonalityInsights.v3 |
| 22 | +{ |
| 23 | + /// <summary> |
| 24 | + /// The Profile object. |
| 25 | + /// </summary> |
| 26 | + [SerializeField] |
| 27 | + public class Profile |
| 28 | + { |
| 29 | + /// <summary> |
| 30 | + /// The language model that was used to process the input; for example, en. |
| 31 | + /// </summary> |
| 32 | + public string processed_language { get; set; } |
| 33 | + /// <summary> |
| 34 | + /// The number of words that were found in the input. |
| 35 | + /// </summary> |
| 36 | + public int word_count { get; set; } |
| 37 | + /// <summary> |
| 38 | + /// When guidance is appropriate, a string that provides a message that indicates |
| 39 | + /// the number of words found and where that value falls in the range of required |
| 40 | + /// or suggested number of words. |
| 41 | + /// </summary> |
| 42 | + public string word_count_message { get; set; } |
| 43 | + /// <summary> |
| 44 | + /// Detailed results for the Big Five personality characteristics (dimensions and |
| 45 | + /// facets) inferred from the input text. |
| 46 | + /// </summary> |
| 47 | + public TraitTreeNode[] personality { get; set; } |
| 48 | + /// <summary> |
| 49 | + /// Detailed results for the Needs characteristics inferred from the input text. |
| 50 | + /// </summary> |
| 51 | + public TraitTreeNode[] values { get; set; } |
| 52 | + /// <summary> |
| 53 | + /// Detailed results for the Values characteristics inferred from the input text. |
| 54 | + /// </summary> |
| 55 | + public TraitTreeNode[] needs { get; set; } |
| 56 | + /// <summary> |
| 57 | + /// For JSON content that is timestamped, detailed results about the social behavior |
| 58 | + /// disclosed by the input in terms of temporal characteristics. The results include |
| 59 | + /// information about the distribution of the content over the days of the week and |
| 60 | + /// the hours of the day. |
| 61 | + /// </summary> |
| 62 | + public TraitTreeNode[] behavior { get; set; } |
| 63 | + /// <summary> |
| 64 | + /// If the consumption_preferences query parameter is true, detailed results for |
| 65 | + /// each category of `consumption preferences`. Each element of the array provides |
| 66 | + /// information inferred from the input text for the individual preferences of that |
| 67 | + /// category. |
| 68 | + /// </summary> |
| 69 | + public ConsumptionPreferencesCategoryNode[] consumption_preferences { get; set; } |
| 70 | + /// <summary> |
| 71 | + /// Warning messages associated with the input text submitted with the request. The |
| 72 | + /// array is empty if the input generated no warnings. |
| 73 | + /// </summary> |
| 74 | + public Warning[] warning { get; set; } |
| 75 | + } |
| 76 | + |
| 77 | + /// <summary> |
| 78 | + /// The Trait Tree Node object. |
| 79 | + /// </summary> |
| 80 | + [SerializeField] |
| 81 | + public class TraitTreeNode |
| 82 | + { |
| 83 | + /// <summary> |
| 84 | + /// The unique identifier of the characteristic to which the results pertain. IDs |
| 85 | + /// have the form `big5_` for Big Five personality characteristics, `need_` for Needs, |
| 86 | + /// or `value_` for Values. |
| 87 | + /// </summary> |
| 88 | + public string trait_id { get; set; } |
| 89 | + /// <summary> |
| 90 | + /// The user-visible name of the characteristic. |
| 91 | + /// </summary> |
| 92 | + public string name { get; set; } |
| 93 | + /// <summary> |
| 94 | + /// The category of the characteristic: personality for Big Five `personality` |
| 95 | + /// characteristics, `needs` for Needs, or `values` for Values. |
| 96 | + /// </summary> |
| 97 | + public string category { get; set; } |
| 98 | + /// <summary> |
| 99 | + /// The normalized percentile score for the characteristic. The range is 0 to 1. For |
| 100 | + /// example, if the percentage for Openness is 0.60, the author scored in the 60th |
| 101 | + /// percentile; the author is more open than 59 percent of the population and less open |
| 102 | + /// than 39 percent of the population. |
| 103 | + /// </summary> |
| 104 | + public double percentile { get; set; } |
| 105 | + /// <summary> |
| 106 | + /// The raw score for the characteristic. A positive or negative score indicates more |
| 107 | + /// or less of the characteristic; zero indicates neutrality or no evidence for a |
| 108 | + /// score. The raw score is computed based on the input and the service model; it is |
| 109 | + /// not normalized or compared with a sample population. The raw score enables |
| 110 | + /// comparison of the results against a different sampling population and with a custom |
| 111 | + /// normalization approach. |
| 112 | + /// </summary> |
| 113 | + public double raw_score { get; set; } |
| 114 | + /// <summary> |
| 115 | + /// For `personality` (Big Five) dimensions, more detailed results for the facets of |
| 116 | + /// each dimension as inferred from the input text. |
| 117 | + /// </summary> |
| 118 | + public TraitTreeNode[] children { get; set; } |
| 119 | + } |
| 120 | + |
| 121 | + /// <summary> |
| 122 | + /// The Behavior Node object. |
| 123 | + /// </summary> |
| 124 | + [SerializeField] |
| 125 | + public class BehaviorNode |
| 126 | + { |
| 127 | + /// <summary> |
| 128 | + /// The unique identifier of the characteristic to which the results pertain. IDs have |
| 129 | + /// the form `behavior_`. |
| 130 | + /// </summary> |
| 131 | + public string trait_id { get; set; } |
| 132 | + /// <summary> |
| 133 | + /// The user-visible name of the characteristic. |
| 134 | + /// </summary> |
| 135 | + public string name { get; set; } |
| 136 | + /// <summary> |
| 137 | + /// The category of the characteristic: behavior for temporal data. |
| 138 | + /// </summary> |
| 139 | + public string category { get; set; } |
| 140 | + /// <summary> |
| 141 | + /// For JSON content that is timestamped, the percentage of timestamped input data |
| 142 | + /// that occurred during that day of the week or hour of the day. The range is 0 to 1. |
| 143 | + /// </summary> |
| 144 | + public double percentage { get; set; } |
| 145 | + } |
| 146 | + |
| 147 | + /// <summary> |
| 148 | + /// The Consumption Preferences Category Node object. |
| 149 | + /// </summary> |
| 150 | + [SerializeField] |
| 151 | + public class ConsumptionPreferencesCategoryNode |
| 152 | + { |
| 153 | + /// <summary> |
| 154 | + /// The unique identifier of the consumption preferences category to which the results |
| 155 | + /// pertain. IDs have the form `consumption_preferences_`. |
| 156 | + /// </summary> |
| 157 | + public string consumption_preference_category_id { get; set; } |
| 158 | + /// <summary> |
| 159 | + /// The user-visible name of the consumption preferences category. |
| 160 | + /// </summary> |
| 161 | + public string name { get; set; } |
| 162 | + /// <summary> |
| 163 | + /// Detailed results inferred from the input text for the individual preferences of |
| 164 | + /// the category. |
| 165 | + /// </summary> |
| 166 | + public ConsumptionPreferencesCategoryNode[] consumption_preferences { get; set; } |
| 167 | + } |
| 168 | + |
| 169 | + /// <summary> |
| 170 | + /// The Warning Object. |
| 171 | + /// </summary> |
| 172 | + [SerializeField] |
| 173 | + public class Warning |
| 174 | + { |
| 175 | + /// <summary> |
| 176 | + /// The identifier of the warning message, one of `WORD_COUNT_MESSAGE`, `JSON_AS_TEXT`, |
| 177 | + /// or `PARTIAL_TEXT_USED`. |
| 178 | + /// </summary> |
| 179 | + public string warning_id { get; set; } |
| 180 | + /// <summary> |
| 181 | + /// The message associated with the `warning_id`. For `WORD_COUNT_MESSAGE`, "There were |
| 182 | + /// <number> words in the input. We need a minimum of 600, preferably 1,200 or more, to |
| 183 | + /// compute statistically significant estimates."; for `JSON_AS_TEXT`, "Request input |
| 184 | + /// was processed as text/plain as indicated, however detected a JSON input. Did you |
| 185 | + /// mean application/json?"; and for `PARTIAL_TEXT_USED`, "The text provided to compute the |
| 186 | + /// profile was trimmed for performance reasons. This action does not affect the accuracy |
| 187 | + /// of the output, as not all of the input text was required." The `PARTIAL_TEXT_USED` |
| 188 | + /// warning applies only when Arabic input text exceeds a threshold at which additional |
| 189 | + /// words do not contribute to the accuracy of the profile. |
| 190 | + /// </summary> |
| 191 | + public string message { get; set; } |
| 192 | + } |
| 193 | + |
| 194 | + /// <summary> |
| 195 | + /// The Consumption Preferences Node object. |
| 196 | + /// </summary> |
| 197 | + [SerializeField] |
| 198 | + public class ConsumptionPreferencesNode |
| 199 | + { |
| 200 | + /// <summary> |
| 201 | + /// The unique identifier of the consumption preference to which the results pertain. |
| 202 | + /// IDs have the form `consumption_preferences_`. |
| 203 | + /// </summary> |
| 204 | + public string consumption_preference_id { get; set; } |
| 205 | + /// <summary> |
| 206 | + /// The user-visible name of the consumption preference. |
| 207 | + /// </summary> |
| 208 | + public string name { get; set; } |
| 209 | + /// <summary> |
| 210 | + /// The score for the consumption preference: `0.0` indicates unlikely, `0.5` indicates |
| 211 | + /// neutrality, and `1.0` indicates likely. The scores for some preferences are binary and |
| 212 | + /// do not allow a neutral value. The score is an indication of preference based on the |
| 213 | + /// results inferred from the input text, not a normalized percentile. |
| 214 | + /// </summary> |
| 215 | + public double score { get; set; } |
| 216 | + } |
| 217 | +} |
0 commit comments