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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 39 additions & 25 deletions backend/sample/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,49 @@
{
"id" : "__header__",
"value" : [
{
"id" : "stopwords:IDX",
"value" : {"type" : "string"},
"block_index" : {"type" : "integer"},
"block_subindex" : {"type" : "integer"},
"preceding_lines" : {"type" : "integer"}
},
{
"id" : "synonyms:IDX",
"value" : {"type" : "string"},
"block_index" : {"type" : "integer"},
"block_subindex" : {"type" : "integer"},
"preceding_lines" : {"type" : "integer"}
}
{"type" : "string"}
]
},
{
"id" : "__comments__",
"value" : [
{
"id" : "comment",
"value" : {"type" : "string"},
"block_index" : {"type" : "integer"},
"block_subindex" : {"type" : "integer"},
"preceding_lines" : {"type" : "integer"}
}
"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" : {
"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" : [
{"type" : "string"}
]
},
{
aadarsh-ram marked this conversation as resolved.
Show resolved Hide resolved
"id" : "canonical_tagid",
"tags" : ["LC:tag1, tag2, tag3"],
"tags" : {
"LC" : ["Tag1", "Tag2", "Tag3"]
},
"tagsid" : {
"LC" : ["tag1", "tag2", "tag3"]
},
"parents" : ["LC:parent_tag"],
"properties" : [
{
Expand All @@ -44,7 +56,9 @@
],
"block_index" : {"type" : "integer"},
"block_subindex" : {"type" : "integer"},
"preceding_lines" : {"type" : "integer"}
"preceding_lines" : [
{"type" : "string"}
]
}
]
}
166 changes: 103 additions & 63 deletions backend/sample/test.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,87 +3,112 @@
{
"id" : "__header__",
"value" : [
{
"id" : "stopwords:0",
"value" : "fr: aux,au,de,le,du,la,a,et",
"block_index" : 1,
"block_subindex" : 0,
"preceding_lines" : 1
},
{
"id" : "synonyms:0",
"value" : "en:passion fruit, passionfruit",
"block_index" : 2,
"block_subindex" : 0,
"preceding_lines" : 1
},
{
"id" : "synonyms:1",
"value" : "fr:fruit de la passion, fruits de la passion, maracuja, passion",
"block_index" : 3,
"block_subindex" : 0,
"preceding_lines" : 1
}
"test taxonomy"
]
},
{
"id" : "__comments__",
"value" : [
{
"id" : "comment",
"value" : "test taxonomy",
"block_index" : 0,
"block_subindex" : 0,
"preceding_lines" : 0
},
{
"id" : "comment",
"value" : "meat",
"block_index" : 8,
"block_subindex" : 0,
"preceding_lines" : 1
}
]
"id" : "stopwords:0",
"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" : {
"lang" : "en",
"tag" : ["passion fruit", "passionfruit"],
"tagsid" : ["passion-fruit", "passionfruit"]
},
"block_index" : 1,
"block_subindex" : 0,
"preceding_lines" : []
},
{
"id" : "en:yogurts, yoghurts",
"tags" : ["en:yogurts, yoghurts", "fr:yaourts, yoghourts, yogourts"],
"id" : "synonyms:1",
"value" : {
"lang" : "fr",
"tag" : ["fruit de la passion", "maracuja", "passion"],
"tagsid" : ["fruit-passion", "maracuja", "passion"]
},
"block_index" : 2,
"block_subindex" : 0,
"preceding_lines" : []
},
{
"id" : "en:yogurts",
"tags" : {
"en" : ["yogurts", "yoghurts"],
"fr" : ["yaourts", "yoghourts", "yogourts"]
},
"tagsid" : {
"en" : ["yogurts", "yoghurts"],
"fr" : ["yaourts", "yoghourts", "yogourts"]
},
"parents" : [],
"properties" : [],
"block_index" : 4,
"block_index" : 3,
"block_subindex" : 0,
"preceding_lines" : 1
"preceding_lines" : []
},
{
"id" : "en:banana yogurts",
"tags" : ["en:banana yogurts", "fr:yaourts à la banane"],
"tags" : {
"en" : ["banana yogurts"],
"fr" : ["yaourts à la banane"]
},
"tagsid" : {
"en" : ["banana yogurts"],
"fr" : ["yaourts-banane"]
},
"parents" : ["en:yogurts"],
"properties" : [],
"block_index" : 5,
"block_index" : 4,
"block_subindex" : 0,
"preceding_lines" : 1
"preceding_lines" : []
},
{
"id" : "en:Passion fruit yogurts",
"tags" : ["en:Passion fruit yogurts", "fr:yaourts au fruit de la passion"],
"tags" : {
"en" : ["Passion fruit yogurts"],
"fr" : ["yaourts au fruit de la passion"]
},
"tagsid" : {
"en" : ["passion-fruit-yogurts"],
"fr" : ["yaourts-fruit-passion"]
},
"parents" : ["en:yogurts"],
"properties" : [],
"block_index" : 6,
"block_index" : 5,
"block_subindex" : 0,
"preceding_lines" : 1
"preceding_lines" : []
},
{
"id" : "fr:yaourts au fruit de la passion allégés",
"tags" : ["fr:yaourts au fruit de la passion allégés"],
"tags" : {
"fr" : ["yaourts au fruit de la passion allégés"]
},
"tagsid" : {
"fr" : ["yaourts-fruit-passion-alleges"]
},
"parents" : ["fr:yaourts fruit de la passion"],
"properties" : [],
"block_index" : 7,
"block_index" : 6,
"block_subindex" : 0,
"preceding_lines" : 1
"preceding_lines" : []
},
{
"id" : "en:meat",
"tags" : ["en:meat"],
"tags" : {
"en" : ["meat"]
},
"tagsid" : {
"en" : ["meat"]
},
"parents" : [],
"properties" : [
{
Expand All @@ -97,13 +122,18 @@
"value" : "fr:10"
}
],
"block_index" : 9,
"block_index" : 7,
"block_subindex" : 0,
"preceding_lines" : 2
"preceding_lines" : ["meat"]
},
{
"id" : "en:fake-meat",
"tags" : ["en:fake-meat"],
"tags" : {
"en" : ["fake-meat"]
},
"tagsid" : {
"en" : ["fake-meat"]
},
"parents" : ["en:meat"],
"properties" : [
{
Expand All @@ -112,27 +142,37 @@
"value" : "en:yes"
}
],
"block_index" : 10,
"block_index" : 8,
"block_subindex" : 0,
"preceding_lines" : 2
"preceding_lines" : []
},
{
"id" : "en:fake-stuff",
"tags" : ["en:fake-stuff"],
"tags" : {
"en" : "fake-stuff"
},
"tagsid" : {
"en" : "fake-stuff"
},
"parents" : [],
"properties" : [],
"block_index" : 11,
"block_index" : 9,
"block_subindex" : 0,
"preceding_lines" : 2
"preceding_lines" : []
},
{
"id" : "en:fake-duck-meat",
"tags" : ["en:fake-duck-meat"],
"tags" : {
"en" : "fake-duck-meat"
},
"tagsid" : {
"en" : "fake-duck-meat"
},
"parents" : ["en:fake-stuff", "en:fake-meat"],
"properties" : [],
"block_index" : 12,
"block_index" : 10,
"block_subindex" : 0,
"preceding_lines" : 2
"preceding_lines" : []
}
]
}
aadarsh-ram marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion backend/sample/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ stopwords:fr: aux,au,de,le,du,la,a,et

synonyms:en:passion fruit, passionfruit

synonyms:fr:fruit de la passion, fruits de la passion, maracuja, passion
synonyms:fr:fruit de la passion, maracuja, passion

en:yogurts, yoghurts
fr:yaourts, yoghourts, yogourts
Expand Down
Empty file removed doc/how-to-guides/.emtpy
Empty file.