Spaces:
Runtime error
Runtime error
# utils.py | |
import spacy | |
nlp = spacy.load("en-core-sci-lg") | |
def extract_named_entities(text): | |
doc = nlp(text) | |
entities = [(ent.text) for ent in doc.ents] | |
return entities | |