Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change candidate name and description from string to array of objects with required str, optional lang and dir fields #176

Closed
wants to merge 7 commits into from
8 changes: 6 additions & 2 deletions draft/examples/reconciliation-candidate/valid/example.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"id": "1117582299",
"name": "Urbaniak, Hans-Eberhard",
"name": [
{
"str": "Urbaniak, Hans-Eberhard"
}
],
"score": 85.71888,
"features": [
{
Expand Down Expand Up @@ -41,4 +45,4 @@
]
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
{
"candidates": [
{
"name": "Urbaniak, Regina",
"name": [
{
"str": "Urbaniak, Regina"
}
],
"score": 53.015232,
"match": false,
"type": [
Expand All @@ -20,4 +24,4 @@
]
}
]
}
}
14 changes: 11 additions & 3 deletions draft/examples/reconciliation-result-batch/invalid/root-array.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
[
{
"id": "120333937",
"name": "Urbaniak, Regina",
"name": [
{
"str": "Urbaniak, Regina"
}
],
"score": 53.015232,
"match": false,
"type": [
Expand All @@ -19,7 +23,11 @@
},
{
"id": "1127147390",
"name": "Urbaniak, Jan",
"name": [
{
"str": "Urbaniak, Jan"
}
],
"score": 52.357353,
"match": false,
"type": [
Expand All @@ -35,4 +43,4 @@
}
]
]
}
}
58 changes: 49 additions & 9 deletions draft/examples/reconciliation-result-batch/valid/example-full.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,18 @@
"candidates": [
{
"id": "120333937",
"name": "Urbaniak, Regina",
"description": "1969-| Diss. Fachbereich Mathematik",
"name": [
{
"str": "Urbaniak, Regina",
"lang": "de",
"dir": "auto"
}
],
"description": [
{
"str": "1969-| Diss. Fachbereich Mathematik"
}
],
"score": 53.015232,
"match": false,
"features": [
Expand Down Expand Up @@ -43,8 +53,18 @@
},
{
"id": "1127147390",
"name": "Urbaniak, Jan",
"description": "Universität Wrocław, Niederlandestudien",
"name": [
{
"str": "Urbaniak, Jan",
"lang": "de",
"dir": "auto"
}
],
"description": [
{
"str": "Universität Wrocław, Niederlandestudien"
}
],
"score": 52.357353,
"match": false,
"type": [
Expand All @@ -64,8 +84,18 @@
"candidates": [
{
"id": "123064325",
"name": "Schwanhold, Ernst",
"description": "1948-| Mitglied des Deutschen Bundestages, SPD (1993)",
"name": [
{
"str": "Schwanhold, Ernst",
"lang": "de",
"dir": "auto"
}
],
"description": [
{
"str": "1948-| Mitglied des Deutschen Bundestages, SPD (1993)"
}
],
"score": 86.43497,
"features": [
{
Expand Down Expand Up @@ -103,8 +133,18 @@
},
{
"id": "116362988X",
"name": "Schwanhold, Nadine",
"description": "Dissertation Potsdam, Universität, Mathematik-Naturwissenschaftliche Fakultät, 2017",
"name": [
{
"str": "Schwanhold, Nadine",
"lang": "de",
"dir": "auto"
}
],
"description": [
{
"str": "Dissertation Potsdam, Universität, Mathematik-Naturwissenschaftliche Fakultät, 2017"
}
],
"score": 62.04763,
"match": false,
"type": [
Expand All @@ -121,4 +161,4 @@
]
}
]
}
}
26 changes: 21 additions & 5 deletions draft/examples/reconciliation-result-batch/valid/minimal.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,41 @@
"candidates": [
{
"id": "120333937",
"name": "Urbaniak, Regina"
"name": [
{
"str": "Urbaniak, Regina"
}
]
},
{
"id": "1127147390",
"name": "Urbaniak, Jan"
"name": [
{
"str": "Urbaniak, Jan"
}
]
}
]
},
{
"candidates": [
{
"id": "123064325",
"name": "Schwanhold, Ernst"
"name": [
{
"str": "Schwanhold, Ernst"
}
]
},
{
"id": "116362988X",
"name": "Schwanhold, Nadine"
"name": [
{
"str": "Schwanhold, Nadine"
}
]
}
]
}
]
}
}
16 changes: 14 additions & 2 deletions draft/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ <h4>This Draft</h4>
<li><a href="https://github.com/reconciliation-api/specs/pull/149">Move the <code>query</code> field of reconciliation queries inside <code>properties</code> to allow for queries which do not provide entity names</a></li>
<li><a href="https://github.com/reconciliation-api/specs/pull/156">Add optional <code>standardizedScore</code> field to the manifest</a></li>
<li><a href="https://github.com/reconciliation-api/specs/pull/166">Unify naming to camelCase convention</a></li>
<li><a href="https://github.com/reconciliation-api/specs/pull/176">Change candidate <code>name</code> and <code>description</code> from string to array of objects with required <code>str</code>, optional <code>lang</code> and <code>dir</code> fields</a></li>
</ul>
</section>
</section>
Expand Down Expand Up @@ -566,9 +567,9 @@ <h3>Reconciliation Query Responses</h3>
<dt><code>id</code></dt>
<dd>The identifier of the candidate entity;</dd>
<dt><code>name</code></dt>
<dd>The name of the candidate entity;</dd>
<dd>An array of <a>string objects</a> with names for the candidate entity;</dd>
<dt><code>description</code></dt>
<dd>The entity description MAY optionally be included;</dd>
<dd>An optional array of <a>string objects</a> with descriptions for the candidate entity;</dd>
<dt><code>type</code></dt>
<dd>The types of the candidate entity;</dd>
<dt><code>score</code></dt>
Expand All @@ -579,6 +580,17 @@ <h3>Reconciliation Query Responses</h3>
<dd>A boolean matching decision, which indicates whether the service considers this candidate good enough to be chosen as a correct match.</dd>
</dl>
</p>
<p>
A <dfn>string object</dfn> contains the following fields:
<dl>
<dt><code>str</code></dt>
<dd>The string value;</dd>
<dt><code>lang</code></dt>
<dd>Optionally, the <a href="#text-processing-language">text-processing language</a> of the string;</dd>
<dt><code>dir</code></dt>
<dd>Optionally, the <a href="#text-direction">text direction</a> of the string.</dd>
</dl>
</p>
<p>
A <dfn>matching feature</dfn> is a numerical or boolean value which can be used to determine how likely it is for the candidate to be the correct entity. It contains the following fields:
<dl>
Expand Down
34 changes: 30 additions & 4 deletions draft/schemas/reconciliation-result-batch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,26 @@
"$id": "https://reconciliation-api.github.io/specs/draft/schemas/reconciliation-result-batch.json",
"type": "object",
"description": "This schema can be used to validate the JSON serialization of any reconciliation result batch.",
"definitions": {
"string_object": {
"type": "object",
"properties": {
"str": {
"type": "string"
},
"lang": {
"type": "string"
},
"dir": {
"type": "string"
}
},
"required": [
"str"
],
"additionalProperties": false
}
},
"required": [
"results"
],
Expand All @@ -23,12 +43,18 @@
"description": "Entity identifier of the candidate"
},
"name": {
"type": "string",
"description": "Entity name of the candidate"
"type": "array",
"description": "Names for the candidate entity",
"items": {
"$ref": "#/definitions/string_object"
}
},
"description": {
"type": "string",
"description": "Optional description of the candidate entity"
"type": "array",
"description": "Optional descriptions of the candidate entity",
"items": {
"$ref": "#/definitions/string_object"
}
},
"score": {
"type": "number",
Expand Down
Loading