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

fix: Changed JSON according to spec #19

Merged
merged 10 commits into from
Jul 20, 2022
26 changes: 21 additions & 5 deletions backend/sample/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,31 @@
]
},
{
"id" : "stopwords:IDX",
"value" : {"type" : "string"},
"id" : {
"type" : "string",
"description" : "stopwords:IDX"
},
"value" : {
"lang" : "LC",
"tag" : ["Tag1", "Tag2", "Tag3"],
"tagsid" : ["tag1", "tag2", "tag3"]
},
"block_index" : {"type" : "integer"},
"block_subindex" : {"type" : "integer"},
"preceding_lines" : [
{"type" : "string"}
]
},
{
"id" : "synonyms:IDX",
"value" : {"type" : "string"},
"id" : {
"type" : "string",
"description" : "synonyms:IDX"
},
"value" : {
"lang" : "LC",
"tag" : ["Tag1", "Tag2", "Tag3"],
"tagsid" : ["tag1", "tag2", "tag3"]
},
"block_index" : {"type" : "integer"},
"block_subindex" : {"type" : "integer"},
"preceding_lines" : [
Expand All @@ -27,9 +41,11 @@
{
aadarsh-ram marked this conversation as resolved.
Show resolved Hide resolved
"id" : "canonical_tagid",
"tags" : {
"LC" : ["Tag1", "Tag2", "Tag3"]
},
"tagsid" : {
"LC" : ["tag1", "tag2", "tag3"]
},
"tagsid" : ["LC:tag1, tag2, tag3"],
"parents" : ["LC:parent_tag"],
"properties" : [
{
Expand Down
55 changes: 43 additions & 12 deletions backend/sample/test.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,47 @@
},
{
"id" : "stopwords:0",
"value" : "fr:aux,au,de,le,du,la,a,et",
"value" : {
"lang" : "fr",
"tag" : ["aux","au","de","le","du","la","a","et"],
"tagsid" : ["aux","au","de","le","du","la","a","et"]
},
"block_index" : 0,
"block_subindex" : 0,
"preceding_lines" : []
},
{
"id" : "synonyms:0",
"value" : "en:passion fruit, passionfruit",
"value" : {
"lang" : "en",
"tag" : ["passion fruit", "passionfruit"],
"tagsid" : ["passion fruit", "passionfruit"]
},
"block_index" : 1,
"block_subindex" : 0,
"preceding_lines" : []
},
{
"id" : "synonyms:1",
"value" : "fr:fruit de la passion, maracuja, passion",
"value" : {
"lang" : "fr",
"tag" : ["fruit de la passion", "maracuja", "passion"],
"tagsid" : ["fruit de la passion", "maracuja", "passion"]
},
"block_index" : 2,
"block_subindex" : 0,
"preceding_lines" : []
},
{
"id" : "en:yogurts, yoghurts",
"id" : "en:yogurts",
"tags" : {
"en" : ["yogurts", "yoghurts"],
"fr" : ["yaourts", "yoghourts", "yogourts"]
},
"tagsid" : ["en:yogurts, yoghurts", "fr:yaourts, yoghourts, yogourts"],
"tagsid" : {
"en" : ["yogurts", "yoghurts"],
"fr" : ["yaourts", "yoghourts", "yogourts"]
},
"parents" : [],
"properties" : [],
"block_index" : 3,
Expand All @@ -46,7 +61,10 @@
"en" : ["banana yogurts"],
"fr" : ["yaourts à la banane"]
},
"tagsid" : ["en:banana yogurts", "fr:yaourts à la banane"],
"tagsid" : {
"en" : ["banana yogurts"],
"fr" : ["yaourts-a-la-banane"]
},
"parents" : ["en:yogurts"],
"properties" : [],
"block_index" : 4,
Expand All @@ -59,7 +77,10 @@
"en" : ["Passion fruit yogurts"],
"fr" : ["yaourts au fruit de la passion"]
},
"tagsid" : ["en:Passion fruit yogurts", "fr:yaourts au fruit de la passion"],
"tagsid" : {
"en" : ["Passion fruit yogurts"],
"fr" : ["yaourts au fruit de la passion"]
},
aadarsh-ram marked this conversation as resolved.
Show resolved Hide resolved
"parents" : ["en:yogurts"],
"properties" : [],
"block_index" : 5,
Expand All @@ -71,7 +92,9 @@
"tags" : {
"fr" : ["yaourts au fruit de la passion allégés"]
},
"tagsid" : ["fr:yaourts au fruit de la passion allégés"],
"tagsid" : {
"fr" : ["yaourts-au-fruit-de-la-passion-alleges"]
},
"parents" : ["fr:yaourts fruit de la passion"],
"properties" : [],
"block_index" : 6,
Expand All @@ -83,7 +106,9 @@
"tags" : {
"en" : ["meat"]
},
"tagsid" : ["en:meat"],
"tagsid" : {
"en" : ["meat"]
},
"parents" : [],
"properties" : [
{
Expand All @@ -106,7 +131,9 @@
"tags" : {
"en" : ["fake-meat"]
},
"tagsid" : ["en:fake-meat"],
"tagsid" : {
"en" : ["fake-meat"]
},
"parents" : ["en:meat"],
"properties" : [
{
Expand All @@ -124,7 +151,9 @@
"tags" : {
"en" : "fake-stuff"
},
"tagsid" : ["en:fake-stuff"],
"tagsid" : {
"en" : "fake-stuff"
},
"parents" : [],
"properties" : [],
"block_index" : 9,
Expand All @@ -136,7 +165,9 @@
"tags" : {
"en" : "fake-duck-meat"
},
"tagsid" : ["en:fake-duck-meat"],
"tagsid" : {
"en" : "fake-duck-meat"
},
"parents" : ["en:fake-stuff", "en:fake-meat"],
"properties" : [],
"block_index" : 10,
Expand Down