Accessors
url
- get url(): string
Returns string
Constructors
constructor
- new RecognizerHTTPV1(
config: {
recognition?: {
convert?: { force?: { "on-stylesheet-change"?: boolean } };
diagram?: {
convert?: {
"match-text-size"?: boolean;
types?: (undefined | "shape" | "text")[];
};
"enable-sub-blocks"?: boolean;
eraser?: { "erase-precisely"?: boolean };
mimeTypes?: (
| undefined
| "application/vnd.myscript.jiix"
| "application/vnd.openxmlformats-officedocument.presentationml.presentation"
| "image/svg+xml"
)[];
"session-time"?: number;
text?: {
addLKText?: boolean;
customLexicon?: (undefined | string)[];
customResources?: (undefined | string)[];
};
};
export?: {
image?: {
guides?: boolean;
viewport?: { height?: number; width?: number; x?: number; y?: number };
};
"image-resolution"?: number;
jiix?: {
"bounding-box"?: boolean;
"full-stroke-ids"?: boolean;
ids?: boolean;
strokes?: boolean;
style?: boolean;
text?: { chars?: boolean; lines?: boolean; words?: boolean };
};
mathml?: { flavor?: { name?: string } };
};
lang?: string;
math?: {
customGrammar?: string;
customGrammarContent?: string;
customGrammarId?: string;
eraser?: { "erase-precisely"?: boolean };
margin?: {
bottom?: number;
left?: number;
right?: number;
top?: number;
};
mimeTypes?: (
| undefined
| "application/vnd.myscript.jiix"
| "application/x-latex"
| "application/mathml+xml"
)[];
"recognition-timeout"?: number;
"session-time"?: number;
solver?: {
"angle-unit"?: TAngleUnit;
"decimal-separator"?: string;
enable?: boolean;
"fractional-part-digits"?: number;
options?: TSolverOptions;
"rounding-mode"?: TRoundingMode;
};
"undo-redo"?: { mode?: TUndoRedoMode };
};
"raw-content"?: {
classification?: {
types?: (
undefined
| "shape"
| "text"
| "math"
| "decoration"
| "drawing"
)[];
};
eraser?: { "erase-precisely"?: boolean };
recognition?: {
types?: (undefined | "shape" | "text" | "math" | "decoration")[];
};
"session-time"?: number;
text?: {
addLKText?: boolean;
customLexicon?: (undefined | string)[];
customResources?: (undefined | string)[];
};
};
renderer?: {
debug?: { "draw-image-boxes"?: boolean; "draw-text-boxes"?: boolean };
};
text?: {
configuration?: {
addLKText?: boolean;
customLexicon?: (undefined | string)[];
customResources?: (undefined | string)[];
};
eraser?: { "erase-precisely"?: boolean };
guides?: { enable?: boolean };
margin?: {
bottom?: number;
left?: number;
right?: number;
top?: number;
};
mimeTypes?: (undefined | "text/plain" | "application/vnd.myscript.jiix")[];
text?: boolean;
};
type?: TRecognitionType;
};
server?: {
applicationKey?: string;
hmacKey?: string;
host?: string;
scheme?: TScheme;
version?: string;
};
},
): RecognizerHTTPV1 Parameters
- config: {
recognition?: {
convert?: { force?: { "on-stylesheet-change"?: boolean } };
diagram?: {
convert?: {
"match-text-size"?: boolean;
types?: (undefined | "shape" | "text")[];
};
"enable-sub-blocks"?: boolean;
eraser?: { "erase-precisely"?: boolean };
mimeTypes?: (
| undefined
| "application/vnd.myscript.jiix"
| "application/vnd.openxmlformats-officedocument.presentationml.presentation"
| "image/svg+xml"
)[];
"session-time"?: number;
text?: {
addLKText?: boolean;
customLexicon?: (undefined | string)[];
customResources?: (undefined | string)[];
};
};
export?: {
image?: {
guides?: boolean;
viewport?: { height?: number; width?: number; x?: number; y?: number };
};
"image-resolution"?: number;
jiix?: {
"bounding-box"?: boolean;
"full-stroke-ids"?: boolean;
ids?: boolean;
strokes?: boolean;
style?: boolean;
text?: { chars?: boolean; lines?: boolean; words?: boolean };
};
mathml?: { flavor?: { name?: string } };
};
lang?: string;
math?: {
customGrammar?: string;
customGrammarContent?: string;
customGrammarId?: string;
eraser?: { "erase-precisely"?: boolean };
margin?: { bottom?: number; left?: number; right?: number; top?: number };
mimeTypes?: (
| undefined
| "application/vnd.myscript.jiix"
| "application/x-latex"
| "application/mathml+xml"
)[];
"recognition-timeout"?: number;
"session-time"?: number;
solver?: {
"angle-unit"?: TAngleUnit;
"decimal-separator"?: string;
enable?: boolean;
"fractional-part-digits"?: number;
options?: TSolverOptions;
"rounding-mode"?: TRoundingMode;
};
"undo-redo"?: { mode?: TUndoRedoMode };
};
"raw-content"?: {
classification?: {
types?: (
undefined
| "shape"
| "text"
| "math"
| "decoration"
| "drawing"
)[];
};
eraser?: { "erase-precisely"?: boolean };
recognition?: {
types?: (undefined | "shape" | "text" | "math" | "decoration")[];
};
"session-time"?: number;
text?: {
addLKText?: boolean;
customLexicon?: (undefined | string)[];
customResources?: (undefined | string)[];
};
};
renderer?: {
debug?: { "draw-image-boxes"?: boolean; "draw-text-boxes"?: boolean };
};
text?: {
configuration?: {
addLKText?: boolean;
customLexicon?: (undefined | string)[];
customResources?: (undefined | string)[];
};
eraser?: { "erase-precisely"?: boolean };
guides?: { enable?: boolean };
margin?: { bottom?: number; left?: number; right?: number; top?: number };
mimeTypes?: (undefined | "text/plain" | "application/vnd.myscript.jiix")[];
text?: boolean;
};
type?: TRecognitionType;
};
server?: {
applicationKey?: string;
hmacKey?: string;
host?: string;
scheme?: TScheme;
version?: string;
};
}
Methods
convert
- convert(
model: Model,
conversionState?: TConverstionState,
requestedMimeTypes?: string[],
): Promise<Model> Returns Promise<Model>
export
- export(model: Model, requestedMimeTypes?: string[]): Promise<Model>
Parameters
- model: Model
Optional
requestedMimeTypes: string[]
Returns Promise<Model>
Protected
getMimeTypes
- getMimeTypes(requestedMimeTypes?: string[]): string[]
Parameters
Optional
requestedMimeTypes: string[]
Returns string[]
Protected
post
- post(data: unknown, mimeType: string): Promise<unknown>
Parameters
- data: unknown
- mimeType: string
Returns Promise<unknown>
resize
- resize(model: Model): Promise<Model>
Returns Promise<Model>
Properties
configuration
Deprecated
Use RecognizerHTTPV2 instead.