Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
81 views
in Technique[技术] by (71.8m points)

python - Extracting 5w from sentence

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...