Skip to content

Dictionary: Funders

VAISHALI ARORA edited this page Aug 7, 2020 · 24 revisions

Owner :

Vaishali Arora

Dictionary :

Funders

Find here :

https://github.com/petermr/openVirus/blob/master/dictionaries/funders/funders%20(1).xml

Source :

https://github.com/petermr/openVirus/blob/master/dictionaries/funders/funders_dictionary.md

Blocked on :

I need the syntax for converting the SPARQL.xml file to the ami dictionary format.

My SPARQL dictionary funder is committed here : https://github.com/petermr/openVirus/blob/master/dictionaries/funders/funder.sparql.xml

Attributes in my SPARQL dictionary :

         <head>
		<variable name='item'/>
		<variable name='Crossref_funder_ID'/>
		<variable name='Crossref_funder_IDLabel'/>
		<variable name='country'/>
		<variable name='countryLabel'/>
		<variable name='funder'/>
		<variable name='funderLabel'/>
	</head>

*Can you find a way of extracting the funder

Me: @PMR it is there in FunderLabel. This query does fetch names of the funders. They are there in FunderLabel.

#Funders
SELECT ?FunderLabel ?Country ?CountryLabel ?instanceofLabel  ?Funder ?crossrefid  WHERE {
  ?Funder wdt:P3153 ?crossrefid .
  ?Funder wdt:P31 ?instanceof .
  ?Funder wdt:P17 ?Country .
  
 
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
LIMIT 20000000

@PMR Changing the query with

`?funderOrg  wdt:P3153 ?funderId .` 

(as you suggested in #dictionaries) didn't fetch any result.

I tried this syntax to convert SPARQL to ami format:

amidict -vv --dictionary funders --directory dict --input funder.sparql.xml create --informat=wikisparqlxml --sparqlmap wikidata=item,funder_ID=Crossref_funder_ID,name=Crossref_funder_IDLabel,country=country,countryLabel=countryLabel,funder=funder,funderLabel=funderLabel

After updating ami3 today (Aug 07, 2020) and running this command, the commandLine says :

Specific values (DictionaryCreationTool)
================================
{Crossref_funder_IDLabel=[name], funder=[funder], country=[country], item=[wikidata], Crossref_funder_ID=[funder_ID], countryLabel=[countryLabel], funderLabel=[funderLabel]}
WS>[funder, country, countryLabel, funderLabel, name, funder_ID, wikidata]
java.lang.RuntimeException: sparqlMap MUST contain key: term
        at org.contentmine.ami.tools.dictionary.WikidataSparql.checkAmiNamesContain(WikidataSparql.java:119)
        at org.contentmine.ami.tools.dictionary.WikidataSparql.checkNameMappings(WikidataSparql.java:78)
        at org.contentmine.ami.tools.dictionary.WikidataSparql.readSparqlVariablesAndCreateMapping(WikidataSparql.java:140)
        at org.contentmine.ami.tools.dictionary.WikidataSparql.readSparqlCreateDictionary(WikidataSparql.java:133)
        at org.contentmine.ami.tools.dictionary.DictionaryCreationTool.createAndWriteDictionary(DictionaryCreationTool.java:404)
        at org.contentmine.ami.tools.dictionary.DictionaryCreationTool.runSub(DictionaryCreationTool.java:311)
        at org.contentmine.ami.tools.AbstractAMIDictTool.runSpecifics(AbstractAMIDictTool.java:423)

PMR: Thanks. I think you have an old version of AMIDict. Please use todays.

Clone this wiki locally