idio / spotlight-model-editor

Tool for tweaking dbpedia spotlight's models
Apache License 2.0
16 stars 8 forks source link

surfaceform make-unspottable is not working for me #24

Closed sam-k3nny closed 6 years ago

sam-k3nny commented 7 years ago

e.g. sh model-editor surfaceform candidates path/to/en/model automated returns results.

If I run: sh model-editor surfaceform make-unspottable path/to/en/model automated' or sh model-editor surfaceform make-unspottable path/to/en/model make-unspottable.txt -f' where make-unspottable.txt has one line in it: automated

I see the output: the counts for:automated,2660903 has been reduced.

However, if I run sh model-editor surfaceform candidates path/to/en/model automated again, automated is still 'spottable'. Further, the results - scores and support - are exactly the same.

I was hoping this surfaceform would be removed completely.

I'd be grateful if someone could let me know what I am doing wrong.

Lugrin commented 7 years ago

You're doing nothing wrong. make-unspottable reduces the annotated count of the surface form to make it less spottable. If you want to make surface forms completely unspottable, you can edit this function.

sam-k3nny commented 7 years ago

Thank you, I'll try that.

Separately, some surfaceforms that I see in results, are not found as candidates. Is this related to "types"?

e.g. if I have 'ul' in the annotation text I get the following result:

<Resource URI="http://dbpedia.org/resource/University_of_Limerick" support="394" types="DUL:Agent,DBpedia:Agent,Wikidata:Q43229,DUL:SocialPerson,Schema:Organization,DBpedia:Organisation,Schema:EducationalOrganization,DBpedia:EducationalInstitution,Wikidata:Q3918,Schema:CollegeOrUniversity,DBpedia:University" surfaceForm="ul" offset="1" similarityScore="0.9999999999263878" percentageOfSecondRank="7.146778453439215E-11"/>

But: sh model-editor surfaceform candidates path/to/model/en/model ul raises a SurfaceFormNotFoundException.

Do you know what is happening here?

Thank you.

Lugrin commented 7 years ago

Are you using the same model when annotating with spotlight and exploring with spotlight-model-editor? That's with only explanation I can see.

sam-k3nny commented 7 years ago

Thanks for your prompt response. Yes, I am. I have only one model in this environment. In addition, when running spotlight I can confirm that other edits I have made (using make-unspottable or association remove) have taken effect. Strange.

mal commented 6 years ago

Closing as part of archiving process.