Hi @deepesh, what happens if you run the command above? Does it pre-highlight the entities with your pattern?
If you're using a Prodigy version >= 1.9, then the --patterns command should exist. If you're incorporating this in a custom recipe, you can use a PatternMatcher and include it in the stream, something like this:
from prodigy.models.matcher import PatternMatcher
# Inside the recipe
...
stream = JSONL(...)
if patterns is not None:
matcher = PatternMatcher(nlp, combine_matches=True, all_examples=True)
matcher = pattern_matcher.from_disk("path/to/patterns.jsonl")
stream = (eg for _, eg in pattern_matcher(stream))
stream = add_tokens(...)
stream = JSONL(source)
if patterns is not None:
matcher = PatternMatcher(nlp, combine_matches=True, all_examples=True)
matcher = matcher.from_disk("_patterns_textcat.jsonl")
stream = (eg for _, eg in matcher(stream))
My question is i would like to highlight the pattern that is loaded using PatternMatcher with different color . I can customize the label color but not the pattern highlights that would load.