mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-24 17:06:29 +03:00
Fix attributeruler key
This commit is contained in:
parent
092ce4648e
commit
98327f66a9
|
@ -173,7 +173,9 @@ class AttributeRuler(Pipe):
|
|||
|
||||
DOCS: https://nightly.spacy.io/api/attributeruler#add
|
||||
"""
|
||||
self.matcher.add(len(self.attrs), patterns)
|
||||
# This needs to be a string, because otherwise it's interpreted as a
|
||||
# string key.
|
||||
self.matcher.add(f"attr_rules_{len(self.attrs)}", patterns)
|
||||
self._attrs_unnormed.append(attrs)
|
||||
attrs = normalize_token_attrs(self.vocab, attrs)
|
||||
self.attrs.append(attrs)
|
||||
|
|
Loading…
Reference in New Issue
Block a user