def remove_choice(self, segm):
        ret = []
        prev_txt_end = -1
        prev_txt_nr = -1
        for word in segm:
            txt_nr = self.get_segm_id(word)
            #get increasing sequence of ids: in case of choice get first possibility
            if prev_txt_end-1 > self.get_sent_beg(word) or prev_txt_nr != txt_nr:
                ret.append(word)
                prev_txt_end = self.get_sent_end(word)
            prev_txt_nr = txt_nr

        return ret
dataset/ETHPy150Open nltk/nltk/nltk/corpus/reader/nkjp.py/NKJPCorpus_Segmentation_View.remove_choice/swapped operands of `>`