Skip to content

Commit

Permalink
Change AAJson format from array to object (#628)
Browse files Browse the repository at this point in the history
  • Loading branch information
kharus authored Oct 16, 2024
1 parent cd82919 commit ddb3ab1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions lib/haskell/natural4/src/LS/XPile/AaJson.hs
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@ translate2AaJson nlgEnvs l4i = do
case hornByLang of
Left err -> xpError err
Right haveHorn -> xpReturn [__i|
{ "#{nlgEnvStrLower}" : #{encodePretty $ toAaJson <$> (DL.nub haveHorn)} }
"#{nlgEnvStrLower}" : #{encodePretty $ toAaJson <$> (DL.nub haveHorn)}
|]

let qaHornsStrings = rights qaHornsAllLangs
xpReturn [__i|
[
{
#{DL.intercalate ",\n" qaHornsStrings}
]
}
|]

qaHornsByLang :: [Rule] -> NLGEnv -> Interpreted -> XPileLogE [(String, BoolStructLT)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[
{ "nl4chi" : [
{
"nl4chi" : [
{
"Person": {
"All": {
Expand Down Expand Up @@ -29,8 +29,8 @@
}
}
}
] },
{ "nl4eng" : [
],
"nl4eng" : [
{
"Person": {
"All": {
Expand Down Expand Up @@ -60,8 +60,8 @@
}
}
}
] },
{ "nl4may" : [
],
"nl4may" : [
{
"Person": {
"All": {
Expand Down Expand Up @@ -91,5 +91,5 @@
}
}
}
] }
]
]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[
{ "nl4chi" : [
{
"nl4chi" : [
{
"Covered If …": {
"Not": {
Expand Down Expand Up @@ -206,8 +206,8 @@
}
}
}
] },
{ "nl4eng" : [
],
"nl4eng" : [
{
"Covered If …": {
"Not": {
Expand Down Expand Up @@ -414,8 +414,8 @@
}
}
}
] },
{ "nl4may" : [
],
"nl4may" : [
{
"Covered If …": {
"Not": {
Expand Down Expand Up @@ -622,5 +622,5 @@
}
}
}
] }
]
]
}

0 comments on commit ddb3ab1

Please sign in to comment.