Dom info Schema for JSON#

Description#

This json file goes in pair with a domain (.dom) file, and will be used to resolve dependencies and control the output results. It will also be used to display information of a domain in the portal.

Definition#

The Woc Project schema is defined as:

  • object – The Woc Project

    • domain (str) – The name of you domain.

    • language (object) – The language of your domain.

    • concepts (list[str]) – The concepts that your domain will produce.

    • imports (list[str]) – The imports field is to specify Concept that you assume are comming from other domains, and are not in the concepts of your dependencies. See below for more information.

    • dependencies (list[str]) – The list of domains the your project depends on. ex: [‘english-entity’]

    • short_description (str) – The description that will appear in the portal in the domain card.

    • examples (list[Example]) – This will appear in the detail info in the portal.

The Example is object describing a example of a concept.

  • concept (str) – The name of the concept.

  • sample (str) – A sample of what will ba matched.

  • desc (str) – The description of what will be matched.

Example#

{
    "concepts": [
        "Facility",
        "WorldRegion"
    ],
    "dependencies": [
        "english-syntax"
    ],
    "short_description": "Named entity annotations, such as: Facility, WorldRegion",
    "examples": [
        {
            "concept": "Facility",
            "sample": "Cape Range national park",
            "desc": "A building or place that provides a particular service or is used for a particular industry"
        },
        {
            "concept": "WorldRegion",
            "sample": "Northern Ireland",
            "desc": "A geographical place, like a continent, a region, a county, etc."
        }
    ]
}

Import#

The import field is used while testing the domains and to make sure that the concpets that you use in your rules are available. If not the compiler will prompt with a error.

{
    "concepts": [
        "President",
    ],
    "dependencies": [
        "english-entity"
    ]
}

In de rule below we want to use the Person comming from the english-entity domain. But we used PersonCandidate instead. Which is not avaliable then the compiler will return a error while testing.

rule: { "president" PersonCandidate } = President;

But maybe you assume the PersonCandidate has been produce by some other domain, then you need to add it to the import section to avoid the error from the compiler.

{
    "concepts": [
        "President",
    ],
    "imports" : [ "PersonCandidate" ],
    "dependencies": [
        "english-entity"
    ]
}