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.
19 lines
478 B
19 lines
478 B
export class LabelItem {
|
|
constructor(
|
|
readonly id: number,
|
|
readonly text: string,
|
|
readonly prefixKey: string | null,
|
|
readonly suffixKey: string | null,
|
|
readonly backgroundColor: string,
|
|
readonly textColor: string = '#ffffff'
|
|
) {}
|
|
|
|
static create(
|
|
text: string,
|
|
prefixKey: string | null,
|
|
suffixKey: string | null,
|
|
backgroundColor: string
|
|
): LabelItem {
|
|
return new LabelItem(0, text, prefixKey, suffixKey, backgroundColor)
|
|
}
|
|
}
|