pyLodStorage 0.4.0__tar.gz → 0.4.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pylodstorage-0.4.0/pylodstorage.egg-info → pylodstorage-0.4.2}/PKG-INFO +1 -1
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/lodstorage/trulytabular.py +9 -3
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/lodstorage/version.py +1 -1
- {pylodstorage-0.4.0 → pylodstorage-0.4.2/pylodstorage.egg-info}/PKG-INFO +1 -1
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/LICENSE +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/README.md +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/lodstorage/__init__.py +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/lodstorage/csv.py +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/lodstorage/entity.py +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/lodstorage/jsonable.py +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/lodstorage/jsonpicklemixin.py +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/lodstorage/lod.py +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/lodstorage/mwTable.py +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/lodstorage/plot.py +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/lodstorage/query.py +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/lodstorage/querymain.py +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/lodstorage/sample.py +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/lodstorage/schema.py +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/lodstorage/sparql.py +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/lodstorage/sql.py +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/lodstorage/storageconfig.py +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/lodstorage/tabulateCounter.py +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/lodstorage/uml.py +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/lodstorage/xml.py +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/lodstorage/yamlablemixin.py +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/pylodstorage.egg-info/SOURCES.txt +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/pylodstorage.egg-info/dependency_links.txt +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/pylodstorage.egg-info/entry_points.txt +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/pylodstorage.egg-info/requires.txt +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/pylodstorage.egg-info/top_level.txt +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/sampledata/__init__.py +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/sampledata/endpoints.yaml +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/sampledata/formats.yaml +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/sampledata/got.yaml +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/sampledata/queries.yaml +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/sampledata/scholia.yaml +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/sampledata/trulytabular.yaml +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/sampledata/wf.yaml +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/sampledata/wikidata.yaml +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/setup.cfg +0 -0
- {pylodstorage-0.4.0 → pylodstorage-0.4.2}/setup.py +0 -0
|
@@ -80,11 +80,12 @@ class WikidataProperty():
|
|
|
80
80
|
valuesClause+=f' "{propertyLabel}"@{lang}\n'
|
|
81
81
|
query=f"""# get the properties for the given labels
|
|
82
82
|
{WikidataItem.getPrefixes(["rdf","rdfs","wikibase"])}
|
|
83
|
-
SELECT ?property ?propertyLabel WHERE {{
|
|
83
|
+
SELECT ?property ?propertyLabel ?wbType WHERE {{
|
|
84
84
|
VALUES ?propertyLabel {{
|
|
85
85
|
{valuesClause}
|
|
86
86
|
}}
|
|
87
87
|
?property rdf:type wikibase:Property;rdfs:label ?propertyLabel.
|
|
88
|
+
?property wikibase:propertyType ?wbType.
|
|
88
89
|
FILTER(LANG(?propertyLabel) = "{lang}")
|
|
89
90
|
}}"""
|
|
90
91
|
cls.addPropertiesForQuery(wdProperties,sparql,query)
|
|
@@ -109,11 +110,12 @@ SELECT ?property ?propertyLabel WHERE {{
|
|
|
109
110
|
query=f"""
|
|
110
111
|
# get the property for the given property Ids
|
|
111
112
|
{WikidataItem.getPrefixes(["rdf","rdfs","wd","wikibase"])}
|
|
112
|
-
SELECT ?property ?propertyLabel WHERE {{
|
|
113
|
+
SELECT ?property ?propertyLabel ?wbType WHERE {{
|
|
113
114
|
VALUES ?property {{
|
|
114
115
|
{valuesClause}
|
|
115
116
|
}}
|
|
116
117
|
?property rdf:type wikibase:Property;rdfs:label ?propertyLabel.
|
|
118
|
+
?property wikibase:propertyType ?wbType.
|
|
117
119
|
FILTER(LANG(?propertyLabel) = "{lang}")
|
|
118
120
|
}}"""
|
|
119
121
|
cls.addPropertiesForQuery(wdProperties,sparql,query)
|
|
@@ -135,6 +137,7 @@ SELECT ?property ?propertyLabel WHERE {{
|
|
|
135
137
|
pid=re.sub(r"http://www.wikidata.org/entity/(.*)",r"\1",url)
|
|
136
138
|
prop=WikidataProperty(pid)
|
|
137
139
|
prop.plabel=record["propertyLabel"]
|
|
140
|
+
prop.wbtype=record["wbType"]
|
|
138
141
|
prop.url=url
|
|
139
142
|
wdProperties[prop.plabel]=prop
|
|
140
143
|
prop.varname=Variable.validVarName(prop.plabel)
|
|
@@ -456,6 +459,8 @@ SELECT ?{item.varname} ?{item.varname}Label"""
|
|
|
456
459
|
sparqlQuery+=f"\n ({aggregateFunc} ({distinct}?{wdProp.varname}{aggregateParam}) AS ?{wdProp.varname}_{aggregate})"
|
|
457
460
|
elif aggregate=="label":
|
|
458
461
|
sparqlQuery+=f"\n ?{wdProp.varname}Label"
|
|
462
|
+
elif aggregate=="ignore":
|
|
463
|
+
sparqlQuery+=f"\n ?{wdProp.varname}"
|
|
459
464
|
sparqlQuery+=f"""
|
|
460
465
|
WHERE {{
|
|
461
466
|
# instanceof {item.qid}:{item.qlabel}
|
|
@@ -522,7 +527,7 @@ WHERE {{
|
|
|
522
527
|
sparqlQuery=f"""# get the most frequently used properties for
|
|
523
528
|
# {itemText}
|
|
524
529
|
{WikidataItem.getPrefixes()}
|
|
525
|
-
SELECT ?prop ?propLabel ?count WHERE {{
|
|
530
|
+
SELECT ?prop ?propLabel ?wbType ?count WHERE {{
|
|
526
531
|
{{"""
|
|
527
532
|
if self.endpointConf.database=="qlever":
|
|
528
533
|
sparqlQuery+=f"""
|
|
@@ -549,6 +554,7 @@ SELECT ?prop ?propLabel ?count WHERE {{
|
|
|
549
554
|
}}"""
|
|
550
555
|
sparqlQuery+=f"""
|
|
551
556
|
?prop rdfs:label ?propLabel.
|
|
557
|
+
?prop wikibase:propertyType ?wbType.
|
|
552
558
|
FILTER(LANG(?propLabel) = "{self.lang}").{minCountFilter}
|
|
553
559
|
}}
|
|
554
560
|
ORDER BY DESC (?count)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|