krickert commented on PR #1086:
URL: https://github.com/apache/opennlp/pull/1086#issuecomment-4739522060

   @rzo1 - I think we should go with a hard fail for 
`DocumentCategorizerDL.categorize()` in 3.0.
   
   Inference failures will now throw instead of returning a zero vector. I 
think this is cleaner - all 0's is actually a valid model output, so an 
exception is the right signal when something actually went wrong. Blank/empty 
documents are also rejected early with a clear error. Added a short release 
note in the javadoc.
   
   I considered adding a legacy escape hatch 
(`opennlp.legacy.doccat.zeroOnFailure`?), but decided to skip it for now since 
this seems rare and I didn't want to start supporting legacy behavior in 3.0. 
If we ever bring it back in 3.1 I'd put a one-time warning and say it's going 
away.
   
   Added tests and they're green. Thoughts?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to