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

OpenNREJsonWriter does not support frames and writing of other text related columns. #502

Closed
Tracked by #501
nicolay-r opened this issue Jul 21, 2023 · 0 comments
Closed
Tracked by #501
Assignees
Labels
bug Something isn't working critical enhancement New feature or request

Comments

@nicolay-r
Copy link
Owner

nicolay-r commented Jul 21, 2023

Here, we do not provide any extra columns:

return {
"id": bag_id,
"id_orig": sample_id,
"token": tokens,
"h": {"pos": [s_ind, s_ind + 1], "id": str(bag_id + "s")},
"t": {"pos": [t_ind, t_ind + 1], "id": str(bag_id + "t")},
"relation": str(int(row[const.LABEL])) if const.LABEL in row else "NA"
}

Here, we do not pass any extra information:

self.__write_bag(bag=self.__format_row(row_data, text_columns=self.__text_columns),
json_file=self.__target_f)

Solution: implement the related support of other columns from row (dictionary). Add new keys prefixed with _ (underscore) (already fixed later, see below)

** UPD**: in order to have compatibility with rows parsing and reading via JsonlReader, we need to cancel underscoring. (b84d545)

@nicolay-r nicolay-r mentioned this issue Jul 21, 2023
1 task
@nicolay-r nicolay-r self-assigned this Jul 21, 2023
@nicolay-r nicolay-r added bug Something isn't working critical enhancement New feature or request labels Jul 21, 2023
nicolay-r added a commit that referenced this issue Jul 22, 2023
#376 related to bag_id.
nicolay-r added a commit that referenced this issue Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working critical enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant