對知識庫Wikidata的爬蟲以及將三元組關係語料庫獲取知識圖譜數據

83 if(len(zh_hans) > 0 ):

84

85 zh_hans[0] = re.sub(r'\\\\',r'\\',zh_hans[0])

86 chrelationItem['chrmention'] = zh_hans[0].encode('latin-1').decode('unicode_escape')

87 break;

88 else:

89 chrelationItem['chrmention'] = "no chinese label"

90 return chrelationItem




分享到:


相關文章: