From e58904e3c90f7fd8495bc9b8074ab43bec0812c7 Mon Sep 17 00:00:00 2001 From: Patrick Altman Date: Wed, 29 Jul 2020 16:49:19 -0500 Subject: [PATCH] Add lemma to all tokens so word list filters on selection in diff modes --- src/reader/components/DefaultModeReader.vue | 4 +++- src/reader/components/ImageModeReader.vue | 5 +++-- src/reader/components/MetricalModeReader.vue | 4 +++- src/reader/components/NamedEntitiesModeReader.vue | 4 +++- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/reader/components/DefaultModeReader.vue b/src/reader/components/DefaultModeReader.vue index 79bdeb3..b0ceb66 100644 --- a/src/reader/components/DefaultModeReader.vue +++ b/src/reader/components/DefaultModeReader.vue @@ -48,6 +48,7 @@ node { veRef value + lemma } } } @@ -63,10 +64,11 @@ const lines = data.passageTextParts.edges.map(line => { const { id, ref } = line.node; const tokens = line.node.tokens.edges.map(edge => { - const { value, veRef } = edge.node; + const { value, veRef, lemma } = edge.node; return { value, veRef, + lemma, }; }); return { diff --git a/src/reader/components/ImageModeReader.vue b/src/reader/components/ImageModeReader.vue index 815d24d..e1f3932 100644 --- a/src/reader/components/ImageModeReader.vue +++ b/src/reader/components/ImageModeReader.vue @@ -81,6 +81,7 @@ node { veRef value + lemma } } } @@ -114,8 +115,8 @@ const lines = data.passageTextParts.edges.map(line => { const { id, kind, ref } = line.node; const tokens = line.node.tokens.edges.map(edge => { - const { value, veRef } = edge.node; - return { value, veRef }; + const { value, veRef, lemma } = edge.node; + return { value, veRef, lemma }; }); return { id, kind, ref, tokens }; }); diff --git a/src/reader/components/MetricalModeReader.vue b/src/reader/components/MetricalModeReader.vue index 2a63968..f2330f6 100644 --- a/src/reader/components/MetricalModeReader.vue +++ b/src/reader/components/MetricalModeReader.vue @@ -39,10 +39,11 @@ const lines = data.passageTextParts.edges.map(line => { const { id, ref, metricalAnnotations } = line.node; const tokens = line.node.tokens.edges.map(edge => { - const { value, veRef } = edge.node; + const { value, veRef, lemma } = edge.node; return { value, veRef, + lemma, }; }); return { @@ -85,6 +86,7 @@ node { veRef value + lemma } } } diff --git a/src/reader/components/NamedEntitiesModeReader.vue b/src/reader/components/NamedEntitiesModeReader.vue index f3d0712..30a4f61 100644 --- a/src/reader/components/NamedEntitiesModeReader.vue +++ b/src/reader/components/NamedEntitiesModeReader.vue @@ -70,11 +70,12 @@ const lines = parts.map(line => { const { id, ref } = line.node; const tokens = line.node.tokens.edges.map(edge => { - const { value, veRef, namedEntities } = edge.node; + const { value, veRef, lemma, namedEntities } = edge.node; const entities = namedEntities.edges.map(e => e.node.id); return { value, veRef, + lemma, entities, }; }); @@ -137,6 +138,7 @@ node { veRef value + lemma namedEntities { edges { node {