You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One quirk I have observed is that partial mention matches seem to get scored higher by the ED than the full ones. The following example illustrates the point:
importrequestsimportspacynlp=spacy.load('en_core_web_trf')
API_URL="http://0.0.0.0:5555"text_doc="""In early September, in just 48 hours the UK got a new prime minister (Liz Truss) and a new king (Charles III, following the death of Queen Elizabeth II).Both take over at a turbulent time in British politics, with no shortage of current and future challenges. To name just a few: a stagnant economy, sky-high energy prices, more Brexit fallout with the EU, and Scots demanding a fresh independence vote.On GZERO World, Ian Bremmer speaks to former British PM Tony Blair (1997-2007), who believes there will be a lot of uncertainty over the next year or two if Truss insists on big tax cuts and big borrowing.Blair also looks back at the queen's legacy and the future of the monarchy, explains why Brexit will hurt but probably not fragment the UK, and defends why we need to return to his comfort zone of the political center to fix today's problems."""doc=nlp(text_doc)
spans= []
forentindoc.ents:
ifent.label_=='PERSON':
span= (ent.start_char, len(ent.text))
spans.append(span)
ed_result=requests.post(API_URL, json={
"text": text_doc,
"spans": spans
}).json()
forresultined_result:
print(result)
As can be seen, the mention Truss seems to get quite a high score compared to the full mention Liz Truss.
Thanks!
The text was updated successfully, but these errors were encountered:
abhinavkulkarni
changed the title
Partical mention matches get higher scores than full ones
Partial mention matches get higher scores than full ones
Dec 10, 2022
Hi,
One quirk I have observed is that partial mention matches seem to get scored higher by the ED than the full ones. The following example illustrates the point:
I get the following output:
As can be seen, the mention
Truss
seems to get quite a high score compared to the full mentionLiz Truss
.Thanks!
The text was updated successfully, but these errors were encountered: