Possible to find some text that meets a condition in proximity to a keyword?

18 views
Skip to first unread message

Lee Wilson

unread,
Oct 11, 2017, 12:13:48 PM10/11/17
to beautifulsoup
Hi, new to bs and I've really just begun looking through the documentation for this but it doesn't appear to explain if this is possible. 

In the "getting started" example, assume the keyword is "sister" and I want to find "three" within 3 words of "sister" (or "sisters"). 

Does bs have this capability, is there a package I can import to accomplish this, or am I looking at a regex or NLP type issue? 

thanks for the help

Drew Einhorn

unread,
Oct 13, 2017, 3:17:31 PM10/13/17
to beautifulsoup
regex is what you need. No need for nlp.

--
You received this message because you are subscribed to the Google Groups "beautifulsoup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beautifulsou...@googlegroups.com.
To post to this group, send email to beauti...@googlegroups.com.
Visit this group at https://groups.google.com/group/beautifulsoup.
For more options, visit https://groups.google.com/d/optout.
--
I don't remember, I don't recall
I got no memory of anything at all
    -- Peter Gabriel
Reply all
Reply to author
Forward
0 new messages