pyspark - 2.2.1
spacy - 2.0.7
python - 3.6
Placing full logs here
Traceback (most recent call last):
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pyspark/cloudpickle.py",
line 148, in dump
return Pickler.dump(self, obj)
File
"/Library/Frameworks/Pyt
import spacy
nlp = spacy.load('en')
def getPhrases(content):
phrases = []
doc = nlp(str(content))
for chunks in doc.noun_chunks:
phrases.append(chunks.text)
return phrases
the above function will retrieve the noun phrases from the content and
return list of phrases.
d