  def test_load_en():
      rules = util.read_tokenization('en')
      assert len(rules) != 0
      aint = [rule for rule in rules if rule[0] == "ain't"][0]
      chunk, lex, pieces = aint
      assert chunk == "ain't"
      assert lex == "are"
      assert pieces == ["not"]
 
</s> remove     assert lex == "are"
    assert pieces == ["not"]
 </s> add     assert pieces[0] == "are"
    assert pieces[1] == "not" </s> remove             lex = pieces.pop(0)
 </s> add  </s> remove             entries.append((chunk, lex, pieces))
 </s> add             entries.append((chunk, list(pieces))) </s> remove     lex_ids = tokenize('hello, possums.')
    assert len(lex_ids) == 4
    assert lex_ids[0] != lookup('hello')
    assert lex_of(lex_ids[0]) == lex_of(lookup('hello'))
    assert lex_ids[2] == lookup('possums.')
    assert lex_of(lex_ids[2]) == lex_of(lookup('possums.'))
    assert lex_of(lex_ids[2]) == lex_of(lookup('possums'))
    assert lex_of(lex_ids[1]) != lex_of(lookup('hello'))
    assert lex_ids[0] != lookup('hello.')
 </s> add     tokens = tokenize('hello, possums.')
    assert len(tokens) == 4
    assert lex_of(tokens[0]) == lex_of(lookup('hello'))
    assert lex_of(tokens[1]) == lex_of(lookup(','))
    assert lex_of(tokens[2]) == lex_of(lookup('possums'))
    assert lex_of(tokens[1]) != lex_of(lookup('hello')) </s> remove         token = lookup(string)
        assert unhash(lex_of(token)) == p
        tokens = expand_chunk(token)
 </s> add         tokens = tokenize(string)
    chunk, pieces = aint
  def test_load_en():
      rules = util.read_tokenization('en')
      assert len(rules) != 0
      aint = [rule for rule in rules if rule[0] == "ain't"][0]
    chunk, pieces = aint
      assert chunk == "ain't"
      assert lex == "are"
      assert pieces == ["not"]
keep keep keep keep replace keep keep keep
 * Refactor spacy so that chunks return arrays of lexemes, so that there is properly one lexeme per word. 
tests/test_rules.py