Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface SemanticInterpreter

Hierarchy

  • SemanticInterpreter

Index

Properties

addGrammar

addGrammar: (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
                • Parameters

                  • semanticResult: {}

                  Returns void

            Returns void | GrammarConverter

      • Optional fileFormatNo: number

      Returns void

addProcessing

addProcessing: (id: string, processingStep: ProcessingStep, indexOrIsPrepend?: number | boolean, callback?: Function) => void

Type declaration

    • (id: string, processingStep: ProcessingStep, indexOrIsPrepend?: number | boolean, callback?: Function): void
    • Parameters

      • id: string
      • processingStep: ProcessingStep
      • Optional indexOrIsPrepend: number | boolean
      • Optional callback: Function

      Returns void

applyPreProcessing

applyPreProcessing: (thePhrase: string, lang?: string, processingSteps?: ProcessingStep[]) => string

Type declaration

    • (thePhrase: string, lang?: string, processingSteps?: ProcessingStep[]): string
    • Parameters

      • thePhrase: string
      • Optional lang: string
      • Optional processingSteps: ProcessingStep[]

      Returns string

createGrammar

createGrammar: (rawGrammarSrc: string | {}, id: string, callback?: (created?: GrammarConverter) => void) => SemanticInterpreter

Type declaration

getCurrentGrammar

getCurrentGrammar: () => string

Type declaration

    • (): string
    • Returns string

getEngineCompileMode

getEngineCompileMode: () => boolean

Type declaration

    • (): boolean
    • Returns boolean

getEngineCompileStrictMode

getEngineCompileStrictMode: () => boolean

Type declaration

    • (): boolean
    • Returns boolean

getFileVersion

getFileVersion: () => number

Type declaration

    • (): number
    • Returns number

getGrammarConverter

getGrammarConverter: (id: string) => GrammarConverter

Type declaration

getGrammarDefinitionText

getGrammarDefinitionText: (id: string) => string

Type declaration

    • (id: string): string
    • Parameters

      • id: string

      Returns string

getGrammarEngine

getGrammarEngine: () => GrammarEngineType

Type declaration

getGrammarParserText

getGrammarParserText: (id: string) => string

Type declaration

    • (id: string): string
    • Parameters

      • id: string

      Returns string

get_json_grammar_url

get_json_grammar_url: (id: string) => string

Type declaration

    • (id: string): string
    • Parameters

      • id: string

      Returns string

hasGrammar

hasGrammar: (id: string) => boolean

Type declaration

    • (id: string): boolean
    • Parameters

      • id: string

      Returns boolean

interpret

interpret: (phrase: string, langCode?: string, callback?: (semanticResult: GrammarResult) => void) => GrammarResult | void

Type declaration

isEnabled

isEnabled: () => boolean

Type declaration

    • (): boolean
    • Returns boolean

isPreProcessPositionsEnabled

isPreProcessPositionsEnabled: () => boolean

Type declaration

    • (): boolean
    • Returns boolean

removeGrammar

removeGrammar: (id: string) => void

Type declaration

    • (id: string): void
    • Parameters

      • id: string

      Returns void

removeStopwords

removeStopwords: (thePhrase: string, lang?: string) => string
deprecated

use applyPreProcessing instead

Type declaration

    • (thePhrase: string, lang?: string): string
    • Parameters

      • thePhrase: string
      • Optional lang: string

      Returns string

setCurrentGrammar

setCurrentGrammar: (id: string) => void

Type declaration

    • (id: string): void
    • Parameters

      • id: string

      Returns void

setEnabled

setEnabled: (isEnabled: boolean) => void

Type declaration

    • (isEnabled: boolean): void
    • Parameters

      • isEnabled: boolean

      Returns void

setEngineCompileMode

setEngineCompileMode: (asyncCompileMode: boolean, disableStrictCompileMode?: boolean) => void

Type declaration

    • (asyncCompileMode: boolean, disableStrictCompileMode?: boolean): void
    • Parameters

      • asyncCompileMode: boolean
      • Optional disableStrictCompileMode: boolean

      Returns void

setGrammarEngine

setGrammarEngine: (engineId: GrammarEngineType, asyncCompileMode?: boolean, disableStrictCompileMode?: boolean) => void

Type declaration

    • (engineId: GrammarEngineType, asyncCompileMode?: boolean, disableStrictCompileMode?: boolean): void
    • Parameters

      • engineId: GrammarEngineType
      • Optional asyncCompileMode: boolean
      • Optional disableStrictCompileMode: boolean

      Returns void

setPreProcessPositionsEnabled

setPreProcessPositionsEnabled: (enabled: boolean) => void

Type declaration

    • (enabled: boolean): void
    • Parameters

      • enabled: boolean

      Returns void

setStopwords

setStopwords: (id: string, stopwordArray: string[]) => void

Type declaration

    • (id: string, stopwordArray: string[]): void
    • Parameters

      • id: string
      • stopwordArray: string[]

      Returns void

Generated using TypeDoc