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.
25 lines
705 B
25 lines
705 B
import ApiService from '@/services/api.service'
|
|
import { ParseRepository } from '@/domain/models/upload/parseRepository'
|
|
|
|
export class APIParseRepository implements ParseRepository {
|
|
constructor(
|
|
private readonly request = ApiService
|
|
) {}
|
|
|
|
async analyze(projectId: string, format: string, task: string, uploadIds: number[], option: object): Promise<string> {
|
|
const url = `/projects/${projectId}/upload`
|
|
const data = {
|
|
format,
|
|
task,
|
|
uploadIds,
|
|
...option
|
|
}
|
|
const response = await this.request.post(url, data)
|
|
return response.data.task_id
|
|
}
|
|
|
|
revert(serverId: string): void {
|
|
const url = `/fp/revert/`
|
|
this.request.delete(url, serverId)
|
|
}
|
|
}
|