Skip to content
Discussion options

You must be logged in to vote

Hi @grahamanderson,

enclose the pattern for your regex in [], as a list of patterns is expected (see the docs):

terms = [
    {'ent': 'ACRO', 'patterns': ['AA']},
    {'ent': 'DEF', 'patterns': ['Airplane Agoraphobia']},
    {'ent': 'ACRO_UNKNOWN', "patterns": [[{"TEXT": {"REGEX":"[A-Z][A-Z-0-9]+"}}]]}  #T1, THING2
    #[{"label": "FRT", "pattern": [{'TEXT' : {'REGEX': "[Aa]ppl[e|es]"}}]},
]

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@grahamanderson
Comment options

Answer selected by grahamanderson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usage General spaCy usage feat / spanruler Feature: Entity and span ruler
2 participants