Skip to content

Commit

Permalink
Add lemma to all tokens so word list filters on selection in diff modes
Browse files Browse the repository at this point in the history
  • Loading branch information
paltman committed Jul 29, 2020
1 parent 7d1ddbb commit e58904e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/reader/components/DefaultModeReader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
node {
veRef
value
lemma
}
}
}
Expand All @@ -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 {
Expand Down
5 changes: 3 additions & 2 deletions src/reader/components/ImageModeReader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
node {
veRef
value
lemma
}
}
}
Expand Down Expand Up @@ -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 };
});
Expand Down
4 changes: 3 additions & 1 deletion src/reader/components/MetricalModeReader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -85,6 +86,7 @@
node {
veRef
value
lemma
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/reader/components/NamedEntitiesModeReader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
});
Expand Down Expand Up @@ -137,6 +138,7 @@
node {
veRef
value
lemma
namedEntities {
edges {
node {
Expand Down

0 comments on commit e58904e

Please sign in to comment.