Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Proposals for annotations of tables
{
   "xml": "<table>
              <tr><td>parameter</td><td>number</td></tr>
              <tr><td>male/famale</td><td>15/18</td></tr>
          </table>",
   "denotations": [
      {"id": "T1", "xpath": "/table/tr[1]/td[1]", "obj": "Header"},
      {"id": "T2", "xpath": "/table/tr[1]/td[1]", "obj": "Stub"},
      {"id": "T3","xpath": "/table/tr[1]/td[2]", "obj": "Header"},
      {"id": "T4","xpath": "/table/tr[2]/td[1]", "obj": "Stub"},
      {"id": "T5", "xpath": "/table/tr[2]/td[2]", "obj": "Data"},
      {"id" : "T6","xpath": "substring(/table/tr[1]/td[1],2,5)", 
"obj": "substringEx"}
   ],
   "relations": [
      {"id": "R1", "subj": "T4", "pred": "dataOfHeader", "obj": "T1"},
      {"id": "R2", "subj": "T5", "pred": "dataOfHeader", "obj": "T3"},
      {"id": "R3", "subj": "T5", "pred": "dataOfStub", "obj": "T4"},
   ]
} 
{
   "xml": "<table>
              <tr><td>parameter</td><td>number</td></tr>
              <tr><td>male/famale</td><td>15/18</td></tr>
          </table>",
   "denotations": [
      {"id": "T1", "xpath": "/table/tr[1]/td[1]", "obj": "Header"},
      {"id": "T2", "xpath": "/table/tr[1]/td[1]", "obj": "Stub"},
      {"id": "T3","xpath": "/table/tr[1]/td[2]", "obj": "Header"},
      {"id": "T4","xpath": "/table/tr[2]/td[1]", "obj": "Stub"},
      {"id": "T5", "xpath": "/table/tr[2]/td[2]", "obj": "Data"},
      {"id" : "T6","xpath": "/table/tr[1]/td[1]", "span":{"begin":2,"end":5},"obj": "substringEx"}
   ],
   "relations": [
      {"id": "R1", "subj": "T4", "pred": "dataOfHeader", "obj": "T1"},
      {"id": "R2", "subj": "T5", "pred": "dataOfHeader", "obj": "T3"},
      {"id": "R3", "subj": "T5", "pred": "dataOfStub", "obj": "T4"},
   ]
} 
{
   "xml": "<table>
              <tr><td>parameter</td><td>number</td></tr>
              <tr><td>male/famale</td><td>15/18</td></tr>
          </table>",
   "denotations": [
      {"id": "T1", "span": {"begin":7, "end":23}, "obj": "Header"},
      {"id": "T2", "span": {"begin":7,"end":23}, "obj": "Stub"},
      {"id": "T3","span": {"begin":24,"end":48}, "obj": "Header"},
      {"id": "T4","span": {"begin":49,"end":72}, "obj": "Stub"},
      {"id": "T5", "span":{"begin":73,"end":92} , "obj": "Data"},
      {"id" : "T6","span":{"begin":80,"end":82},"obj": "substringEx"}
   ],
   "relations": [
      {"id": "R1", "subj": "T4", "pred": "dataOfHeader", "obj": "T1"},
      {"id": "R2", "subj": "T5", "pred": "dataOfHeader", "obj": "T3"},
      {"id": "R3", "subj": "T5", "pred": "dataOfStub", "obj": "T4"},
   ]
} 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.