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.
19 lines
698 B
19 lines
698 B
import { AnnotationRepository } from '@/domain/models/tasks/annotationRepository'
|
|
import { SequenceLabelingLabel } from '~/domain/models/tasks/sequenceLabeling'
|
|
|
|
|
|
export class APISequenceLabelingRepository extends AnnotationRepository<SequenceLabelingLabel> {
|
|
constructor() {
|
|
super(SequenceLabelingLabel)
|
|
}
|
|
|
|
public async update(projectId: string, docId: number, annotationId: number, labelId: number) {
|
|
const url = this.baseUrl(projectId, docId) + `/${annotationId}`
|
|
const payload = { label: labelId }
|
|
await this.request.patch(url, payload)
|
|
}
|
|
|
|
protected baseUrl(projectId: string, docId: number): string {
|
|
return `/projects/${projectId}/examples/${docId}/spans`
|
|
}
|
|
}
|