Skip to content

Commit

Permalink
Extract string_object definition from candidate name (#138)
Browse files Browse the repository at this point in the history
And use for candidate `description`
  • Loading branch information
fsteeg committed Jul 10, 2024
1 parent 1e5ca4a commit 42bdcbc
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 25 deletions.
24 changes: 20 additions & 4 deletions draft/examples/reconciliation-result-batch/valid/example-full.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
"dir": "auto"
}
],
"description": "1969-| Diss. Fachbereich Mathematik",
"description": [
{
"str": "1969-| Diss. Fachbereich Mathematik"
}
],
"score": 53.015232,
"match": false,
"features": [
Expand Down Expand Up @@ -56,7 +60,11 @@
"dir": "auto"
}
],
"description": "Universität Wrocław, Niederlandestudien",
"description": [
{
"str": "Universität Wrocław, Niederlandestudien"
}
],
"score": 52.357353,
"match": false,
"type": [
Expand All @@ -83,7 +91,11 @@
"dir": "auto"
}
],
"description": "1948-| Mitglied des Deutschen Bundestages, SPD (1993)",
"description": [
{
"str": "1948-| Mitglied des Deutschen Bundestages, SPD (1993)"
}
],
"score": 86.43497,
"features": [
{
Expand Down Expand Up @@ -128,7 +140,11 @@
"dir": "auto"
}
],
"description": "Dissertation Potsdam, Universität, Mathematik-Naturwissenschaftliche Fakultät, 2017",
"description": [
{
"str": "Dissertation Potsdam, Universität, Mathematik-Naturwissenschaftliche Fakultät, 2017"
}
],
"score": 62.04763,
"match": false,
"type": [
Expand Down
17 changes: 14 additions & 3 deletions draft/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +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>
<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 @@ -567,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>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>
<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 @@ -580,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
44 changes: 26 additions & 18 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 @@ -26,27 +46,15 @@
"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
"$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

0 comments on commit 42bdcbc

Please sign in to comment.