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.
31 lines
522 B
31 lines
522 B
export class SegmentationItem {
|
|
constructor(
|
|
public id: number,
|
|
public uuid: string,
|
|
public label: number,
|
|
public points: number[]
|
|
) {}
|
|
|
|
static valueOf({
|
|
id,
|
|
uuid,
|
|
label,
|
|
points
|
|
}: {
|
|
id: number
|
|
uuid: string
|
|
label: number
|
|
points: number[]
|
|
}): SegmentationItem {
|
|
return new SegmentationItem(id, uuid, label, points)
|
|
}
|
|
|
|
toObject(): Object {
|
|
return {
|
|
id: this.id,
|
|
uuid: this.uuid,
|
|
label: this.label,
|
|
points: this.points
|
|
}
|
|
}
|
|
}
|