idio / spotlight-model-editor

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

Feature/adding types #9

Closed tgalery closed 9 years ago

tgalery commented 9 years ago

This PR adds the functionality of parsing types from a file when adding resources if the resource comes with a pipe separated list of types DBPediaResource|type1|type2 and so on.

dav009 commented 9 years ago

So this assumes that the type exists already in the ontologyTypeStore right?

tgalery commented 9 years ago

it tries to retrieve the type from the ontologyTypeStore, but if it can't find it, it doesn't add it (hence the try...catch ). This means that you can't add arbitrary types, only the ones that belong to the dbpedia ontology, or other supported ontology (Schema, OpenCyc), etc...

dav009 commented 9 years ago

:+1:

tgalery commented 9 years ago

It would be good to investigate how to add stuff from other ontologies, but I think that would require adding classes that extend OntologyType somehow. Also the presence of a Class doesn't seem to translate as presence of information from a specific class, for example, there's a Freebase OntologyType but no freebase types in the model.

dav009 commented 9 years ago

Thanks!!