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

Split function for label indices #211

Open
benknoll-umn opened this issue Oct 12, 2021 · 0 comments
Open

Split function for label indices #211

benknoll-umn opened this issue Oct 12, 2021 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@benknoll-umn
Copy link
Member

Should add a function which splits a label index into two label indices using an index as a pivot. This function would use a single binary search to identify the middle label and return indices of the labels on either side.

rest_concepts  = concepts
for sentence in sentences:
    sentence_concepts, rest_concepts = rest_concepts.split(sentence.end_index)
    for concept in sentence_concepts:
        pass 

would have half as many binary searches as:

for sentence in sentences:
    for concept in concepts.inside(sentence):
        pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant