mirror of https://github.com/doccano/doccano.git
pythonannotation-tooldatasetsactive-learningtext-annotationdatasetnatural-language-processingdata-labelingmachine-learning
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
642 B
29 lines
642 B
export class ExampleItem {
|
|
constructor(
|
|
readonly id: number,
|
|
readonly text: string,
|
|
readonly meta: object,
|
|
readonly annotationApprover: boolean | null,
|
|
readonly commentCount: number,
|
|
readonly fileUrl: string,
|
|
readonly isConfirmed: boolean,
|
|
readonly filename: string
|
|
) {}
|
|
|
|
get url() {
|
|
const l = this.fileUrl.indexOf('/media/')
|
|
if (l < 0) {
|
|
return this.fileUrl
|
|
}
|
|
return this.fileUrl.slice(l)
|
|
}
|
|
}
|
|
|
|
export class ExampleItemList {
|
|
constructor(
|
|
readonly count: number,
|
|
readonly next: string | null,
|
|
readonly prev: string | null,
|
|
readonly items: ExampleItem[]
|
|
) {}
|
|
}
|