Open Annrison opened 3 years ago
try:
entity_sentence_list = ner(word_sentence_list, pos_sentence_list)
except AssertionError:
entity_sentence_list = []
for word_sentence, pos_sentence in zip(word_sentence_list, pos_sentence_list):
try:
singleton_entity_sentence_list = ner([word_sentence], [pos_sentence])
except AssertionError:
singleton_entity_sentence_list = ner([word_sentence], [pos_sentence], character_normalization=False)
entity_sentence_list.append(singleton_entity_sentence_list[0])
您好,參考官網的範例寫了一個
get_nlp_result
function,會 iteratedata_df
的 row,將文字資料row[text_col]
依序送進 ws、pos 和 ner function 處理在跑ner的時候有時會遇到 AssertionError error,請問這是甚麼問題造成的呢?