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.
 
 
 
 
 
 

37 lines
691 B

import { AnnotationModel } from './interface'
export class Span implements AnnotationModel {
constructor(
public id: number,
public label: number,
public user: number,
public startOffset: number,
public endOffset: number
) {}
static valueOf({
id,
label,
user,
start_offset,
end_offset
}: {
id: number
label: number
user: number
start_offset: number
end_offset: number
}) {
return new Span(id, label, user, start_offset, end_offset)
}
toObject() {
return {
id: this.id,
label: this.label,
user: this.user,
start_offset: this.startOffset,
end_offset: this.endOffset
}
}
}