diff --git a/frontend/plugins/services.ts b/frontend/plugins/services.ts index ddeba42e..1c070656 100644 --- a/frontend/plugins/services.ts +++ b/frontend/plugins/services.ts @@ -7,7 +7,6 @@ import { ProjectApplicationService } from '@/services/application/project/projec import { TagApplicationService } from '@/services/application/tag/tagApplicationService' import { BoundingBoxApplicationService } from '@/services/application/tasks/boundingBox/boundingBoxApplicationService' import { SegmentationApplicationService } from '@/services/application/tasks/segmentation/segmentationApplicationService' -import { Seq2seqApplicationService } from '@/services/application/tasks/seq2seq/seq2seqApplicationService' import { SequenceLabelingApplicationService } from '@/services/application/tasks/sequenceLabeling/sequenceLabelingApplicationService' export interface Services { @@ -17,7 +16,6 @@ export interface Services { project: ProjectApplicationService example: ExampleApplicationService sequenceLabeling: SequenceLabelingApplicationService - seq2seq: Seq2seqApplicationService option: OptionApplicationService tag: TagApplicationService bbox: BoundingBoxApplicationService @@ -41,7 +39,6 @@ const plugin: Plugin = (_, inject) => { repositories.span, repositories.relation ), - seq2seq: new Seq2seqApplicationService(repositories.textLabel), option: new OptionApplicationService(repositories.option), tag: new TagApplicationService(repositories.tag), bbox: new BoundingBoxApplicationService(repositories.boundingBox), diff --git a/frontend/services/application/tasks/seq2seq/seq2seqApplicationService.ts b/frontend/services/application/tasks/seq2seq/seq2seqApplicationService.ts deleted file mode 100644 index 04d78570..00000000 --- a/frontend/services/application/tasks/seq2seq/seq2seqApplicationService.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { AnnotationApplicationService } from '../annotationApplicationService' -import { Seq2seqDTO } from './seq2seqData' -import { TextLabel } from '@/domain/models/tasks/textLabel' - -export class Seq2seqApplicationService extends AnnotationApplicationService { - public async list(projectId: string, exampleId: number): Promise { - const items = await this.repository.list(projectId, exampleId) - return items.map((item) => new Seq2seqDTO(item)) - } - - public async create(projectId: string, exampleId: number, text: string): Promise { - const item = new TextLabel(0, text, 0) - await this.repository.create(projectId, exampleId, item) - } - - public async changeText( - projectId: string, - exampleId: number, - labelId: number, - text: string - ): Promise { - const textLabel = await this.repository.find(projectId, exampleId, labelId) - textLabel.updateText(text) - await this.repository.update(projectId, exampleId, labelId, textLabel) - } -} diff --git a/frontend/services/application/tasks/seq2seq/seq2seqData.ts b/frontend/services/application/tasks/seq2seq/seq2seqData.ts deleted file mode 100644 index b2d39380..00000000 --- a/frontend/services/application/tasks/seq2seq/seq2seqData.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { TextLabel } from '@/domain/models/tasks/textLabel' - -export class Seq2seqDTO { - id: number - text: string - user: number - - constructor(item: TextLabel) { - this.id = item.id - this.text = item.text - this.user = item.user - } -}