I currently have the following: import spacy nlp = spacy.load("en_core_web_sm") doc = nlp("Apple is looking at buying U.K. startup for $1 billion") query = nlp("U.K. startup") for token in doc: if token.text in [token.text for token in query]: ... Is there a better way to do this? Continue reading...