Skip to content
petermr edited this page Jul 27, 2020 · 1 revision

schema for dictionaries

mandatory

name

Label to present to humans. Often the same as term, but could be different for abbreviations, (e.g. term =nipgr, name = National Institute for Plant Genome Research)

term

Used for searching. Normally EN.

term.lang

Language equivalent for term, e.g. term.hi for Hindi.

SPARQL-derived

wikidataID (wikidata)

Normally a Q-number

wikidataLabel

Text (in EN)

description

Text from Wikidata (or possibly) Wikipedia

description.lang

possible equivalent description , e.f. description.hi

wikipedia URL / page

Typical URL: https://en.wikipedia.org/wiki/Zika_virus gives wikipedia=Zika_virus

synonyms

optional wikidata-derived

Wikidata Properties

in triple:

?subject ?property ?predicate .

we report property . Suggest we report this as: Pddd_text

subject: Zika virus (Q202864) property: P1542 has effect object: (Q27043680)Zika virus infection

The machine needs:

Q202864 P1542 Q27043680

human wants:

Zika virus has effect Zika virus infection

field in dictionary might be:

term = "Zika virus"
name = "Zika virus"
wikidata = "Q202864"
p_1542_has_effect = "Q27043680"
p_1542_has_effect.en = "Zika virus infection"

Wikidata Items

not sure if we need this... would be

Q999999999 P31 Q88888888

p31 instance of very common.

examples

country

currently 2020-07-27

<sparql xmlns="http://www.w3.org/2005/sparql-results#">
<head>
  <variable name="wikidata"/>
  <variable name="wikidataLabel"/>
  <variable name="code"/>
  <variable name="wikipedia"/>
  <variable name="wikidataAltLabel"/>
  <variable name="alt"/>
  <variable name="term"/>
</head>
<results>
  <result>
    <binding name="wikidata">
      <uri>http://www.wikidata.org/entity/Q16</uri>
    </binding>
    <binding name="wikipedia">
      <uri>https://en.wikipedia.org/wiki/Canada</uri>
    </binding>
    <binding name="code">
      <literal>CA</literal>
    </binding>
    <binding name="wikidataAltLabel">
      <literal xml:lang="en">CA, ca, CDN, can, CAN, British North America, 🇨🇦, Dominion of Canada</literal>
    </binding>
    <binding name="wikidataLabel">
      <literal xml:lang="en">Canada</literal>
    </binding>
    <binding name="alt">
      <literal xml:lang="en">CA, ca, CDN, can, CAN, British North America, Dominion of Canada</literal>
    </binding>
    <binding name="term">
      <literal xml:lang="en">Canada</literal>
    </binding>
  </result>

Comments (PMR)

name="wikidata"

OK.

name="wikidataLabel"

OK. This will map to the term and the name.

name="code"

This will be mapped to a local name _code and ignored by software. Better to use something like: _iso3166 which is clear to the reader. Better still, use the Wikidata item as well q106487_iso3166

name="wikipedia"

OK

name="wikidataAltLabel"

These are raw synonyms. By default they would be mapped to <synonym>... and then processed which would be fine.

name="alt"

These are filtered synonyms. By default they would be ignored so need a wikisparqlmap in ami.

name="term"

OK.

disease

currently 2020-07-21

<sparql xmlns='http://www.w3.org/2005/sparql-results#'>
	<head>
		<variable name='DiseaseLabel'/>
		<variable name='instanceofLabel'/>
		<variable name='DiseaseAltLabel'/>
		<variable name='Disease'/>
		<variable name='ICDcode'/>
	</head>
	<results>
		<result>
			<binding name='Disease'>
				<uri>http://www.wikidata.org/entity/Q12135</uri>
			</binding>
			<binding name='ICDcode'>
				<literal>F00-F99</literal>
			</binding>
			<binding name='DiseaseLabel'>
				<literal xml:lang='en'>mental disorder</literal>
			</binding>
			<binding name='instanceofLabel'>
				<literal xml:lang='en'>disease</literal>
			</binding>
			<binding name='DiseaseAltLabel'>
				<literal xml:lang='en'>disease of mental health, disorder of mental process, mental dysfunction, mental illness, mental or behavioural disorder, psychiatric condition, psychiatric disease, psychiatric disorder, mental disorders</literal>
			</binding>
		</result>

PMR comments:

name='DiseaseLabel'

maps to term and name

name='instanceofLabel'

maps to P31 = p_31_instance_of

name='DiseaseAltLabel'

Maps to <synonym>s

name='Disease'

maps to wikidata

name='ICDcode'

local name. would become _icd10code. Better to resolve it to https://www.wikidata.org/wiki/Property:P494 and p_494_icd10. The part after the second underscore need not be controlled (may need abbreviation).

missing

It would be useful to get wikipedia page added.

## drug

funder

virus

virus_SPARQL(.xml) 2020-07-13

	<head>
		<variable name='virus'/>
		<variable name='ICTV_virus_ID'/>
	</head>
	<results>
		<result>
			<binding name='virus'>
				<uri>http://www.wikidata.org/entity/Q26770315</uri>
			</binding>
		</result>

name="virus"

Change to wikidata.

missing

add name, term , description, synonyms, _ictv_code or p_ or q_ equivalent.


non_pharmaceutical

test_trace

zoonosis

Clone this wiki locally