Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
161 lines (161 sloc) 7.3 KB
{
"$schema": "http://json-schema.org/draft-03/schema",
"name": "Form Template",
"type": "object",
"properties": {
"image_filename": {
"description": "The filename of the form image.",
"display": "hidden",
"type": "string"
},
"height": {
"description": "The form's height in pixels.",
"display": "hidden",
"type": "number"
},
"width": {
"description": "The form's width in pixels.",
"display": "hidden",
"type": "number"
},
"fields": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"default": "input",
"enum": ["input", "select", "select1"],
"required": true,
"description": "Correponds with xform body element types.",
"type": "string"
},
"name": {
"required": true,
"description": "A unique name used to identify this field. Must follow xml naming conventions.",
"type": "string"
},
"label": {
"type": "string"
},
"hint": {
"type": "string",
"description": "A optional description of what this field is for."
},
"segments": {
"description": "Segments are used to specify rectangular areas of the form that the field is made up of.",
"type": "array",
"items": {
"type": "object",
"properties": {
"segment_height": {
"required": true,
"type": "number"
},
"segment_width": {
"required": true,
"type": "number"
},
"segment_x": {
"required": true,
"type": "number"
},
"segment_y": {
"required": true,
"type": "number"
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"item_x": {
"required": true,
"type": "number"
},
"item_y": {
"required": true,
"type": "number"
},
"label": {
"type": "string"
},
"value": {
"description": "Required if the field type is select.",
"type": "any"
}
}
}
},
"align_segment": {
"description": "If this segment has a bounding rectagle it will be used for additional alignment if this is true. For flat images this isn't necessairy.",
"default": false,
"required": false,
"type": "boolean"
}
}
}
},
"classifier": {
"type": "object",
"required": false,
"properties": {
"classifier_height": {
"label": "classifier height",
"required": true,
"type": "integer"
},
"classifier_width": {
"label": "classifier width",
"required": true,
"type": "integer"
},
"training_data_uri": {
"required": true,
"default": "bubbles",
"type": "string"
},
"classification_map": {
"type": "object",
"required": true,
"additionalProperties": true,
"default": {
"empty": false
}
},
"default_classification": {
"required": true,
"type": "any",
"default": true
},
"advanced": {
"description": "Advanced classifier properties.",
"display": "hidden",
"type": "object",
"required": false,
"properties": {
"eigenvalues": {
"type": "integer",
"default": 9
},
"flip_training_data": {
"description": "Flip and mirror the training examples to generate more training data.",
"type": "boolean",
"required": true,
"default": true
},
"alignment_radius": {
"description": "If specified a hill climbing search will be done to align the classified items.",
"default": 0,
"required": false,
"type": "number"
}
}
}
}
}
}
}
}
}
}