Data
Line | Status | Search query | Result | Disambiguation | |
---|---|---|---|---|---|
No data |
Failed
Help
Resolver is a tool for automatically resolving Wikidata entity ids from a given list of search queries.
Syntax
The syntax of Rsolver is based on QuickStatements v1's one and, if resolving succeeds, will be processed back to valid QuickStatements v1 statements.
A simple query which consists of only one command line could for example look like this:
Wikidata|P31=Q14827288operator|P1629=Q29933786|type=PWikimedia Foundation|^enwiki|type=Q$P275$Q6938433
Wikidata |
| |
P31 |
= |
Q14827288 |
|
operator |
| |
P1629 |
= |
Q29933786 |
| |
type |
= |
P |
|
Wikimedia Foundation |
| |
^ |
enwiki |
| |
type |
= |
Q |
|
$P275 |
|
$Q6938433 |
search query | property | value | search query | property | value | type | search query | wiki code | type | literal | literal | ||||||||||||||||
basic condition | basic condition | properties | wiki article name condition | properties | |||||||||||||||||||||||
resolve tuple | resolve tuple | resolve tuple | |||||||||||||||||||||||||
command line |
By the way: There's a grammar for those interested.
Command lines
Each command line consists of at least one resolve tuple or literal. Multiple resolve tuples or literals per command line are seperated by a single tab each.
All resolve tuples in a command line must have been a successfully resolved in order for the whole command line to be considered resolved. Otherwise the command line will be considered as failed and is output in a separate textbox.
Resolve tuple
A resolve tuple is what actually contains your search query to resolve. It consists of at least one and up to three parts which are seperated by pipes (|
):
- The first part of a tuple is your search query.
- Optional: The second part is a list of conditions for the expected Wikidata entity. Multiple conditions are separated by semicolons (
;
). - Optional: The third part of a tuple is list of properties, which basically are key-value-pairs. These can be used to finetune some settings for resolving. Multiple properties are separated by semicolons (
;
).
Example: Wikidata|P31=Q14827288|type=Q
, Wikidata|P31=Q14827288
, Wikidata||type=Q
, Wikidata
Literals
A literal is a string which will not be processed but output. These might come in handy for generating QuickStatements. A literal starts with a dollar sign ($
) and is followed by the text.
Example: $Wikidata
, $P31
Conditions
Conditions define which items to automatically ignore. A condition consists of a property and a value seperated by a command-character specific to each condition type. Multiple conditions which all have to be fullfilled (AND) can be specified by seperating them with semicolons (;
).
Basic conditions =
A basic condition consists of a property and a value seperated by an "equals to"-character (=
). A candidate is required to have the property and value for the property as defined in the condition. This condition does not check for transitive properties meaning a candidate must explicitly have the given statement.
Example: Wikidata|P275=Q6938433
, Wikidata|P275=Q6938433;P31=Q35127
Basic conditions - Transitive *=
A basic condition can be extended to check for transitive properties by appending an "asterisk"-character (*
) to the property.
Example: Treptow-Köpenick|P131*=Q183
Wiki article name ^
This condition can be used to extract the associated Wikidata id from a given wiki article. A list of all wiki abbreviations can be found here next to "Sites". Please note that currently this condition cannot be combined with other conditions!
Example: Platooning|^enwiki
SPARQL conditions ~
A SPARQL condition consists of a property and a value seperated by a "tilde"-character (~
). They are the most versatile type of conditions and will be set together to ?item <property> <value> .
. Please note that SPARQL prefixes like "wdt" and "wd" are required.
Example: Filter organs - Heart|wdt:P31/wdt:P279*~wd:Q712378
Useful combinations:
wdt:P31/wdt:P279*~
, instance of/subclass of*
Properties
Property | Description | Default value |
---|---|---|
note |
A note which is displayed in the data table. | unset |
type |
The type of entity you want to resolve. For example item , lexeme or property . |
item |
URL parameters
Rsolver accepts some url parameters (as part of the so called query string) to quickly apply settings.
Parameter | Description | Default value |
---|---|---|
settings |
A JSON-encoded object of properties. A URL containing this parameter is generated when clicking on Get URL in the settings dialog window. | unset |
Interfacing
Using postMessage
s other applications can easily interface with Rsolver.
Output piping
By registering an output pipe other applications can request Rsolver to forward generated outputs.
- Send
{'type': 'outputPipeEnable'}
viapostMessage
- Rsolver will reply with
{'type': 'resolver.outputPipeRegistered'}
- Now, every time output is generated Rsolver will send a
postMessage
with{'type': 'rsolver.outputPipe', 'data': {'success': '⟨QuickStatements separated by newlines⟩', 'failed': '⟨QuickStatements separated by newlines⟩'}}