diff --git a/app/corpora/cqi/models/attributes.py b/app/corpora/cqi/models/attributes.py index 754646cc..152a6f62 100644 --- a/app/corpora/cqi/models/attributes.py +++ b/app/corpora/cqi/models/attributes.py @@ -140,7 +140,7 @@ class StructuralAttribute(Attribute): rc_rbound = \ self.cpos_by_id(min((last_id + context), (self.size - 1)))[1] if rc_rbound != last_cpos: - rc_lbound = min((last_cpos + 1), (self.size - 1)) + rc_lbound = min((last_cpos + 1), (self.corpus.size - 1)) rc = (rc_lbound, rc_rbound) cpos_list_rbound = rc_rbound else: