Skip to content

Commit

Permalink
Merge pull request #680 from AFP-Medialab/jmafoster1/195-filter-undef…
Browse files Browse the repository at this point in the history
…ined-NEs

Filter undefined named entities
  • Loading branch information
Sallaa authored Dec 5, 2024
2 parents be30eb8 + 9dfccc8 commit d9da0e2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/redux/sagas/assistantSaga.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -538,10 +538,12 @@ function* handleNamedEntityCall(action) {

Object.entries(result.response.annotations).forEach((entity) => {
entity[1].forEach((instance) => {
entities.push({
word: instance.features.string,
category: entity[0],
});
if (instance.features.string) {
entities.push({
word: instance.features.string,
category: entity[0],
});
}
});
});

Expand Down

0 comments on commit d9da0e2

Please sign in to comment.