Skip to content

Commit

Permalink
#162 An empty list of spans from ph-eye does not indicate failure.
Browse files Browse the repository at this point in the history
  • Loading branch information
jzonthemtn committed Nov 19, 2024
1 parent ee9acef commit f62c464
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,10 @@ public FilterResult filter(final Policy policy, final String context, final Stri

LOGGER.debug("Returning {} NER spans.", spans.size());

return new FilterResult(context, documentId, piece, spans);

} else {

// We received a null list of spans from philter-ner. It means something went wrong.
throw new IOException("Unable to process document. Received error response from philter-ner.");

}

return new FilterResult(context, documentId, piece, spans);

} else {

// The request to philter-ner was not successful.
Expand Down

0 comments on commit f62c464

Please sign in to comment.