get_col_ngrams and get_cell_ngrams from fonduer.utils.data_model_utils.tabular return an inconsistent result when a mention is not tabular
Given mention.get_span()=="Sample" and mention.is_tabular() == False like below, get_col_ngrams(mention) returns [None] while get_cell_ngrams(mention) returns ["markdown"]
To Reproduce
See #470
Expected behavior
There could be four approaches:
Return [""]
Return [] (like get_col_ngrams)
Return ["markdown"] (like get_cell_ngrams)
Raise a ValueError
Error Logs/Screenshots
Not a bug, but inconsistent return values among tabular util functions.
Environment (please complete the following information)
Description of the bug
get_col_ngrams
andget_cell_ngrams
fromfonduer.utils.data_model_utils.tabular
return an inconsistent result when a mention is not tabularGiven
mention.get_span()=="Sample"
andmention.is_tabular() == False
like below,get_col_ngrams(mention)
returns[None]
whileget_cell_ngrams(mention)
returns["markdown"]
To Reproduce
See #470
Expected behavior
There could be four approaches:
get_col_ngrams
)get_cell_ngrams
)ValueError
Error Logs/Screenshots
Not a bug, but inconsistent return values among tabular util functions.
Environment (please complete the following information)
Additional context
N/A