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.
21 lines
705 B
21 lines
705 B
import { AnnotationRepository } from '@/domain/models/tasks/annotationRepository'
|
|
|
|
export class AnnotationApplicationService<T> {
|
|
constructor(readonly repository: AnnotationRepository<T>) {}
|
|
|
|
public async delete(projectId: string, docId: number, annotationId: number): Promise<void> {
|
|
try {
|
|
await this.repository.delete(projectId, docId, annotationId)
|
|
} catch (e: any) {
|
|
console.log(e.response.data.detail)
|
|
}
|
|
}
|
|
|
|
public async clear(projectId: string, docId: number): Promise<void> {
|
|
await this.repository.clear(projectId, docId)
|
|
}
|
|
|
|
public async autoLabel(projectId: string, docId: number): Promise<void> {
|
|
await this.repository.autoLabel(projectId, docId)
|
|
}
|
|
}
|