Skip to content

Commit

Permalink
add post filters to custom spacy extractor
Browse files Browse the repository at this point in the history
  • Loading branch information
saggu committed Jan 23, 2018
1 parent 2389a33 commit 2274ff4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions etk/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1527,6 +1527,10 @@ def extract_using_custom_spacy(self, d, config, field_rules=None):
results = self._relevant_text_from_context(d[_SIMPLE_TOKENS_ORIGINAL_CASE],
custom_spacy_extractor.extract(field_rules, nlp_doc, self.nlp),
config[_FIELD_NAME])
if _POST_FILTER in config:
post_filters = config[_POST_FILTER]
results = self.run_post_filters_results(results, post_filters)

return results

def infer_rule_using_custom_spacy(self, d, positive_eg):
Expand Down

0 comments on commit 2274ff4

Please sign in to comment.