@@ -119,6 +119,7 @@ declare module 'wink-nlp' {
119
119
freqTable < T > ( tokens : T [ ] ) : Array < [ token : T , freq : number ] > ;
120
120
bigrams < T > ( tokens : T [ ] ) : Array < [ T , T ] > ;
121
121
unique < T > ( tokens : T [ ] ) : T [ ] ;
122
+ text ( tokens : any [ ] ) : string ;
122
123
markedUpText ( tokens : any [ ] ) : string ;
123
124
}
124
125
@@ -134,7 +135,8 @@ declare module 'wink-nlp' {
134
135
parentEntity ( ) : ItemEntity | undefined ;
135
136
parentCustomEntity ( ) : ItemCustomEntity | undefined ;
136
137
markup ( beginMarker : string , endMarker : string ) : void ;
137
- out < T > ( itsf : ItsFunction < T > ) : T ;
138
+ out ( ) : string ;
139
+ out < T > ( itsf : ItsFunction < T > ) : T | string ;
138
140
parentSentence ( ) : ItemSentence ;
139
141
index ( ) : number ;
140
142
}
@@ -144,21 +146,26 @@ declare module 'wink-nlp' {
144
146
filter ( f : ( token : ItemToken ) => boolean ) : SelectedTokens ;
145
147
itemAt ( k : number ) : ItemToken | undefined ;
146
148
length ( ) : number ;
147
- out < T , U > ( itsf : ItsFunction < T > , asf : AsFunction < T , U > ) : U ;
149
+ out ( ) : string [ ] ;
150
+ out < T > ( itsf : ItsFunction < T > ) : T [ ] | string [ ] ;
151
+ out < T , U > ( itsf : ItsFunction < T > , asf : AsFunction < T , U > ) : U | T [ ] | string [ ] ;
148
152
}
149
153
150
154
export interface Tokens {
151
155
each ( f : ( token : ItemToken ) => void ) : void ;
152
156
filter ( f : ( token : ItemToken ) => boolean ) : SelectedTokens ;
153
157
itemAt ( k : number ) : ItemToken | undefined ;
154
158
length ( ) : number ;
155
- out < T , U > ( itsf : ItsFunction < T > , asf : AsFunction < T , U > ) : U ;
159
+ out ( ) : string [ ] ;
160
+ out < T > ( itsf : ItsFunction < T > ) : T [ ] | string [ ] ;
161
+ out < T , U > ( itsf : ItsFunction < T > , asf : AsFunction < T , U > ) : U | T [ ] | string [ ] ;
156
162
}
157
163
158
164
export interface ItemEntity {
159
165
parentDocument ( ) : Document ;
160
166
markup ( beginMarker : string , endMarker : string ) : void ;
161
- out < T > ( itsf : ItsFunction < T > ) : T ;
167
+ out ( ) : string ;
168
+ out < T > ( itsf : ItsFunction < T > ) : T | string ;
162
169
parentSentence ( ) : ItemSentence ;
163
170
tokens ( ) : Tokens ;
164
171
index ( ) : number ;
@@ -169,21 +176,26 @@ declare module 'wink-nlp' {
169
176
filter ( f : ( entity : ItemEntity ) => boolean ) : SelectedEntities ;
170
177
itemAt ( k : number ) : ItemEntity | undefined ;
171
178
length ( ) : number ;
172
- out < T , U > ( itsf : ItsFunction < T > , asf : AsFunction < T , U > ) : U ;
179
+ out ( ) : string [ ] ;
180
+ out < T > ( itsf : ItsFunction < T > ) : T [ ] | string [ ] ;
181
+ out < T , U > ( itsf : ItsFunction < T > , asf : AsFunction < T , U > ) : U | T [ ] | string [ ] ;
173
182
}
174
183
175
184
export interface Entities {
176
185
each ( f : ( entity : ItemEntity ) => void ) : void ;
177
186
filter ( f : ( entity : ItemEntity ) => boolean ) : SelectedEntities ;
178
187
itemAt ( k : number ) : ItemEntity | undefined ;
179
188
length ( ) : number ;
180
- out < T , U > ( itsf : ItsFunction < T > , asf : AsFunction < T , U > ) : U ;
189
+ out ( ) : string [ ] ;
190
+ out < T > ( itsf : ItsFunction < T > ) : T [ ] | string [ ] ;
191
+ out < T , U > ( itsf : ItsFunction < T > , asf : AsFunction < T , U > ) : U | T [ ] | string [ ] ;
181
192
}
182
193
183
194
export interface ItemCustomEntity {
184
195
parentDocument ( ) : Document ;
185
196
markup ( beginMarker : string , endMarker : string ) : void ;
186
- out < T > ( itsf : ItsFunction < T > ) : T ;
197
+ out ( ) : string ;
198
+ out < T > ( itsf : ItsFunction < T > ) : T | string ;
187
199
parentSentence ( ) : ItemSentence ;
188
200
tokens ( ) : Tokens ;
189
201
index ( ) : number ;
@@ -194,21 +206,26 @@ declare module 'wink-nlp' {
194
206
filter ( f : ( entity : ItemCustomEntity ) => boolean ) : SelectedCustomEntities ;
195
207
itemAt ( k : number ) : ItemCustomEntity | undefined ;
196
208
length ( ) : number ;
197
- out < T , U > ( itsf : ItsFunction < T > , asf : AsFunction < T , U > ) : U ;
209
+ out ( ) : string [ ] ;
210
+ out < T > ( itsf : ItsFunction < T > ) : T [ ] | string [ ] ;
211
+ out < T , U > ( itsf : ItsFunction < T > , asf : AsFunction < T , U > ) : U | T [ ] | string [ ] ;
198
212
}
199
213
200
214
export interface CustomEntities {
201
215
each ( f : ( entity : ItemCustomEntity ) => void ) : void ;
202
216
filter ( f : ( entity : ItemCustomEntity ) => boolean ) : SelectedCustomEntities ;
203
217
itemAt ( k : number ) : ItemCustomEntity | undefined ;
204
218
length ( ) : number ;
205
- out < T , U > ( itsf : ItsFunction < T > , asf : AsFunction < T , U > ) : U ;
219
+ out ( ) : string [ ] ;
220
+ out < T > ( itsf : ItsFunction < T > ) : T [ ] | string [ ] ;
221
+ out < T , U > ( itsf : ItsFunction < T > , asf : AsFunction < T , U > ) : U | T [ ] | string [ ] ;
206
222
}
207
223
208
224
export interface ItemSentence {
209
225
parentDocument ( ) : Document ;
210
226
markup ( beginMarker : string , endMarker : string ) : void ;
211
- out < T > ( itsf : ItsFunction < T > ) : T ;
227
+ out ( ) : string ;
228
+ out < T > ( itsf : ItsFunction < T > ) : T [ ] | string ;
212
229
entities ( ) : Entities ;
213
230
customEntities ( ) : CustomEntities ;
214
231
tokens ( ) : Tokens ;
@@ -219,15 +236,18 @@ declare module 'wink-nlp' {
219
236
each ( f : ( entity : ItemSentence ) => void ) : void ;
220
237
itemAt ( k : number ) : ItemSentence | undefined ;
221
238
length ( ) : number ;
222
- out < T , U > ( itsf : ItsFunction < T > , asf : AsFunction < T , U > ) : U ;
239
+ out ( ) : string [ ] ;
240
+ out < T > ( itsf : ItsFunction < T > ) : T [ ] | string [ ] ;
241
+ out < T , U > ( itsf : ItsFunction < T > , asf : AsFunction < T , U > ) : U | T [ ] | string [ ] ;
223
242
}
224
243
225
244
export interface Document {
226
245
entities ( ) : Entities ;
227
246
customEntities ( ) : CustomEntities ;
228
247
isLexeme ( text : string ) : boolean ;
229
248
isOOV ( text : string ) : boolean ;
230
- out < T > ( itsf : ItsFunction < T > ) : T ;
249
+ out ( ) : string ;
250
+ out < T > ( itsf : ItsFunction < T > ) : T [ ] | string ;
231
251
sentences ( ) : Sentences ;
232
252
tokens ( ) : Tokens ;
233
253
printTokens ( ) : void ;
0 commit comments