pyLodStorage 0.3.11__tar.gz → 0.3.13__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.3.11/pylodstorage.egg-info → pylodstorage-0.3.13}/PKG-INFO +1 -1
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/lodstorage/trulytabular.py +7 -3
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/lodstorage/version.py +1 -1
- {pylodstorage-0.3.11 → pylodstorage-0.3.13/pylodstorage.egg-info}/PKG-INFO +1 -1
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/LICENSE +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/README.md +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/lodstorage/__init__.py +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/lodstorage/csv.py +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/lodstorage/entity.py +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/lodstorage/jsonable.py +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/lodstorage/jsonpicklemixin.py +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/lodstorage/lod.py +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/lodstorage/mwTable.py +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/lodstorage/plot.py +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/lodstorage/query.py +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/lodstorage/querymain.py +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/lodstorage/sample.py +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/lodstorage/schema.py +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/lodstorage/sparql.py +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/lodstorage/sql.py +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/lodstorage/storageconfig.py +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/lodstorage/tabulateCounter.py +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/lodstorage/uml.py +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/lodstorage/xml.py +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/lodstorage/yamlablemixin.py +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/pylodstorage.egg-info/SOURCES.txt +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/pylodstorage.egg-info/dependency_links.txt +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/pylodstorage.egg-info/entry_points.txt +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/pylodstorage.egg-info/requires.txt +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/pylodstorage.egg-info/top_level.txt +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/sampledata/__init__.py +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/sampledata/endpoints.yaml +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/sampledata/formats.yaml +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/sampledata/got.yaml +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/sampledata/queries.yaml +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/sampledata/scholia.yaml +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/sampledata/trulytabular.yaml +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/sampledata/wf.yaml +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/sampledata/wikidata.yaml +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/setup.cfg +0 -0
- {pylodstorage-0.3.11 → pylodstorage-0.3.13}/setup.py +0 -0
|
@@ -503,7 +503,7 @@ WHERE {{
|
|
|
503
503
|
sparqlQuery+=f"\n)"
|
|
504
504
|
return sparqlQuery
|
|
505
505
|
|
|
506
|
-
def mostFrequentPropertiesQuery(self,whereClause:str=None):
|
|
506
|
+
def mostFrequentPropertiesQuery(self,whereClause:str=None,minCount:int=0):
|
|
507
507
|
'''
|
|
508
508
|
get the most frequently used properties
|
|
509
509
|
|
|
@@ -515,6 +515,9 @@ WHERE {{
|
|
|
515
515
|
if self.endpointConf.database!="qlever":
|
|
516
516
|
whereClause+=";?p ?id"
|
|
517
517
|
whereClause+="."
|
|
518
|
+
minCountFilter=""
|
|
519
|
+
if minCount>0:
|
|
520
|
+
minCountFilter=f"\n FILTER(?count >{minCount})."
|
|
518
521
|
itemText=self.getItemText()
|
|
519
522
|
sparqlQuery=f"""# get the most frequently used properties for
|
|
520
523
|
# {itemText}
|
|
@@ -546,7 +549,7 @@ SELECT ?prop ?propLabel ?count WHERE {{
|
|
|
546
549
|
}}"""
|
|
547
550
|
sparqlQuery+=f"""
|
|
548
551
|
?prop rdfs:label ?propLabel.
|
|
549
|
-
FILTER(LANG(?propLabel) = "{self.lang}")
|
|
552
|
+
FILTER(LANG(?propLabel) = "{self.lang}").{minCountFilter}
|
|
550
553
|
}}
|
|
551
554
|
ORDER BY DESC (?count)
|
|
552
555
|
"""
|
|
@@ -590,7 +593,8 @@ ORDER BY DESC (?frequency)"""
|
|
|
590
593
|
sparql=f"""{sparql}
|
|
591
594
|
HAVING (COUNT (?value) > 1)
|
|
592
595
|
ORDER BY DESC(?count)"""
|
|
593
|
-
|
|
596
|
+
itemText=self.getItemText()
|
|
597
|
+
sparql=f"""# Count all {itemText} items
|
|
594
598
|
# with the given {propertyLabel}({propertyId}) https://www.wikidata.org/wiki/Property:{propertyId}
|
|
595
599
|
{WikidataItem.getPrefixes()}
|
|
596
600
|
"""+sparql
|
|
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
|