HazyResearch / fonduer

A knowledge base construction engine for richly formatted data
https://fonduer.readthedocs.io/
MIT License
409 stars 77 forks source link

Featurizer.get_keys() does not honor candidate classes in context #514

Open HiromuHota opened 4 years ago

HiromuHota commented 4 years ago

Description of the bug

Unlike other methods (eg Featurizer.drop_keys() and Featurizer.upsert_keys(), Featurizer.get_keys() does not honor candidate classes in context but returns all feature keys no matter which candidate class they are associated with. This is confusing.

See https://github.com/HazyResearch/fonduer/issues/511#issuecomment-696618392 for how this actually confused a user.

To Reproduce

This is a design error.

Expected behavior

These methods should behave similarly. Either

Error Logs/Screenshots

N/A

Environment (please complete the following information)

Additional context

Add any other context about the problem here.