I am new to python & can use some help:
This is just a sample :
I have a dictionary (with same key values repeating inside a list:
list_dummy = [{'a': 1, 'b':"The house is great. I loved it.",'e':"loved,the"}, {'a': 3, 'b': "Building is white in colour. I liked it.",'e':"colour"}, {'a': 5, 'b': "She is looking pretty. She is in my college",'e':"pretty"}]
'b' - consists of body text
'e' - consists of words(can be more than one)
I want to extract sentences out of 'b' which contains either one or more words from 'e' in them.
I need to first split the text into sentences by sent_tokenize & than need to extract. Sent_tokenize takes only string as an input. How to proceed?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…