Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

merge nouns spacy

import spacy
nlp = spacy.load('en_core_web_sm')
nlp.add_pipe(nlp.create_pipe('merge_noun_chunks'))
doc = nlp(u"Autonomous cars shift insurance liability toward manufacturers")
for token in doc:
    print(token.text)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #merge #nouns #spacy
ADD COMMENT
Topic
Name
5+3 =