Problem Encountered: However, upon clicking the "Start reconciling..." button, I'm presented with a window like show below without the data getting reconciled although in the preview window it lists the type that matches my need.
Note: I'm able to reconcile the data if I check "Reconcile against no particular type" option and there is no other duplicate item or if I check that option along with matching with other Columns.
hi, thanks for the detailed post. i'm having this same issue where reconciling doesn't match unless 'against no particular type' is selected. i was wondering if you had further details about the config changes that fixed this? if anyone else has tips on tweaking our config it would be greatly appreciated.
"""
This file defines a few constants which configure
which Wikibase instance and which property/item ids
should be used.
"""
# Endpoint of the MediaWiki API of the Wikibase instance
mediawiki_api_endpoint = 'https://site.wikibase.cloud/w/api.php'
# SPARQL endpoint
wikibase_sparql_endpoint = 'https://site.wikibase.cloud/query/sparql'
# Name of the Wikibase instance
wikibase_name = 'site'
# URL of the main page of the Wikibase instance
wikibase_main_page = 'https://site.wikibase.cloud/wiki/Main_Page'
# Wikibase namespace ID, used to search for items
# For Wikidata this is 0, but most by default Wikibase uses 120, which is the default Wikibase 'Item:' namespace
# CHANGE THIS TO 120 if you are adapting this configuration file to another Wikibase
wikibase_namespace_id = 120
# Namespace prefix of Wikibase items (including colon, e.g. 'Item:')
wikibase_namespace_prefix = 'Item:'
# User agent to connect to the Wikibase APIs
user_agent = 'OpenRefine-Wikibase reconciliation interface'
# Regexes and group ids to extracts Qids and Pids from URLs
import re
q_re = re.compile(r'(<?https?://site.wikibase.cloud/(entity/|wiki/Item:))?(Q[0-9]+)>?')
q_re_group_id = 3
p_re = re.compile(r'(<?https?://site.wikibase.cloud/(entity/|wiki/Property:))?(P[0-9]+)>?')
p_re_group_id = 3
# Identifier space and schema space exposed to OpenRefine.
# This should match the IRI prefixes used in RDF serialization.
# Note that you should be careful about using http or https there,
# because any variation will break comparisons at various places.
identifier_space = 'https://site.wikibase.cloud/entity/'
schema_space = 'https://site.wikibase.cloud/prop/direct/'
# Pattern used to form the URL of a Qid.
# This is only used for viewing so it is fine to use any protocol (therefore, preferably HTTPS if supported)
qid_url_pattern = 'https://site.wikibase.cloud/wiki/Item:{{id}}'
# By default, filter out any items which are instance
# of a subclass of this class.
# For Wikidata, this is "Wikimedia internal stuff".
# This filters out the disambiguation pages, categories, ...
# Set to None to disable this filter
avoid_items_of_class = None
# Service name exposed at various places,
# mainly in the list of reconciliation services of users
service_name = 'Reconcile for site.'
# URL (without the trailing slash) where this server runs
this_host = 'http://localhost:8000'
# The default limit on the number of results returned by us
default_num_results = 25
# The maximum number of search results to retrieve from the Wikidata search API
wd_api_max_search_results = 50 # need a bot account to get more
# The matching score above which we should automatically match an item
validation_threshold = 95
# Redis client used for caching at various places
redis_uri = 'redis://redis:6379/0?encoding=utf-8'
# Redis prefix to use in front of all keys
redis_key_prefix = 'openrefine_wikibase:'
# Headers for the HTTP requests made by the tool
headers = {
'User-Agent':service_name + ' (OpenRefine-Wikibase reconciliation service)',
}
# Previewing settings
# Dimensions of the preview
zoom_ratio = 1.0
preview_height = 100
preview_width = 400
# With which should be requested from Commons for the thumbnail
thumbnail_width = 130
# All properties to use to get an image. Set to empty list [] if no image properties are available.
image_properties = [
]
# URL pattern to retrieve an image from its filename
image_download_pattern = 'https://upload.wikimedia.org/wikipedia/commons/thumb/%s/%s/%s/%dpx-%s'
# Fallback URL of the image to use when previewing an item with no image
fallback_image_url = 'https://storage.googleapis.com/wikibase-cloud-static/sites/2dd311e13eb0aada8c98db084b90512b/logos/135.png?u=1695641842'
# Alt text of the fallback image
fallback_image_alt = 'Wikibase'
# Autodescribe endpoint to use.
# this is used to generate automatic descriptions from item contents.
# (disable this with: autodescribe_endpoint = None )
autodescribe_endpoint = None
# Property proposal settings
# Default type : entity (Q35120)
# Set to None if so such item exists.
default_type_entity = None
# Property path used to obtain the type of an item
type_property_path = 'P7'
# Property to follow to fetch properties for a given type.
# Set to None if this is not available
property_for_this_type_property = None
# Optional prefix in front of properties in SPARQL-like property paths
wdt_prefix = 'wdt:'
# Sparql query used to fetch all the subclasses of a given item.
# The '$qid' string will be replaced by the qid whose children should be fetched.
sparql_query_to_fetch_subclasses = """
PREFIX wd: <https://site.wikibase.cloud/entity/>
PREFIX wdt: <https://site.wikibase.cloud/prop/direct/>
SELECT ?child WHERE { ?child wdt:P7/wdt:P8* wd:$qid }
"""
# Sparql query used to fetch all the properties which store unique identifiers
sparql_query_to_fetch_unique_id_properties = """
SELECT ?pid WHERE { ?pid wikibase:propertyType wikibase:ExternalId }
"""
# Sparql query used to propose properties to fetch for items of a given class.
# Set to None if property proposal should be disabled.
sparql_query_to_propose_properties = """
SELECT ?prop ?propLabel ?depth WHERE {
SERVICE gas:service {
gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.BFS" .
gas:program gas:in wd:$base_type .
gas:program gas:out ?out .
gas:program gas:out1 ?depth .
gas:program gas:maxIterations 10 .
gas:program gas:maxVisited 100 .
gas:program gas:linkType wdt:P8 .
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "$lang" }
?out wdt:$property_for_this_type ?prop .
}
ORDER BY ?depth
LIMIT $limit
"""