code: def detect_infinitive_phrase(sentence):
      
  
      # eliminate sentences without to
      if not 'to' in sentence.lower():
          return False
  
      doc = nlp(sentence)
      prev_word = None
      for w in doc:
          # if statement will execute exactly once
          if prev_word == 'to':
              if w.dep_ == 'ROOT' and w.tag_.startswith('VB'): 
                  return True # this is quite likely to be an infinitive phrase
              else:
                  return False
          prev_word = w.text.lower()
docs: Given a string, return true if it is an infinitive phrase fragment