This file contains 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
import spacy, re, dateparser | |
from spacy.matcher import Matcher | |
from spacy.tokenizer import Tokenizer | |
from spacy import displacy | |
def custom_tokenizer(nlp, infix_reg): | |
""" | |
Function to return a customized tokenizer based on the infix regex |