Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface GrammarConverter

Hierarchy

  • GrammarConverter

Index

Constructors

constructor

Properties

addProc

addProc: (proc: ProcessingStep, indexOrIsPrepend?: number | boolean) => void

Type declaration

    • Parameters

      Returns void

convertOldFormat

convertOldFormat: boolean

executeGrammar

executeGrammar: (text: string, callback?: (semanticResult: {}) => void) => void

Type declaration

    • (text: string, callback?: (semanticResult: {}) => void): void
    • Parameters

      • text: string
      • Optional callback: (semanticResult: {}) => void
          • (semanticResult: {}): void
          • Parameters

            • semanticResult: {}

            Returns void

      Returns void

getEncodedStopwords

getEncodedStopwords: () => string[]

Type declaration

    • (): string[]
    • Returns string[]

getGrammarDef

getGrammarDef: () => string

Type declaration

    • (): string
    • Returns string

getGrammarSource

getGrammarSource: () => string

Type declaration

    • (): string
    • Returns string

getProcIndex

getProcIndex: (procName: string, startIndex?: number) => number

Type declaration

    • (procName: string, startIndex?: number): number
    • Parameters

      • procName: string
      • Optional startIndex: number

      Returns number

getStopWords

getStopWords: () => string[]

Type declaration

    • (): string[]
    • Returns string[]

getStopWordsEncRegExpr

getStopWordsEncRegExpr: () => RegExp

Type declaration

    • (): RegExp
    • Returns RegExp

getStopWordsRegExpr

getStopWordsRegExpr: () => RegExp

Type declaration

    • (): RegExp
    • Returns RegExp

grammar_definition

grammar_definition: string

isAsyncExec

isAsyncExec: () => boolean

Type declaration

    • (): boolean
    • Returns boolean

js_grammar_definition

js_grammar_definition: string

json_grammar_definition

json_grammar_definition: Grammar

loadGrammar

loadGrammar: (successCallback: () => any, errorCallback: () => any, grammarUrl: string, doLoadSynchronously?: boolean) => void

Type declaration

    • (successCallback: () => any, errorCallback: () => any, grammarUrl: string, doLoadSynchronously?: boolean): void
    • Parameters

      • successCallback: () => any
          • (): any
          • Returns any

      • errorCallback: () => any
          • (): any
          • Returns any

      • grammarUrl: string
      • Optional doLoadSynchronously: boolean

      Returns void

loadResource

loadResource: (successCallback: () => any, errorCallback: () => any, resourceUrl: string, doLoadSynchronously?: boolean) => void

Type declaration

    • (successCallback: () => any, errorCallback: () => any, resourceUrl: string, doLoadSynchronously?: boolean): void
    • Parameters

      • successCallback: () => any
          • (): any
          • Returns any

      • errorCallback: () => any
          • (): any
          • Returns any

      • resourceUrl: string
      • Optional doLoadSynchronously: boolean

      Returns void

maskAsUnicode

maskAsUnicode: (str: string, computePositions?: boolean) => string

Type declaration

    • (str: string, computePositions?: boolean): string
    • Parameters

      • str: string
      • Optional computePositions: boolean

      Returns string

maskNames

maskNames: boolean

maskString

maskString: (str: string, computePositions?: boolean, prefix?: string, postfix?: string) => string | Positions

Type declaration

    • (str: string, computePositions?: boolean, prefix?: string, postfix?: string): string | Positions
    • Parameters

      • str: string
      • Optional computePositions: boolean
      • Optional prefix: string
      • Optional postfix: string

      Returns string | Positions

maskValues

maskValues: boolean

parseStopWords

parseStopWords: () => void

Type declaration

    • (): void
    • Returns void

postproc

postproc: (procResult: any, pos: ProcessingPositionsInfo, processingSteps?: ProcessingStep[]) => any

Type declaration

preproc

preproc: (thePhrase: string, pos?: ProcessingPositionsInfo, processingSteps?: ProcessingStep[]) => string

Type declaration

procList

procList: ProcessingStep[]

recodeJSON

recodeJSON: (json: any, recodeFunc: (str: string) => string, isMaskValues?: boolean, isMaskNames?: boolean) => any

Type declaration

    • (json: any, recodeFunc: (str: string) => string, isMaskValues?: boolean, isMaskNames?: boolean): any
    • Parameters

      • json: any
      • recodeFunc: (str: string) => string
          • (str: string): string
          • Parameters

            • str: string

            Returns string

      • Optional isMaskValues: boolean
      • Optional isMaskNames: boolean

      Returns any

removeProc

removeProc: (proc: number | string) => ProcessingStep | undefined

Type declaration

removeStopwords

removeStopwords: (inputStr: string, isCalcPosition?: boolean) => string | Positions

Type declaration

    • (inputStr: string, isCalcPosition?: boolean): string | Positions
    • Parameters

      • inputStr: string
      • Optional isCalcPosition: boolean

      Returns string | Positions

setGrammarDef

setGrammarDef: (rawGrammarSyntax: string) => void

Type declaration

    • (rawGrammarSyntax: string): void
    • Parameters

      • rawGrammarSyntax: string

      Returns void

setGrammarFunction

setGrammarFunction: (execGrammarFunc: (text: string, callback?: (semanticResult: {}) => void) => void, isAsync?: boolean) => void

Type declaration

    • (execGrammarFunc: (text: string, callback?: (semanticResult: {}) => void) => void, isAsync?: boolean): void
    • Parameters

      • execGrammarFunc: (text: string, callback?: (semanticResult: {}) => void) => void
          • (text: string, callback?: (semanticResult: {}) => void): void
          • Parameters

            • text: string
            • Optional callback: (semanticResult: {}) => void
                • (semanticResult: {}): void
                • Parameters

                  • semanticResult: {}

                  Returns void

            Returns void

      • Optional isAsync: boolean

      Returns void

setGrammarSource

setGrammarSource: (src_code: string) => void

Type declaration

    • (src_code: string): void
    • Parameters

      • src_code: string

      Returns void

setStopWords

setStopWords: (stopWordArray: string[]) => void

Type declaration

    • (stopWordArray: string[]): void
    • Parameters

      • stopWordArray: string[]

      Returns void

stop_words_regexp

stop_words_regexp: RegExp

unmaskJSON

unmaskJSON: (json: any, isMaskValues?: boolean, isMaskNames?: boolean) => any

Type declaration

    • (json: any, isMaskValues?: boolean, isMaskNames?: boolean): any
    • Parameters

      • json: any
      • Optional isMaskValues: boolean
      • Optional isMaskNames: boolean

      Returns any

unmaskString

unmaskString: (str: string, computePositions?: boolean, detector?: RegExp) => string | Positions

Type declaration

    • (str: string, computePositions?: boolean, detector?: RegExp): string | Positions
    • Parameters

      • str: string
      • Optional computePositions: boolean
      • Optional detector: RegExp

      Returns string | Positions

Generated using TypeDoc