Skip to content

Commit

Permalink
Fix missed case in quadfix... and re-run
Browse files Browse the repository at this point in the history
Checked with MQL query successfully:

[{
  "<type>": "</film/film>",
  "<name>": null,
  "</film/film/directed_by>": {
    "<name>": "\"David Fincher\""
  },
  "</film/film/starring>": [{
    "</film/performance/actor>": {
      "<name>": null
    }
  }]
}]
  • Loading branch information
kortschak committed Jul 25, 2014
1 parent bf185b7 commit 9ff9760
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Binary file modified 30kmoviedata.nq.gz
Binary file not shown.
8 changes: 6 additions & 2 deletions nquads/quadfix.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,12 @@ func main() {
} else {
t.Subject = "_" + t.Subject
}
if t.Object[0] == ':' && t.Object[1] == '/' {
t.Object = "<" + t.Object[1:] + ">"
if t.Object[0] == ':' {
if t.Object[1] == '/' {
t.Object = "<" + t.Object[1:] + ">"
} else {
t.Object = "_" + t.Object
}
} else if t.Object[0] == '/' {
t.Object = "<" + t.Object + ">"
} else {
Expand Down

0 comments on commit 9ff9760

Please sign in to comment.