You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{},
{"const": "freq"},
{
"oneOf": [
[...snipped irrelevant option...]
{
"type": "object",
"required": [
"reading",
"frequency"
],
"additionalProperties": false,
"properties": {
"reading": {
"type": "string",
"description": "Reading for the term."
},
"frequency": {
// start expansion of second option in "$ref": "#/definitions/frequency""type": "object",
"additionalProperties": false,
"required": [
"value"
],
"properties": {
"value": {
"type": "number"
},
"displayValue": {
"type": "string"
}
}
// end expansion of second option in "$ref": "#/definitions/frequency""description": "Frequency information for the term."
}
}
}
]
}
So far, I've been omitting the first oneOf option:
{
"$ref": "#/definitions/frequency",
"description": "Frequency information for the term."
},
so am I understanding correctly that the following scenarios are also possible?
Fourth scenario:
[
"<term>","freq", "<stylized frequency string>"
]
Coming from:
Fifth scenario:
[
"<term>","freq", <number>
]
Coming from
Sixth scenario:
[
"<term>","freq",{"value": <number>, "displayValue": "<stylized frequency string>"}
]
Seventh scenario:
[
"<term>","freq",{"value": <number>}
]
Both coming from:
with the fact that reading is mandatory but displayValue is optional.
I tried to follow the schema when extending the meta term bank support of Memento in ripose-jp/Memento#237 but I did not realize that the formats such as №6 were legal.
I realized this when coming across this entry from JPDB_v2.1_kana_2024-05-26 shared on TMW server:
It is already the second time that I am coming across yet another frequency tag format that requires adding upstream support so I'd rather make sure that I take everything into account this time instead of bumping against the same kind of issue again and again in the future as I use more dictionaries coming from various sources.
I'm trying to make sense of https://github.com/yomidevs/yomitan/tree/master/ext/data/schemas/dictionary-term-meta-bank-v3-schema.json in order to better support frequency tags in Memento. To clarify, I am not looking to create a Yomitan dictionary, I am looking to implement the Yomitan dictionary format in an application that should be able to read and parse any Yomitan dictionary thrown its way.
The JSON schema syntax is very hard to read so can you double-check if my reasoning is correct?
There are 3+ scenarios for the format of a frequency tag in a
term_meta_bank_###.json
file:Coming from:
Coming from:
Coming from:
So far, I've been omitting the first
oneOf
option:so am I understanding correctly that the following scenarios are also possible?
Coming from:
Coming from
Both coming from:
with the fact that reading is mandatory but displayValue is optional.
I tried to follow the schema when extending the meta term bank support of Memento in ripose-jp/Memento#237 but I did not realize that the formats such as №6 were legal.
I realized this when coming across this entry from
JPDB_v2.1_kana_2024-05-
26 shared on TMW server:Are there more formats that I am missing?
The text was updated successfully, but these errors were encountered: