I'm trying to apply the textacy.extract.subject_verb_object_triples
function to a pandas df column. The function returns empty generator objects, instead of subject_verb_object_triples when applied like so:
sp500news3['title'].apply(lambda x: textacy.extract.subject_verb_object_triples)
or
sp500news3['title'].apply(textacy.extract.subject_verb_object_triples)
I've also tried:
import spacy
import textacy
def extract_SVO1(text):
new_doc = textacy.extract.subject_verb_object_triples(text)
new_list = list(new_doc)
text = new_list
sp500news3['title'] = sp500news3['title'].apply(extract_SVO1)
How can I implement the function on my dataframe column to return the correct function output?