@bigfootai/bigfoot-types 2.9.2 → 2.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/model.ts +68 -2
  2. package/package.json +1 -1
package/model.ts CHANGED
@@ -115,6 +115,66 @@ export enum ProcessingStage {
115
115
  Failed = 'failed',
116
116
  }
117
117
 
118
+ // Referenced here: https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-entity-types-version-2
119
+ export enum EntityType {
120
+ Date = 'Date',
121
+ Duration = 'Duration',
122
+ EmailAddress = 'EmailAddress',
123
+ Facility = 'Facility',
124
+ GeographicFeature = 'GeographicFeature',
125
+ Hashtag = 'Hashtag',
126
+ IPAddress = 'IPAddress',
127
+ JobTitle = 'JobTitle',
128
+ Location = 'Location',
129
+ Measure = 'Measure',
130
+ Money = 'Money',
131
+ Number = 'Number',
132
+ Ordinal = 'Ordinal',
133
+ Organization = 'Organization',
134
+ Percent = 'Percent',
135
+ Person = 'Person',
136
+ PhoneNumber = 'PhoneNumber',
137
+ Time = 'Time',
138
+ TwitterHandle = 'TwitterHandle',
139
+ URL = 'URL',
140
+ }
141
+
142
+ // Referenced here: https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-relation-types-version-2
143
+ export enum RelationType {
144
+ AffiliatedWith = 'affiliatedWith',
145
+ BasedIn = 'basedIn',
146
+ BornAt = 'bornAt',
147
+ BornOn = 'bornOn',
148
+ ClientOf = 'clientOf',
149
+ Colleague = 'colleague',
150
+ Competitor = 'competitor',
151
+ ContactOf = 'contactOf',
152
+ DiedAt = 'diedAt',
153
+ DiedOn = 'diedOn',
154
+ DissolvedOn = 'dissolvedOn',
155
+ EducatedAt = 'educatedAt',
156
+ EmployedBy = 'employedBy',
157
+ FoundedOn = 'foundedOn',
158
+ FounderOf = 'founderOf',
159
+ LocatedAt = 'locatedAt',
160
+ ManagerOf = 'managerOf',
161
+ MemberOf = 'memberOf',
162
+ OwnerOf = 'ownerOf',
163
+ ParentOf = 'parentOf',
164
+ Partner = 'partner',
165
+ PartOf = 'partOf',
166
+ PartOfMany = 'partOfMany',
167
+ PopulationOf = 'populationOf',
168
+ MeasureOf = 'measureOf',
169
+ Relative = 'relative',
170
+ ResidesIn = 'residesIn',
171
+ ShareholdersOf = 'shareholdersOf',
172
+ SiblingOf = 'siblingOf',
173
+ SpokespersonFor = 'spokespersonFor',
174
+ SpouseOf = 'spouseOf',
175
+ SubsidiaryOf = 'subsidiaryOf',
176
+ }
177
+
118
178
  export interface Mark {
119
179
  type: string;
120
180
  attrs?: Map<string, string>;
@@ -179,14 +239,19 @@ export interface DocumentSentiment {
179
239
  score: number;
180
240
  }
181
241
 
242
+ export interface EntityReference {
243
+ name: string;
244
+ type: EntityType;
245
+ }
246
+
182
247
  export interface ArgumentEntry {
183
248
  text: string;
184
249
  highlight: Highlight;
185
- entities: EntityEntry[];
250
+ entities: EntityReference[];
186
251
  }
187
252
 
188
253
  export interface RelationEntry {
189
- name: string;
254
+ type: RelationType;
190
255
  score: number;
191
256
  highlight: Highlight;
192
257
  arguments: ArgumentEntry[];
@@ -194,6 +259,7 @@ export interface RelationEntry {
194
259
 
195
260
  export interface EntityEntry extends MachineLearningEntry {
196
261
  name: string;
262
+ type: EntityType;
197
263
  score: number;
198
264
  }
199
265
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "author": "Bigfoot",
3
3
  "name": "@bigfootai/bigfoot-types",
4
- "version": "2.9.2",
4
+ "version": "2.9.4",
5
5
  "description": "The internal library for the types used in the Bigfoot platform",
6
6
  "main": "model.js",
7
7
  "license": "ISC",