The scorer seems to calculate the precision and recall wrongly due to the use of consecutive IDs as gold standard and predictions.
Let's consider that the following text is the gold standard. There are three mentions and according to the scorer, there are three links Q69345, Q78068340 and Q39:
Neuchâld B-loc O B-loc.adm.reg O O O Q69345 _ LED0.33
SI B-pers O B-pers.ind O B-comp.title O Q78068340 _ NoSpaceAfter|LED0.09
. I-pers O I-pers.ind O I-comp.title O Q78068340 _ LED0.09
la O O O O O O _ _ _
Confédération B-loc O B-loc.adm.nat O O O Q39 _ LED0.00
Suisse I-loc O I-loc.adm.nat O O O Q39 _ NoSpaceAfter|LED0.00
And let us consider the predicted links:
Neuchâld B-loc O B-loc.adm.reg O O O NIL _
SI B-pers O B-pers.ind O B-comp.title O NIL _
. I-pers O I-pers.ind O I-comp.title O NIL _
la O O O O O O _ _
Confédération B-loc O B-loc.adm.nat O O O Q39|Q340787|Q568452 _
Suisse I-loc O I-loc.adm.nat O O O Q39|Q340787|Q568452 _
Although the entity linker predicted two NIL and Q39, the scorer considers that we only predicted one NIL and Q39. Therefore, we have:
P=1/(1+1) = 0.5 Q39/(Q39+NIL)
R=1/(1+2) = 0.33 Q39/(Q39+Q69345+Q78068340)
The error can happens on the other way too. Let us consider the following text as the gold standard:
Neuchâld B-loc O B-loc.adm.reg O O O NIL _ LED0.33
SI B-pers O B-pers.ind O B-comp.title O NIL _ NoSpaceAfter|LED0.09
. I-pers O I-pers.ind O I-comp.title O NIL _ LED0.09
la O O O O O O _ _ _
Confédération B-loc O B-loc.adm.nat O O O Q39 _ LED0.00
Suisse I-loc O I-loc.adm.nat O O O Q39 _ NoSpaceAfter|LED0.00
And this the predicted output:
Neuchâld B-loc O B-loc.adm.reg O O O Q69345 _
SI B-pers O B-pers.ind O B-comp.title O NIL _
. I-pers O I-pers.ind O I-comp.title O NIL _
la O O O O O O _ _
Confédération B-loc O B-loc.adm.nat O O O Q39|Q340787|Q568452 _
Suisse I-loc O I-loc.adm.nat O O O Q39|Q340787|Q568452 _
In this case, the scorer says, that we predicted three links but the gold standard had only two:
P=1/(1+2) = 0.33 Q39/(Q39+NIL+Q78068340)
R=1/(1+1) = 0.5 Q39/(Q39+NIL)
The scorer should take in consideration the NER boundaries to determine when a link starts and ends. This behavior is not seen if we add an extra line without a link, such as in:
Neuchâld B-loc O B-loc.adm.reg O O O NIL _ LED0.33
REMOVEME O O O O O O _ _
SI B-pers O B-pers.ind O B-comp.title O NIL _ NoSpaceAfter|LED0.09
. I-pers O I-pers.ind O I-comp.title O NIL _ LED0.09
la O O O O O O _ _ _
Confédération B-loc O B-loc.adm.nat O O O Q39 _ LED0.00
Suisse I-loc O I-loc.adm.nat O O O Q39 _ NoSpaceAfter|LED0.00