For each window, compute the type-token ratio restricted to the supplied
closed-class words (prepositions + conjunctions in the original paper). Windows
containing none are skipped. The caller supplies the set via
closedClassWords, so this works for any language without hardcoding here.
Closed-class diversity (generalises AssistiveWare's MA-UPC-TWR-30).
For each window, compute the type-token ratio restricted to the supplied closed-class words (prepositions + conjunctions in the original paper). Windows containing none are skipped. The caller supplies the set via
closedClassWords, so this works for any language without hardcoding here.