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.

20 lines
678 B

  1. import { ProjectType } from '@/domain/models/project/project'
  2. export const getLinkToAnnotationPage = (
  3. projectId: number | string,
  4. projectType: ProjectType
  5. ): string => {
  6. const mapping = {
  7. DocumentClassification: 'text-classification',
  8. SequenceLabeling: 'sequence-labeling',
  9. Seq2seq: 'sequence-to-sequence',
  10. IntentDetectionAndSlotFilling: 'intent-detection-and-slot-filling',
  11. ImageClassification: 'image-classification',
  12. ImageCaptioning: 'image-captioning',
  13. BoundingBox: 'object-detection',
  14. Segmentation: 'segmentation',
  15. Speech2text: 'speech-to-text'
  16. }
  17. const link = `/projects/${projectId}/${mapping[projectType]}`
  18. return link
  19. }