mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-27 02:16:32 +03:00
aa876884f0
This reverts commit fb9d3bb022
.
12 lines
322 B
Python
12 lines
322 B
Python
from __future__ import unicode_literals
|
|
|
|
import re
|
|
|
|
_URL_PATTERN = r'''
|
|
^((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w\-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$
|
|
'''.strip()
|
|
|
|
TOKEN_MATCH = re.compile(_URL_PATTERN).match
|
|
|
|
__all__ = ['TOKEN_MATCH']
|