Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexError in terms_to_semantic_network, need to check for empty term list #105

Closed
ghost opened this issue May 28, 2017 · 1 comment
Closed

Comments

@ghost
Copy link

ghost commented May 28, 2017

Need to check for empty term list in terms_to_semantic_network()
network.py#L69

Expected Behavior

Should not try to build graph on an empty term list

Current Behavior

Does not check for empty term list before indexing

Possible Solution

Check for empty list and return None?, or don't try to build network if the term list has been pruned to zero length

Steps to Reproduce (for bugs)

set terms = [] in argument list

Your Environment

{'platform': 'darwin',
'python': '3.5.2 |Anaconda custom (x86_64)| (default, Jul 2 2016, 17:52:12) \n[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)]',
'spacy': '1.8.2',
'spacy_models': ['en', 'en_core_web_md'],
'textacy': '0.3.4'}

@bdewilde
Copy link
Collaborator

Thanks for the heads-up! This has been fixed in master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant