修改 # 判断是否为楼层 elif wordendswith楼 or wordendswith层 for char in word if char == word0 tag_listappendB-floorno elif
判断是否为楼层
elif word.endswith('楼') or word.endswith('层'): if word[0].isdigit(): for char in word: if char == word[0]: tag_list.append('B-floorno') elif char == word[-1]: tag_list.append('E-floorno') else: tag_list.append('I-floorno') floorno = word else: tag_list.append('O')
原文地址: http://www.cveoy.top/t/topic/hs3w 著作权归作者所有。请勿转载和采集!