You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import { AnalyticUnit, DetectorType, LabelingMode } from './analytic_unit';
|
|
|
|
|
|
|
|
import _ from 'lodash';
|
|
|
|
|
|
|
|
const DEFAULTS = {
|
|
|
|
detectorType: DetectorType.PATTERN,
|
|
|
|
type: 'GENERAL'
|
|
|
|
};
|
|
|
|
|
|
|
|
const LABELING_MODES = [
|
|
|
|
{ name: 'Label Positive', value: LabelingMode.LABELING },
|
|
|
|
{ name: 'Label Negative', value: LabelingMode.DELETING },
|
|
|
|
{ name: 'Unlabel', value: LabelingMode.UNLABELING }
|
|
|
|
];
|
|
|
|
|
|
|
|
export class PatternAnalyticUnit extends AnalyticUnit {
|
|
|
|
|
|
|
|
constructor(_serverObject?: any) {
|
|
|
|
super(_serverObject);
|
|
|
|
_.defaults(this._serverObject, DEFAULTS);
|
|
|
|
}
|
|
|
|
|
|
|
|
toJSON() {
|
|
|
|
const baseJSON = super.toJSON();
|
|
|
|
return {
|
|
|
|
...baseJSON
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
get labelingModes() {
|
|
|
|
return LABELING_MODES;
|
|
|
|
}
|
|
|
|
}
|