mirror of https://github.com/doccano/doccano.git
pythondatasetsactive-learningtext-annotationdatasetnatural-language-processingdata-labelingmachine-learningannotation-tool
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.
32 lines
685 B
32 lines
685 B
import { Expose } from 'class-transformer'
|
|
|
|
export class LabelItem {
|
|
id: number;
|
|
text: string;
|
|
|
|
@Expose({ name: 'prefix_key' })
|
|
prefixKey: string | null;
|
|
|
|
@Expose({ name: 'suffix_key' })
|
|
suffixKey: string | null;
|
|
|
|
@Expose({ name: 'background_color' })
|
|
backgroundColor: string;
|
|
|
|
@Expose({ name: 'text_color' })
|
|
textColor: string = '#ffffff';
|
|
|
|
toObject() {
|
|
return {
|
|
id: this.id,
|
|
text: this.text,
|
|
prefix_key: this.prefixKey,
|
|
suffix_key: this.suffixKey,
|
|
background_color: this.backgroundColor,
|
|
text_color: this.textColor
|
|
}
|
|
}
|
|
}
|
|
|
|
export class DocTypeItem extends LabelItem {}
|
|
export class SpanTypeItem extends LabelItem {}
|