I don’t understand how to write a code for 2 steps of my task. I am thinking about it for 2 weeks, but I don’t have time anymore. Can you help me?
3.1. Get a ‘window’ from the list of stems for computing LR. The ‘window’ is simply a subset of your list of stems which starts at index
i (inclusive) and ends with index
i + n (exclusive).
3.2. Compute LR by dividing the number of unique stems in the window by the window size
n and add it to your variable initialized in Step 2.