Skip to content

Commit

Permalink
Change candidate name from string to array of objects (#138)
Browse files Browse the repository at this point in the history
With required `str`, optional `lang` and `dir` fields
  • Loading branch information
fsteeg committed Jul 10, 2024
1 parent ea08452 commit 1e5ca4a
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 20 deletions.
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 @@
}
]
]
}
}
34 changes: 29 additions & 5 deletions draft/examples/reconciliation-result-batch/valid/example-full.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
"candidates": [
{
"id": "120333937",
"name": "Urbaniak, Regina",
"name": [
{
"str": "Urbaniak, Regina",
"lang": "de",
"dir": "auto"
}
],
"description": "1969-| Diss. Fachbereich Mathematik",
"score": 53.015232,
"match": false,
Expand Down Expand Up @@ -43,7 +49,13 @@
},
{
"id": "1127147390",
"name": "Urbaniak, Jan",
"name": [
{
"str": "Urbaniak, Jan",
"lang": "de",
"dir": "auto"
}
],
"description": "Universität Wrocław, Niederlandestudien",
"score": 52.357353,
"match": false,
Expand All @@ -64,7 +76,13 @@
"candidates": [
{
"id": "123064325",
"name": "Schwanhold, Ernst",
"name": [
{
"str": "Schwanhold, Ernst",
"lang": "de",
"dir": "auto"
}
],
"description": "1948-| Mitglied des Deutschen Bundestages, SPD (1993)",
"score": 86.43497,
"features": [
Expand Down Expand Up @@ -103,7 +121,13 @@
},
{
"id": "116362988X",
"name": "Schwanhold, Nadine",
"name": [
{
"str": "Schwanhold, Nadine",
"lang": "de",
"dir": "auto"
}
],
"description": "Dissertation Potsdam, Universität, Mathematik-Naturwissenschaftliche Fakultät, 2017",
"score": 62.04763,
"match": false,
Expand All @@ -121,4 +145,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"
}
]
}
]
}
]
}
}
3 changes: 2 additions & 1 deletion 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> 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,7 +567,7 @@ <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 objects representing names for the candidate entity. Each object MUST contain a string value in its <code>str</code> field, and MAY contain additional <a href="#text-processing-language">lang</a> and <a href="#text-direction">dir</a> fields;</dd>
<dt><code>description</code></dt>
<dd>The entity description MAY optionally be included;</dd>
<dt><code>type</code></dt>
Expand Down
22 changes: 20 additions & 2 deletions draft/schemas/reconciliation-result-batch.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,26 @@
"description": "Entity identifier of the candidate"
},
"name": {
"type": "string",
"description": "Entity name of the candidate"
"type": "array",
"description": "Names for the candidate entity",
"items": {
"type": "object",
"properties": {
"str": {
"type": "string"
},
"lang": {
"type": "string"
},
"dir": {
"type": "string"
}
},
"required": [
"str"
],
"additionalProperties": false
}
},
"description": {
"type": "string",
Expand Down

0 comments on commit 1e5ca4a

Please sign in to comment.