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