Skip to content

Instantly share code, notes, and snippets.

@omri374
Last active May 6, 2021 08:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save omri374/ca9cf2225b5ba5a43724b6d07613e1c4 to your computer and use it in GitHub Desktop.
Save omri374/ca9cf2225b5ba5a43724b6d07613e1c4 to your computer and use it in GitHub Desktop.
import pprint
import spacy
nlp = spacy.load("en_core_web_trf")
detailed_results = {}
print("Model name: en_core_web_trf")
for template, name_set in itertools.product(templates, name_sets.items()):
print(f"Name set: {name_set[0]}, Template: \"{template}\"")
results = names_recall(nlp, name_set[1], template)
detailed_results[template, name_set[0]] = results
print("Detailed results:")
pprint.pprint(detailed_results)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment