Closed mehdipiraee closed 5 years ago
Hi @mehdipiraee , I think I'm confused: Is this not expected behavior?
@bdewilde, I'm a newbie, so I wasn't sure if it's expected behavior or not. I was not expecting an exception if no terms are found. I handled it by capturing an exception. Isn't it better to return None?
Hey @mehdipiraee , you've probably long since moved on from this, but I finally got back to it and... I think you're right, raising an exception here is bad. So, I'm making a change: network.terms_to_semantic_network()
returns an empty graph if no terms are passed to it, and in turn keyterms.key_terms_from_semantic_network()
returns an empty list.
textacy.keyterms.key_terms_from_semantic_network throws an error when it does not find any words (I think!)
Steps to Reproduce (for bugs)
Traceback
Your Environment