When searching a block of text for a specific keyword, the following function will return each occurrence of a keyword with supporting contextual text. For example, consider the following block of text:
Bias is the tendency to have an opinion, or view, that is often without considering evidence and other information. Biases can be learned implicitly within cultural contexts. People may develop biases toward or against an individual, an ethnic group, a nation, a religion, a social class, a political party, theoretical paradigms and ideologies within academic domains, or a species. Biased means one-sided, lacking a neutral viewpoint, or not having an open mind. Bias can come in many forms and is related to prejudice and intuition. In science and engineering, a bias is a systematic error. Statistical bias results from an unfair sampling of a population, or from an estimation process that does not give accurate results on average.