Spaces:
Runtime error
Runtime error
File size: 192 Bytes
22a5607 |
1 2 3 4 5 6 7 8 9 10 |
# 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
|