contex - obtaining the context in which words appear
As of recent I have been studying the standard threading library and thinking of things that I can "multi-thread", this seemed to fit the bill. The idea here is to create a piece of software that can look at a collection of words and then print the context in which they appear in a text, under certain constraints. These collection of words are given as a set of pairs ${W,L}$, each member of this set we will call a query. $W$ being the word of interest and $L$ being the number of words after the word $W$ we want to look at. We also specify $k$ which is the number of words that we want to look at before and after a query. The constraints We want $k$ words to the left of the query word $W$ and $k + L$ words to the right of $W$. We will refer to this sub-collection of words as a window . We want the L words after W and W itself to be highlighted. If we encounter a full stop then we truncate the window to respect this. If we have overlapping windows then we join the queri...