Created
April 5, 2020 14:38
-
-
Save vikeshsingh37/1178744458f9752224ce0672091b749e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from snorkel.slicing import slicing_function | |
@slicing_function() | |
def short_link(x): | |
"""Return whether text matches common pattern for shortened ".ly" links.""" | |
return int(bool(re.search(r"\w+\.ly", x.text))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment