Specify target file

Import tsv file as pandas dataframe

EXAMPLE

Select one for the sake of example

Remove digit characters (often misplaced footnote markers)

Toggle lowercase

Remove ''noisy'' strings

Tokenise by sentence

Tokenise by word

Remove stop words

Stem/Lemmatise tokens

Query definition

Query execution

GENERALISATION

Define unified function

Slice the original data frame

Add a new column with matched sentence, if LS, or False otherwise