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

KeyError: VIEW_NAME #76

Open
nitishgupta opened this issue Sep 6, 2017 · 5 comments
Open

KeyError: VIEW_NAME #76

nitishgupta opened this issue Sep 6, 2017 · 5 comments
Assignees

Comments

@nitishgupta
Copy link
Member

nitishgupta commented Sep 6, 2017

Example: When a doc doesn't contain any Named Entity, the view_dictionary doesn't contain the key: NER_CONLL.

I think the key should still be present, but the cons_list should be empty.

In both cases, the user will need a check (check for key VS. check for empty list) and I not sure which is more standard. IMO, returning an empty list is more intuitive.

What ever you think is correct. @danyaljj

@danyaljj
Copy link
Member

danyaljj commented Sep 6, 2017

Returning an empty list sounds more standard to me too.

@danyaljj
Copy link
Member

danyaljj commented Sep 6, 2017

Do you want to send a PR with the fix?

@nitishgupta
Copy link
Member Author

nitishgupta commented Sep 6, 2017 via email

@nitishgupta
Copy link
Member Author

nitishgupta commented Sep 12, 2018

@danyaljj @mssammon -- I checked and having a view with an empty constituent list gives error in Java. I guess we'll have to stick to this paradigm. I'll add a note in the REAMDE for cogcomp-nlpy to expect this behaviour and close this issue then.
On a second thought, it is weird to not populate a view if a certain annotator is called. In current scenario, there would be no way to find out if there are no NERs in the text, or the NER_view was never tried to be populated.

@danyaljj
Copy link
Member

Agreed with adding a note to the README and closing it.

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

2 participants