判断是否为单元

    elif word.endswith('单元') :
        if i > 0 and words[i-1].isdigit():
            tag_list.append('B-cellno')
            cellno = words[i-1] + word
            roadno = words[i-1]
        else:
            for char in word:
                if char == word[0]:
                    tag_list.append('B-cellno')
                elif char == word[-1]:
                    tag_list.append('E-cellno')
                else:
                    tag_list.append('I-cellno')
            cellno = word
            roadno = wor
# 判断是否为单元 elif wordendswith单元 for char in word if char == word0 tag_listappendB-cellno elif char == word-1 tag_li

原文地址: https://www.cveoy.top/t/topic/htCE 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录