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

Add lower_ property to Span class? #669

Closed
bdewilde opened this issue Dec 3, 2016 · 6 comments
Closed

Add lower_ property to Span class? #669

bdewilde opened this issue Dec 3, 2016 · 6 comments
Labels
enhancement Feature requests and improvements help wanted (easy) Contributions welcome! (also suited for spaCy beginners)

Comments

@bdewilde
Copy link

bdewilde commented Dec 3, 2016

This is a feature request, not a bug. (Is there a better place to post re: enhancements?)

For convenience, it would be great to have a lower_ property on spans analogous to the lemma_ property. Looks like it would be a super straightforward change, maybe even just

cdef class Span:
    ...
    property lower_:
        def __get__(self):
            return ' '.join([t.lower_ for t in self]).strip()

Thanks in advance!

@honnibal honnibal added the enhancement Feature requests and improvements label Dec 4, 2016
@honnibal
Copy link
Member

honnibal commented Dec 4, 2016

Maybe! If so, we should support the other string methods too, right?

I think we should think more deeply about an ABC over Token, Span and Doc.

@bdewilde
Copy link
Author

bdewilde commented Dec 4, 2016

Agreed! I just didn't want to ask for more than I had immediate use for. :)

@bhargavvader
Copy link

bhargavvader commented Dec 24, 2016

I'd like to take a shot at this; any pointers?
If we're doing this, might as well add all the other string methods.

@honnibal
Copy link
Member

Sorry for letting this slip --- adding the other string methods sounds good. Adding the help wanted tag here.

The file to change is https://github.com/explosion/spaCy/blob/master/spacy/tokens/span.pyx

Tests would go here: https://github.com/explosion/spaCy/blob/master/spacy/tests/spans/test_span.py

@honnibal honnibal added the help wanted (easy) Contributions welcome! (also suited for spaCy beginners) label Feb 18, 2017
@ines
Copy link
Member

ines commented Mar 16, 2017

Fixed in #883!

@ines ines closed this as completed Mar 16, 2017
@ines ines modified the milestone: v1.7.0 Mar 18, 2017
@lock
Copy link

lock bot commented May 9, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators May 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Feature requests and improvements help wanted (easy) Contributions welcome! (also suited for spaCy beginners)
Projects
None yet
Development

No branches or pull requests

4 participants