      doc_2 = nlp_2(test_string)
      result_2 = [token.text for token in doc_2]
      assert result_1b == result_2
  
  
  def test_serialize_custom_tokenizer(en_vocab, en_tokenizer):
      """Test that custom tokenizer with not all functions defined or empty
 
</s> remove         if self.find_prefix(string) or self.find_infix(string) or self.find_suffix(string) or " " in string:
 </s> add         if not self.faster_heuristics or self.find_prefix(string) or self.find_infix(string) or self.find_suffix(string) or " " in string: </s> remove             "exceptions": lambda b: data.setdefault("rules", b)
 </s> add             "exceptions": lambda b: data.setdefault("rules", b),
            "faster_heuristics": lambda b: data.setdefault("faster_heuristics", b), </s> remove         cdef int max_length
 </s> add         cdef int max_length = 0
    assert nlp_2.tokenizer.faster_heuristics is False
      doc_2 = nlp_2(test_string)
      result_2 = [token.text for token in doc_2]
      assert result_1b == result_2
    assert nlp_2.tokenizer.faster_heuristics is False
  
  
  def test_serialize_custom_tokenizer(en_vocab, en_tokenizer):
      """Test that custom tokenizer with not all functions defined or empty
keep keep add keep keep keep keep
 Add tokenizer option to allow Matcher handling for all rules (#10452)

* Add tokenizer option to allow Matcher handling for all rules

Add tokenizer option `with_faster_rules_heuristics` that determines
whether the special cases applied by the internal `Matcher` are filtered
by whether they contain affixes or space. If `True` (default), the rules
are filtered to prioritize speed over rare edge cases. If `False`, all
rules are included in the final `Matcher`-based pass over the doc.

* Reset all caches when reloading special cases

* Revert "Reset all caches when reloading special cases"

This reverts commit 4ef6bd171d00da01cbabc3bcde00088ba4bd5578.

* Initialize max_length properly

* Add new tag to API docs

* Rename to faster heuristics 
spacy/tests/serialize/test_serialize_tokenizer.py