Browse Source

Add a feature to create intent detection and slot filling project

pull/1619/head
Hironsan 3 years ago
parent
commit
f62df2fb6d
7 changed files with 19 additions and 3 deletions
  1. 9
      backend/api/serializers.py
  2. 1
      frontend/components/project/FormCreate.vue
  3. 8
      frontend/domain/models/project/project.ts
  4. 1
      frontend/i18n/de/projects/overview.js
  5. 1
      frontend/i18n/en/projects/overview.js
  6. 1
      frontend/i18n/fr/projects/overview.js
  7. 1
      frontend/i18n/zh/projects/overview.js

9
backend/api/serializers.py

@ -9,7 +9,8 @@ from rest_polymorphic.serializers import PolymorphicSerializer
from .models import (DOCUMENT_CLASSIFICATION, IMAGE_CLASSIFICATION, SEQ2SEQ,
SEQUENCE_LABELING, SPEECH2TEXT, AnnotationRelations,
AutoLabelingConfig, Category, Comment, DocType, Example,
ExampleState, ImageClassificationProject, Label, Project,
ExampleState, ImageClassificationProject,
IntentDetectionAndSlotFillingProject, Label, Project,
RelationTypes, Role, RoleMapping, Seq2seqProject,
SequenceLabelingProject, Span, SpanType,
Speech2textProject, Tag, TextClassificationProject,
@ -223,6 +224,12 @@ class Seq2seqProjectSerializer(ProjectSerializer):
model = Seq2seqProject
class IntentDetectionAndSlotFillingProjectSerializer(ProjectSerializer):
class Meta(ProjectSerializer.Meta):
model = IntentDetectionAndSlotFillingProject
class Speech2textProjectSerializer(ProjectSerializer):
class Meta(ProjectSerializer.Meta):

1
frontend/components/project/FormCreate.vue

@ -171,6 +171,7 @@ export default Vue.extend({
'DocumentClassification',
'SequenceLabeling',
'Seq2seq',
'IntentDetectionAndSlotFilling',
'ImageClassification',
'Speech2text',
]

8
frontend/domain/models/project/project.ts

@ -4,7 +4,7 @@ export interface CurrentUsersRole {
is_annotation_approver: boolean;
}
export type ProjectType = 'DocumentClassification' | 'SequenceLabeling' | 'Seq2seq' | 'ImageClassification' | 'Speech2text'
export type ProjectType = 'DocumentClassification' | 'SequenceLabeling' | 'Seq2seq' | 'IntentDetectionAndSlotFilling' | 'ImageClassification' | 'Speech2text'
export class ProjectReadItem {
@ -86,6 +86,7 @@ export class ProjectReadItem {
DocumentClassification: 'text-classification',
SequenceLabeling : 'sequence-labeling',
Seq2seq : 'sequence-to-sequence',
IntentDetectionAndSlotFilling: 'intent-detection-and-slot-filling',
ImageClassification : 'image-classification',
Speech2text : 'speech-to-text',
}
@ -97,6 +98,7 @@ export class ProjectReadItem {
const allowedProjectTypes = [
'DocumentClassification',
'SequenceLabeling',
'IntentDetectionAndSlotFilling',
'ImageClassification'
]
return allowedProjectTypes.includes(this.project_type)
@ -113,7 +115,8 @@ export class ProjectReadItem {
const allowedProjectTypes = [
'DocumentClassification',
'SequenceLabeling',
'Seq2seq'
'Seq2seq',
'IntentDetectionAndSlotFilling'
]
return allowedProjectTypes.includes(this.project_type)
}
@ -198,6 +201,7 @@ export class ProjectWriteItem {
DocumentClassification: 'TextClassificationProject',
SequenceLabeling : 'SequenceLabelingProject',
Seq2seq : 'Seq2seqProject',
IntentDetectionAndSlotFilling: 'IntentDetectionAndSlotFillingProject',
ImageClassification : 'ImageClassificationProject',
Speech2text : 'Speech2textProject',
}

1
frontend/i18n/de/projects/overview.js

@ -15,6 +15,7 @@ export default {
'Textklassifikation',
'Sequenz-Labeling',
'Sequenz zu Sequenz',
'Intent-Erkennung und Slot-Füllung',
'Bildklassifikation',
'Sprache zu Text',
]

1
frontend/i18n/en/projects/overview.js

@ -15,6 +15,7 @@ export default {
'Text Classification',
'Sequence Labeling',
'Sequence to sequence',
'Intent Detection and Slot Filling',
'Image Classification',
'Speech to Text',
]

1
frontend/i18n/fr/projects/overview.js

@ -13,6 +13,7 @@ export default {
'Classification des textes',
'Étiquetage des séquences',
'Séquence à séquence',
'Détection d\'intention et remplissage d\'emplacements',
'Classification d\'images',
'De la parole au texte',
]

1
frontend/i18n/zh/projects/overview.js

@ -15,6 +15,7 @@ export default {
'文本分类',
'序列标注',
'序列到序列',
'意图检测和槽填充',
'图像分类',
'文字转语音'
]

Loading…
Cancel
Save