Properties
addGrammar
add
Grammar: (id: string, grammarImpl: (text: string, callback?: (semanticResult: {}) => void) => void | GrammarConverter, fileFormatNo?: number) => void
Type declaration
-
- (id: string, grammarImpl: (text: string, callback?: (semanticResult: {}) => void) => void | GrammarConverter, fileFormatNo?: number): void
-
Parameters
-
id: string
-
grammarImpl: (text: string, callback?: (semanticResult: {}) => void) => void | GrammarConverter
-
- (text: string, callback?: (semanticResult: {}) => void): void | GrammarConverter
-
Parameters
-
text: string
-
Optional callback: (semanticResult: {}) => void
-
- (semanticResult: {}): void
-
Optional fileFormatNo: number
Returns void
addProcessing
add
Processing: (id: string, processingStep: ProcessingStep, indexOrIsPrepend?: number | boolean, callback?: Function) => void
Type declaration
-
-
Parameters
-
id: string
-
-
Optional indexOrIsPrepend: number | boolean
-
Optional callback: Function
Returns void
applyPreProcessing
apply
PreProcessing: (thePhrase: string, lang?: string, processingSteps?: ProcessingStep[]) => string
Type declaration
-
- (thePhrase: string, lang?: string, processingSteps?: ProcessingStep[]): string
-
Parameters
-
thePhrase: string
-
Optional lang: string
-
Returns string
createGrammar
Type declaration
-
-
Parameters
-
rawGrammarSrc: string | {}
-
id: string
-
Optional callback: (created?: GrammarConverter) => void
getCurrentGrammar
getCurrentGrammar: () => string
getEngineCompileMode
getEngineCompileMode: () => boolean
getEngineCompileStrictMode
getEngineCompileStrictMode: () => boolean
getFileVersion
getFileVersion: () => number
getGrammarDefinitionText
getGrammarDefinitionText: (id: string) => string
Type declaration
-
-
Parameters
Returns string
getGrammarParserText
getGrammarParserText: (id: string) => string
Type declaration
-
-
Parameters
Returns string
get_json_grammar_url
get_json_grammar_url: (id: string) => string
Type declaration
-
-
Parameters
Returns string
hasGrammar
hasGrammar: (id: string) => boolean
Type declaration
-
-
Parameters
Returns boolean
interpret
Type declaration
-
-
Parameters
-
phrase: string
-
Optional langCode: string
-
Optional callback: (semanticResult: GrammarResult) => void
isEnabled
isEnabled: () => boolean
isPreProcessPositionsEnabled
isPreProcessPositionsEnabled: () => boolean
removeGrammar
removeGrammar: (id: string) => void
removeStopwords
removeStopwords: (thePhrase: string, lang?: string) => string
Type declaration
-
- (thePhrase: string, lang?: string): string
-
Parameters
-
thePhrase: string
-
Optional lang: string
Returns string
setCurrentGrammar
setCurrentGrammar: (id: string) => void
setEnabled
setEnabled: (isEnabled: boolean) => void
Type declaration
-
- (isEnabled: boolean): void
setEngineCompileMode
setEngineCompileMode: (asyncCompileMode: boolean, disableStrictCompileMode?: boolean) => void
Type declaration
-
- (asyncCompileMode: boolean, disableStrictCompileMode?: boolean): void
-
Parameters
-
asyncCompileMode: boolean
-
Optional disableStrictCompileMode: boolean
Returns void
setGrammarEngine
set
GrammarEngine: (engineId: GrammarEngineType, asyncCompileMode?: boolean, disableStrictCompileMode?: boolean) => void
Type declaration
-
- (engineId: GrammarEngineType, asyncCompileMode?: boolean, disableStrictCompileMode?: boolean): void
-
Parameters
-
-
Optional asyncCompileMode: boolean
-
Optional disableStrictCompileMode: boolean
Returns void
setPreProcessPositionsEnabled
setPreProcessPositionsEnabled: (enabled: boolean) => void
setStopwords
setStopwords: (id: string, stopwordArray: string[]) => void
Type declaration
-
- (id: string, stopwordArray: string[]): void
-
Parameters
-
id: string
-
stopwordArray: string[]
Returns void
use applyPreProcessing instead