diff --git a/frontend/components/containers/TextClassification.vue b/frontend/components/containers/TextClassification.vue index 3b876bb4..8159220a 100644 --- a/frontend/components/containers/TextClassification.vue +++ b/frontend/components/containers/TextClassification.vue @@ -59,7 +59,6 @@ export default { this.updateAnnotation(payload) }, addLabel(labelId) { - alert(labelId) const payload = { label: labelId, projectId: this.$route.params.id diff --git a/frontend/pages/demo/named-entity-recognition/index.vue b/frontend/pages/demo/named-entity-recognition/index.vue index 4b28c56f..bc80f5dc 100644 --- a/frontend/pages/demo/named-entity-recognition/index.vue +++ b/frontend/pages/demo/named-entity-recognition/index.vue @@ -138,7 +138,7 @@ export default { }, addEntity(startOffset, endOffset, labelId) { const payload = { - id: this.currentDoc.annotations.reduce((x, y) => { return x.id > y.id ? x : y }).id + 1, + id: Math.floor(Math.random() * Math.floor(Number.MAX_SAFE_INTEGER)), start_offset: startOffset, end_offset: endOffset, label: labelId diff --git a/frontend/pages/demo/sentiment-analysis/index.vue b/frontend/pages/demo/sentiment-analysis/index.vue new file mode 100644 index 00000000..8cac9c08 --- /dev/null +++ b/frontend/pages/demo/sentiment-analysis/index.vue @@ -0,0 +1,95 @@ + + + + + + + + + + + + {{ currentDoc.text }} + + + + + + + + + + + + +