title: Spacy (phrase) matching multiple attributes
body: <p>I wish to match the phrase &quot;Education program&quot; but with any word in between. So suppose I have the following text:</p>
  <pre><code>text = &quot;Education is a way to program life. This sentence has nothing to do with education&quot;
  </code></pre>
  <p>And I set the pattern to be:</p>
  <pre class="lang-py prettyprint-override"><code>pattern = [{'LOWER': {'LEMMA': 'education'}}, {'IS_SENT_START': False, 'OP': '*'},{'LOWER': {'LEMMA': 'program'}}]
  </code></pre>
  <p>However, when I do the following I get an insane amount of matches for the above:</p>
  <pre class="lang-py prettyprint-override"><code>import spacy
  from spacy.matcher import Matcher
  nlp = spacy.load(&quot;en_core_web_lg&quot;)
  
  matcher = Matcher(nlp.vocab)
  matcher.add('edu', None, pattern)
  doc = nlp(text)
  matches = matcher(doc)
  for match_id, start, end in matches:
      string_id = nlp.vocab.strings[match_id]  # Get string representation
      span = doc[start:end]  # The matched span
      print(&quot;Match ID: {}\nString ID: {}\nStart: {}\nEnd: {}\nText: {}\nSentence: {}&quot;.format(
        match_id, string_id, start, end, span.text, span.sent))
  </code></pre>
  <p>Just wondering what I'm doing wrong here? I tried switching LOWER and LEMMA as well, without any luck.</p>
  <h2>Edit1:</h2>
  <p>The given solution works but not for the following text:
  <code>text = 'This account was created by a prior staff member for our county Tobacco Education Program.'</code>. I have spacy version <code>2.2.4</code>.</p>