QuantPlorer API - /api/extract

This is a an API endpoint. If you are looking for the extractor web interface, you can find it here.

The API call expects a POST request, for example like this:
curl https://quantplorer.ifi.uni-heidelberg.de/api/extract \
     -X POST \
     -H "Content-Type: application/json" \
     -d '{"text": "My grandmas recipe calls for 100g of butter." }'     

This requests returns:
[
    {
        "sourceText": "My grandmas recipe calls for 100g of butter.",
        "preprocessedText": "My grandmas recipe calls for 100 g of butter .",
        "quantities": [
            {
                "concept": {
                    "text": [
                        "butter",
                        "grandmas",
                        "recipe"
                    ]
                },
                "value": {
                    "text": [
                        "100"
                    ],
                    "value": 100.0
                },
                "change": {
                    "value": "=",
                    "text": [
                        "for"
                    ]
                },
                "unit": {
                    "normalizedUnit": "gram",
                    "text": [
                        "g"
                    ]
                }
            }
        ]
    }
]

This endpoint takes a text to extract as a JSON payload of the form {"text": "text to extract"}. It returns the extracted quantities with some information, however it is only a reduced version of what the CQE package can provide.