mirror of https://github.com/doccano/doccano.git
pythonannotation-tooldatasetsactive-learningtext-annotationdatasetnatural-language-processingdata-labelingmachine-learning
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.
61 lines
1.4 KiB
61 lines
1.4 KiB
<template>
|
|
<div>
|
|
<v-card
|
|
v-if="currentDoc"
|
|
class="title mb-5"
|
|
>
|
|
<v-card-text class="title">
|
|
{{ currentDoc.text }}
|
|
</v-card-text>
|
|
</v-card>
|
|
<seq2seq-box
|
|
v-if="currentDoc"
|
|
:text="currentDoc.text"
|
|
:annotations="currentDoc.annotations"
|
|
:delete-annotation="_deleteAnnotation"
|
|
:update-annotation="_updateAnnotation"
|
|
:create-annotation="_createAnnotation"
|
|
/>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { mapActions, mapGetters } from 'vuex'
|
|
import Seq2seqBox from '~/components/organisms/annotation/Seq2seqBox'
|
|
|
|
export default {
|
|
components: {
|
|
Seq2seqBox
|
|
},
|
|
|
|
computed: {
|
|
...mapGetters('documents', ['currentDoc'])
|
|
},
|
|
|
|
methods: {
|
|
...mapActions('documents', ['getDocumentList', 'deleteAnnotation', 'updateAnnotation', 'addAnnotation']),
|
|
_deleteAnnotation(annotationId) {
|
|
const payload = {
|
|
annotationId,
|
|
projectId: this.$route.params.id
|
|
}
|
|
this.deleteAnnotation(payload)
|
|
},
|
|
_updateAnnotation(annotationId, text) {
|
|
const payload = {
|
|
annotationId,
|
|
text: text,
|
|
projectId: this.$route.params.id
|
|
}
|
|
this.updateAnnotation(payload)
|
|
},
|
|
_createAnnotation(text) {
|
|
const payload = {
|
|
text,
|
|
projectId: this.$route.params.id
|
|
}
|
|
this.addAnnotation(payload)
|
|
}
|
|
}
|
|
}
|
|
</script>
|