We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b1e789f + 48c4c1e commit d1292cdCopy full SHA for d1292cd
datafog/services/text_service.py
@@ -127,9 +127,10 @@ def _annotate_with_engine(
127
# Try regex first
128
regex_dict = self.regex_annotator.annotate(text)
129
130
- # Check if any entities were found
+ # Check if any VALID entities were found (ignore empty strings)
131
has_entities = any(
132
- len(entities) > 0 for entities in regex_dict.values()
+ any(entity.strip() for entity in entities)
133
+ for entities in regex_dict.values()
134
)
135
136
# If regex found entities, return those results
0 commit comments