Organizations: Department of Information Technology, PICT, Pune, India · L3Cube Labs, Pune, India · Indian Institute of Technology Madras, Chennai, India
Named Entity Recognition (NER) is a core NLP task, but transformer-based sentence-level models struggle with long documents because of fixed input-length limits: truncation drops content, and non-overlapping chunking fragments entities at segment boundaries. We introduce an inference-only pipeline that extends a frozen NER model, MahaNER-BERT, fine-tuned on the MahaNER corpus, to document-level prediction via overlapping sliding windows that are merged into a single annotation, without any retraining or architectural change. We evaluate the pipeline on six document-level corpora built from the MahaNER test set using two strategies: Normal Repeat, which duplicates sentence sequences to extend length while preserving contextual continuity, and Random Repeat, which concatenates distinct sequences to produce longer, heterogeneous inputs, each instantiated at three length levels, across several sliding-window configurations. The model retains a macro F1-score of up to 0.8902, with variation staying below one percentage point regardless of document length or construction strategy. Compared with the conventional non-windowed approach, the sliding-window pipeline avoids the boundary-fragmentation errors introduced by non-overlapping segmentation, yielding consistently higher and more stable document-level F1-scores.
Figures & tables
Dataset
Construction Strategy
Objective
Normal Repeat 4x
Repeat each sentence sequence four times
Length evaluation
Normal Repeat 8x
Repeat each sentence sequence eight times
Length evaluation
Normal Repeat 10x
Repeat each sentence sequence ten times
Length evaluation
Random Repeat 4x
Concatenate four random sequences
Length eval., context diversity
Random Repeat 8x
Concatenate eight random sequences
Length eval., context diversity
Random Repeat 10x
Concatenate ten random sequences
Length eval., context diversity
Table 1: Document-level evaluation datasets generated from the MahaNER test set.
Window Size ( W )
Stride ( S )
Overlap
20
15
25%
40
30
25%
60
45
25%
80
60
25%
Table 2: Sliding window configurations used during document-level inference.
Window Size ( W )
Stride ( S )
Overlap
20
15
25%
40
30
25%
60
45
25%
80
60
25%
Table 3: Sliding window configurations used during document-level inference.
Dataset Variant
Macro F1-score
W=20,S=15
W=40,S=30
W=60,S=45
W=80,S=60
Normal Repeat 4x
0.8901
0.8878
0.8872
0.8872
Normal Repeat 8x
0.8902
0.8867
0.8856
0.8853
Normal Repeat 10x
0.8896
0.8867
0.8864
0.8850
Random Repeat 4x
0.8875
0.8848
0.8849
0.8849
Random Repeat 8x
0.8857
0.8824
0.8813
0.8789
Table 4: Macro F1-scores across all dataset variants and sliding window configurations.