lexnlp.extract.en.url
: Extracting URLs¶
The lexnlp.extract.en.urls
module contains methods that allow for the extraction
of URLs from text.
The full list of current unit test cases can be found here: https://github.com/LexPredict/lexpredict-lexnlp/tree/master/test_data/lexnlp/extract/en/tests/test_urls
Extracting constraints¶
-
lexnlp.extract.en.urls.
get_urls
(text: str) → Generator[[str, None], None]¶ Find urls in text.
Example
>>> import lexnlp.extract.en.urls
>>> text = "A copy of the terms can be found at www.acme.com/terms"
>>> print(list(lexnlp.extract.en.urls.get_urls(text)))
['www.acme.com/terms']