#NEWLINE# def scan( self , string ) : #NEWLINE# #INDENT# ' Returns True if search(Sentence(string)) may yield matches.\n            If is often faster to scan prior to creating a Sentence and searching it.\n        ' #NEWLINE# w = ( string . words for constraint in self . sequence if ( not constraint . optional ) ) #NEWLINE# w = itertools . chain ( * w ) #NEWLINE# w = [ w . strip ( WILDCARD ) for w in w if ( WILDCARD not in w [ 1 : ( - 1 ) ] ) ] #NEWLINE# if ( w and ( not any ( ( ( w in string . lower ( ) ) for w in w ) ) ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# return True