It is fairly safe to assume that each m k is a constant, in the sense that m k is independent of the total number of sentences in the document.
the total time complexity Σ n k=1 O(m 2 k ) ≤ n × O(max 1≤ j≤n (m 2 j )) = n × O(1) = O(n), i.e., linear in the total number of sentences.