I have a requirement where I want to extract 5W from a sentence .
Example
text = "To spend his weekend , Sam goes to MCG every Sunday to play cricket by his own car."
python function
extract5w(text) should give the following output
{"Who" : "Sam"
"When" : "every sunday"
"Where" : "MCG"
"Why": "to spend his weekend"
"How" : "by own car"}
How can I achieve this using Spacy or machine learning like BERT .
question from:
https://stackoverflow.com/questions/65897662/extracting-5w-from-sentence 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…