1 Description

This document contains the description of the RESTful API of the service. The service itself is available at http://services.ceon.pl/coansys/citation_matching.do.

2 Input

The service accepts a query being a text conforming to the JSON schema presented in this section. The query has to be sent using the HTTP POST method.

2.1 Example

{
  "citations":[
    {
      "citation-text":"Copernicus, N. (1543). De revolutionibus orbium coelestium."
    },
    {
      "citation-text":"Newton, I. (1687). Philosophiae naturalis principia mathematica."
    }
  ]
}

2.2 JSON schema

{
  "required":true,
  "type":"object",
  "properties":{
    "citations":{
      "type":"array",
      "items":{
        "type":"object",
        "required":true,
        "properties":{
          "citation-text":{
            "type":"string",
            "required":true
          }
        }
      }
    }
  }
}

3 Output

The service returns an answer conforming to the JSON schema presented in this section.

3.1 Example

{
  "results":[
    {
      "citation-text":"Copernicus, N. (1543). De revolutionibus orbium coelestium.",
      "extracted-metadata":{
        "author":"Copernicus, N.",
        "year":"1543",
        "title":"De revolutionibus orbium coelestium"
      },
      "matched-documents":[
        {
          "metadata":{
            "id":"doc1",
            "author":"Nicolaus Copernicus",
            "year":"1543",
            "title":"De revolutionibus orbium coelestium",
            "doi":"10.1000/182"
          },
          "score":0.95
        },
        {
          "metadata":{
            "id":"doc123"
          },
          "score":0.6
        }
      ]
    },
    {
      "citation-text":"Newton, I. (1687). Philosophiae naturalis principia mathematica.",
      "extracted-metadata":{
        "author":"Newton, I.",
        "year":"1687",
        "title":"Philosophiae naturalis principia mathematica"
      },
      "matched-documents":[

      ]
    }
  ]
}

3.2 JSON schema

{
  "required":true,
  "type":"object",
  "properties":{
    "results":{
      "type":"array",
      "items":{
        "type":"object",
        "required":true,
        "properties":{
          "citation-text":{
            "type":"string",
            "required":true
          },
          "extracted-metadata":{
            "type":"object",
            "required":true,
            "properties":{
              "author":{
                "type":"string",
                "required":false
              },
              "year":{
                "type":"string",
                "required":false
              },
              "title":{
                "type":"string",
                "required":false
              },
              "journal":{
                "type":"string",
                "required":false
              },
              "pages":{
                "type":"string",
                "required":false
              }
            }
          },
          "matched-documents":{
            "type":"array",
            "items":{
              "type":"object",
              "properties":{
                "metadata":{
                  "type":"object",
                  "required":true,
                  "properties":{
                    "id":{
                      "type":"string",
                      "required":true
                    },
                    "doi":{
                      "type":"string",
                      "required":false
                    },
                    "author":{
                      "type":"string",
                      "required":false
                    },
                    "year":{
                      "type":"string",
                      "required":false
                    },
                    "title":{
                      "type":"string",
                      "required":false
                    },
                    "journal":{
                      "type":"string",
                      "required":false
                    },
                    "pages":{
                      "type":"string",
                      "required":false
                    }
                  }
                },
                "score":{
                  "type":"number",
                  "required":true
                }
              }
            }
          }
        }
      }
    }
  }
}