From 1ea7ad832aaa67ac70c340ea85ffbf6c42ed6207 Mon Sep 17 00:00:00 2001 From: Hironsan Date: Wed, 9 Oct 2019 14:51:01 +0900 Subject: [PATCH] Implement seq2seq components --- frontend/api/db/docs.json | 3 +- frontend/api/routes/docs.js | 3 +- .../containers/Seq2seqContainer.vue | 65 +++++++++++ frontend/components/organisms/Seq2seqBox.vue | 109 ++++++++++++++++++ frontend/pages/projects/_id/seq2seq/index.vue | 71 ++++++++++++ 5 files changed, 249 insertions(+), 2 deletions(-) create mode 100644 frontend/components/containers/Seq2seqContainer.vue create mode 100644 frontend/components/organisms/Seq2seqBox.vue create mode 100644 frontend/pages/projects/_id/seq2seq/index.vue diff --git a/frontend/api/db/docs.json b/frontend/api/db/docs.json index e8565cb2..6c1bef1a 100644 --- a/frontend/api/db/docs.json +++ b/frontend/api/db/docs.json @@ -10,7 +10,8 @@ "start_offset": 10, "end_offset": 24, "user": 1, - "document": 1 + "document": 1, + "text": "This text is for seq2seq testing" } ], "meta": "{}", diff --git a/frontend/api/routes/docs.js b/frontend/api/routes/docs.js index 7cda7a64..898ab560 100644 --- a/frontend/api/routes/docs.js +++ b/frontend/api/routes/docs.js @@ -92,7 +92,8 @@ router.post('/:docId/annotations', (req, res, next) => { start_offset: req.body.start_offset, end_offset: req.body.end_offset, user: 1, - document: parseInt(req.params.docId) + document: parseInt(req.params.docId), + text: req.body.text } doc.annotations.push(annotation) res.json(annotation) diff --git a/frontend/components/containers/Seq2seqContainer.vue b/frontend/components/containers/Seq2seqContainer.vue new file mode 100644 index 00000000..8b8e97d9 --- /dev/null +++ b/frontend/components/containers/Seq2seqContainer.vue @@ -0,0 +1,65 @@ + + + diff --git a/frontend/components/organisms/Seq2seqBox.vue b/frontend/components/organisms/Seq2seqBox.vue new file mode 100644 index 00000000..1a7931e2 --- /dev/null +++ b/frontend/components/organisms/Seq2seqBox.vue @@ -0,0 +1,109 @@ + + + diff --git a/frontend/pages/projects/_id/seq2seq/index.vue b/frontend/pages/projects/_id/seq2seq/index.vue new file mode 100644 index 00000000..fbfe7d4c --- /dev/null +++ b/frontend/pages/projects/_id/seq2seq/index.vue @@ -0,0 +1,71 @@ + + + + +