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