Skip to content

Conversation

@ivyleavedtoadflax
Copy link
Contributor

@ivyleavedtoadflax ivyleavedtoadflax commented Feb 19, 2020

Previously ref_to_token_annotations would only work in the splitting scenario of converting reference spans (BI, BE, IE, II) spans to token spans (b-r, i-r, e-r, o). This PR allows it also to be used for parsing spans where a reference span (author) can be converted to a series of token spans (author).

Relevant tests are added, along with improved documentation to the command itself.

Previously this command would only work in the parsing scenario of converting reference spans (BI, BE, IE, II) spans to token spans (b-r, i-r, e-r, o). This commit allows it also to be used for parsing spans where a reference span (author) can be converted to a series of token spans (author).
@ivyleavedtoadflax ivyleavedtoadflax force-pushed the feature/ivyleavedtoadflax/parsing_ref_spans_to_token_spans branch from 66958a0 to 115ada2 Compare February 20, 2020 13:13
* Improve documentation.
* Output documents which have no annotations, instead of removing them.
@ivyleavedtoadflax ivyleavedtoadflax changed the title wip: Handle parsing case in Allow reference_to_token_annotations.py Allow reference_to_token_annotations to handle more general cases Feb 20, 2020
@ivyleavedtoadflax ivyleavedtoadflax changed the title Allow reference_to_token_annotations to handle more general cases Allow ref_to_token_annotations to handle more general cases Feb 20, 2020
@ivyleavedtoadflax ivyleavedtoadflax marked this pull request as ready for review February 20, 2020 14:47
labels can be applied directly to the individual tokens contained within
these multi-token spans; for each token in the multi-token span, a span
is created with the same label. Symbolically:
* [author author author] becomes [author][author][author]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not unique to author right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exactly 👍

Copy link

@nsorros nsorros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@ivyleavedtoadflax ivyleavedtoadflax merged commit 5f9f078 into master Feb 25, 2020
@ivyleavedtoadflax ivyleavedtoadflax deleted the feature/ivyleavedtoadflax/parsing_ref_spans_to_token_spans branch February 25, 2020 02:37
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

Successfully merging this pull request may close these issues.

3 participants