Labelbox documentation

Legacy vs new editor ontology

The new data model supports a more persistent ontology by making it possible to modify your ontology without affecting previously created labels.

When you query ontology.normalized connected to a project in the new editor (see example here), it will return values for schemaNodeId and featureSchemaId. Those values point to their respective schema node and feature schema entities.Get an ontology

Legacy editor example

In the legacy editor, ontology is not schematized. There are no schema nodes or feature schemas to provide structure or reusability. The ontology only contains raw input.

{
    "tools": [
        {
            "name": "Dog",
            "color": "#FF0000",
            "tool": "rectangle",
            "classifications": [
                {
                    "name": "is_it_an_adult?",
                    "instructions": "Is it an adult?",
                    "type": "radio",
                    "options": [
                        {
                            "value": "yes",
                            "label": "Yes"
                        },
                        {
                            "value": "no",
                            "label": "No"
                        }
                    ],
                    "required": false
                }
            ]
        },
        {
            "name": "Cat",
            "color": "#FF8000",
            "tool": "rectangle",
            "classifications": [
                {        
                    "name": "is_it_an_adult?",
                    "instructions": "Is it an adult?",
                    "type": "radio",
                    "options": [
                        {
                            "value": "yes",
                            "label": "Yes"
                        },
                        {
                            "value": "no",
                            "label": "No"
                        }
                    ],
                    "required": false
                }
            ]
        }
    ],
    "classifications": []
}

New editor example

While the two ontology formats may look similar, the ontology of the new data model is much more robust in terms of usage and capabilities. The new data model also has more strictly enforced requirements when it comes to formatting. Notice that the new ontology is schematized (contains IDs that point to the schema node and feature schema) and that the featureSchemaIds are the same for each nested classification. This is because the new editor is built on a tree data model. Think of the schema nodes as the "structure" and the feature schemas as the "leaves". Feature schemas can be reused.

{
    "tools": [
        {
            "schemaNodeId": "ckcc816uc009p0y3ffeb4d8d6",
            "featureSchemaId": "ckcc816ud009q0y3f3ocq6hrc",
            "required": false,
            "name": "Dog",
            "tool": "rectangle",
            "color": "#FF0000",
            "classifications": [
                {
                    "schemaNodeId": "ckcc8187t009v0y3fhz1r2mif",
                    "featureSchemaId": "ckcc8187t009w0y3fdsmcgimk",
                    "required": false,
                    "instructions": "Is it an adult?",
                    "name": "is_it_an_adult?",
                    "type": "radio",
                    "options": [
                        {
                            "schemaNodeId": "ckcc8188o009x0y3f0bmihfgc",
                            "featureSchemaId": "ckcc8188o009y0y3f144vfozh",
                            "label": "Yes",
                            "value": "yes"
                        },
                        {
                            "schemaNodeId": "ckcc8188o009z0y3f9teec12b",
                            "featureSchemaId": "ckcc8188o00a00y3fhrxog119",
                            "label": "No",
                            "value": "no"
                        }
                    ]
                }
            ]
        },
        {
            "schemaNodeId": "ckcc816uh009r0y3fefnx6dka",
            "featureSchemaId": "ckcc816uh009s0y3f006ge2g3",
            "required": false,
            "name": "Cat",
            "tool": "rectangle",
            "color": "#FF8000",
            "classifications": [
                {
                    "schemaNodeId": "ckcc8187n009t0y3ff1vobea4",
                    "featureSchemaId": "ckcc8187t009w0y3fdsmcgimk",
                    "required": false,
                    "instructions": "Is it an adult?",
                    "name": "is_it_an_adult?",
                    "type": "radio",
                    "options": [
                        {
                            "schemaNodeId": "ckcc8188r00a10y3f0im001go",
                            "featureSchemaId": "ckcc8188o009y0y3f144vfozh",
                            "label": "Yes",
                            "value": "yes"
                        },
                        {
                            "schemaNodeId": "ckcc8188s00a30y3f7rrzde6c",
                            "featureSchemaId": "ckcc8188o00a00y3fhrxog119",
                            "label": "No",
                            "value": "no"
                        }
                    ]
                }
            ]
        }
    ],
    "classifications": []
}