第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

如何提取與 CoreEntityMention匹配的維基百科實(shí)體

如何提取與 CoreEntityMention匹配的維基百科實(shí)體

蕭十郎 2023-03-31 14:32:51
我正在對(duì)一些文本運(yùn)行 CoreNLP,并將找到的實(shí)體與維基百科實(shí)體進(jìn)行匹配。我想重建為找到的實(shí)體提供鏈接和其他有用信息的句子。CoreEntityMention 有一個(gè)entity()方法,但它只返回一個(gè)字符串。Properties props = new Properties();props.setProperty("annotators", "tokenize,ssplit,pos,lemma,ner,entitylink");// set up pipelinepipeline = new StanfordCoreNLP(props);String doc = "text goes here";pipeline.annotate(doc);// Iterate the sentencesfor (CoreSentence sentence : doc.sentences()) {      Go through all mentions      for (CoreEntityMention em : sentence.entityMentions()) {          System.out.println(em.sentence());          // Here I would like to extract the Wikipedia entity information          System.out.println(em.entity());      }    }
查看完整描述

1 回答

?
蝴蝶不菲

TA貢獻(xiàn)1810條經(jīng)驗(yàn) 獲得超4個(gè)贊

您只需要添加維基百科頁面 url。

所以Neil_Armstrong映射到https://en.wikipedia.org/wiki/Neil_Armstrong.


查看完整回答
反對(duì) 回復(fù) 2023-03-31
  • 1 回答
  • 0 關(guān)注
  • 103 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)