grammar

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AnnotationGrammarLexerINTENT_NAME_START = 1
	AnnotationGrammarLexerOPEN_PAREN        = 2
	AnnotationGrammarLexerCLOSE_PAREN       = 3
	AnnotationGrammarLexerOPEN_SB           = 4
	AnnotationGrammarLexerCLOSE_SB          = 5
	AnnotationGrammarLexerWORD              = 6
	AnnotationGrammarLexerEND               = 7
	AnnotationGrammarLexerWHITESPACE        = 8
)

AnnotationGrammarLexer tokens.

View Source
const (
	AnnotationGrammarParserEOF               = antlr.TokenEOF
	AnnotationGrammarParserINTENT_NAME_START = 1
	AnnotationGrammarParserOPEN_PAREN        = 2
	AnnotationGrammarParserCLOSE_PAREN       = 3
	AnnotationGrammarParserOPEN_SB           = 4
	AnnotationGrammarParserCLOSE_SB          = 5
	AnnotationGrammarParserWORD              = 6
	AnnotationGrammarParserEND               = 7
	AnnotationGrammarParserWHITESPACE        = 8
)

AnnotationGrammarParser tokens.

View Source
const (
	AnnotationGrammarParserRULE_annotation   = 0
	AnnotationGrammarParserRULE_utterance    = 1
	AnnotationGrammarParserRULE_reply        = 2
	AnnotationGrammarParserRULE_text         = 3
	AnnotationGrammarParserRULE_entity       = 4
	AnnotationGrammarParserRULE_entity_value = 5
	AnnotationGrammarParserRULE_entity_name  = 6
	AnnotationGrammarParserRULE_intent_name  = 7
)

AnnotationGrammarParser rules.

View Source
const (
	IntentTagBeginning = "b"
	IntentTagInside    = "i"
	IntentTagOutside   = "o"
)

TODO: make these custom types

Variables

This section is empty.

Functions

This section is empty.

Types

type AnnotationContext

type AnnotationContext struct {
	*antlr.BaseParserRuleContext
	// contains filtered or unexported fields
}

func NewAnnotationContext

func NewAnnotationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *AnnotationContext

func NewEmptyAnnotationContext

func NewEmptyAnnotationContext() *AnnotationContext

func (*AnnotationContext) AllUtterance

func (s *AnnotationContext) AllUtterance() []IUtteranceContext

func (*AnnotationContext) EOF

func (*AnnotationContext) EnterRule

func (s *AnnotationContext) EnterRule(listener antlr.ParseTreeListener)

func (*AnnotationContext) ExitRule

func (s *AnnotationContext) ExitRule(listener antlr.ParseTreeListener)

func (*AnnotationContext) GetParser

func (s *AnnotationContext) GetParser() antlr.Parser

func (*AnnotationContext) GetRuleContext

func (s *AnnotationContext) GetRuleContext() antlr.RuleContext

func (*AnnotationContext) IsAnnotationContext

func (*AnnotationContext) IsAnnotationContext()

func (*AnnotationContext) ToStringTree

func (s *AnnotationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string

func (*AnnotationContext) Utterance

func (s *AnnotationContext) Utterance(i int) IUtteranceContext

type AnnotationGrammarLexer

type AnnotationGrammarLexer struct {
	*antlr.BaseLexer
	// contains filtered or unexported fields
}

func NewAnnotationGrammarLexer

func NewAnnotationGrammarLexer(input antlr.CharStream) *AnnotationGrammarLexer

type AnnotationGrammarListener

type AnnotationGrammarListener interface {
	antlr.ParseTreeListener

	// EnterAnnotation is called when entering the annotation production.
	EnterAnnotation(c *AnnotationContext)

	// EnterUtterance is called when entering the utterance production.
	EnterUtterance(c *UtteranceContext)

	// EnterReply is called when entering the reply production.
	EnterReply(c *ReplyContext)

	// EnterText is called when entering the text production.
	EnterText(c *TextContext)

	// EnterEntity is called when entering the entity production.
	EnterEntity(c *EntityContext)

	// EnterEntity_value is called when entering the entity_value production.
	EnterEntity_value(c *Entity_valueContext)

	// EnterEntity_name is called when entering the entity_name production.
	EnterEntity_name(c *Entity_nameContext)

	// EnterIntent_name is called when entering the intent_name production.
	EnterIntent_name(c *Intent_nameContext)

	// ExitAnnotation is called when exiting the annotation production.
	ExitAnnotation(c *AnnotationContext)

	// ExitUtterance is called when exiting the utterance production.
	ExitUtterance(c *UtteranceContext)

	// ExitReply is called when exiting the reply production.
	ExitReply(c *ReplyContext)

	// ExitText is called when exiting the text production.
	ExitText(c *TextContext)

	// ExitEntity is called when exiting the entity production.
	ExitEntity(c *EntityContext)

	// ExitEntity_value is called when exiting the entity_value production.
	ExitEntity_value(c *Entity_valueContext)

	// ExitEntity_name is called when exiting the entity_name production.
	ExitEntity_name(c *Entity_nameContext)

	// ExitIntent_name is called when exiting the intent_name production.
	ExitIntent_name(c *Intent_nameContext)
}

AnnotationGrammarListener is a complete listener for a parse tree produced by AnnotationGrammarParser.

type AnnotationGrammarParser

type AnnotationGrammarParser struct {
	*antlr.BaseParser
}

func NewAnnotationGrammarParser

func NewAnnotationGrammarParser(input antlr.TokenStream) *AnnotationGrammarParser

func (*AnnotationGrammarParser) Annotation

func (p *AnnotationGrammarParser) Annotation() (localctx IAnnotationContext)

func (*AnnotationGrammarParser) Entity

func (p *AnnotationGrammarParser) Entity() (localctx IEntityContext)

func (*AnnotationGrammarParser) Entity_name

func (p *AnnotationGrammarParser) Entity_name() (localctx IEntity_nameContext)

func (*AnnotationGrammarParser) Entity_value

func (p *AnnotationGrammarParser) Entity_value() (localctx IEntity_valueContext)

func (*AnnotationGrammarParser) Intent_name

func (p *AnnotationGrammarParser) Intent_name() (localctx IIntent_nameContext)

func (*AnnotationGrammarParser) Reply

func (p *AnnotationGrammarParser) Reply() (localctx IReplyContext)

func (*AnnotationGrammarParser) Text

func (p *AnnotationGrammarParser) Text() (localctx ITextContext)

func (*AnnotationGrammarParser) Utterance

func (p *AnnotationGrammarParser) Utterance() (localctx IUtteranceContext)

type BaseAnnotationGrammarListener

type BaseAnnotationGrammarListener struct{}

BaseAnnotationGrammarListener is a complete listener for a parse tree produced by AnnotationGrammarParser.

func (*BaseAnnotationGrammarListener) EnterAnnotation

func (s *BaseAnnotationGrammarListener) EnterAnnotation(ctx *AnnotationContext)

EnterAnnotation is called when production annotation is entered.

func (*BaseAnnotationGrammarListener) EnterEntity

func (s *BaseAnnotationGrammarListener) EnterEntity(ctx *EntityContext)

EnterEntity is called when production entity is entered.

func (*BaseAnnotationGrammarListener) EnterEntity_name

func (s *BaseAnnotationGrammarListener) EnterEntity_name(ctx *Entity_nameContext)

EnterEntity_name is called when production entity_name is entered.

func (*BaseAnnotationGrammarListener) EnterEntity_value

func (s *BaseAnnotationGrammarListener) EnterEntity_value(ctx *Entity_valueContext)

EnterEntity_value is called when production entity_value is entered.

func (*BaseAnnotationGrammarListener) EnterEveryRule

func (s *BaseAnnotationGrammarListener) EnterEveryRule(ctx antlr.ParserRuleContext)

EnterEveryRule is called when any rule is entered.

func (*BaseAnnotationGrammarListener) EnterIntent_name

func (s *BaseAnnotationGrammarListener) EnterIntent_name(ctx *Intent_nameContext)

EnterIntent_name is called when production intent_name is entered.

func (*BaseAnnotationGrammarListener) EnterReply

func (s *BaseAnnotationGrammarListener) EnterReply(ctx *ReplyContext)

EnterReply is called when production reply is entered.

func (*BaseAnnotationGrammarListener) EnterText

func (s *BaseAnnotationGrammarListener) EnterText(ctx *TextContext)

EnterText is called when production text is entered.

func (*BaseAnnotationGrammarListener) EnterUtterance

func (s *BaseAnnotationGrammarListener) EnterUtterance(ctx *UtteranceContext)

EnterUtterance is called when production utterance is entered.

func (*BaseAnnotationGrammarListener) ExitAnnotation

func (s *BaseAnnotationGrammarListener) ExitAnnotation(ctx *AnnotationContext)

ExitAnnotation is called when production annotation is exited.

func (*BaseAnnotationGrammarListener) ExitEntity

func (s *BaseAnnotationGrammarListener) ExitEntity(ctx *EntityContext)

ExitEntity is called when production entity is exited.

func (*BaseAnnotationGrammarListener) ExitEntity_name

func (s *BaseAnnotationGrammarListener) ExitEntity_name(ctx *Entity_nameContext)

ExitEntity_name is called when production entity_name is exited.

func (*BaseAnnotationGrammarListener) ExitEntity_value

func (s *BaseAnnotationGrammarListener) ExitEntity_value(ctx *Entity_valueContext)

ExitEntity_value is called when production entity_value is exited.

func (*BaseAnnotationGrammarListener) ExitEveryRule

ExitEveryRule is called when any rule is exited.

func (*BaseAnnotationGrammarListener) ExitIntent_name

func (s *BaseAnnotationGrammarListener) ExitIntent_name(ctx *Intent_nameContext)

ExitIntent_name is called when production intent_name is exited.

func (*BaseAnnotationGrammarListener) ExitReply

func (s *BaseAnnotationGrammarListener) ExitReply(ctx *ReplyContext)

ExitReply is called when production reply is exited.

func (*BaseAnnotationGrammarListener) ExitText

func (s *BaseAnnotationGrammarListener) ExitText(ctx *TextContext)

ExitText is called when production text is exited.

func (*BaseAnnotationGrammarListener) ExitUtterance

func (s *BaseAnnotationGrammarListener) ExitUtterance(ctx *UtteranceContext)

ExitUtterance is called when production utterance is exited.

func (*BaseAnnotationGrammarListener) VisitErrorNode

func (s *BaseAnnotationGrammarListener) VisitErrorNode(node antlr.ErrorNode)

VisitErrorNode is called when an error node is visited.

func (*BaseAnnotationGrammarListener) VisitTerminal

func (s *BaseAnnotationGrammarListener) VisitTerminal(node antlr.TerminalNode)

VisitTerminal is called when a terminal node is visited.

type EntityContext

type EntityContext struct {
	*antlr.BaseParserRuleContext
	// contains filtered or unexported fields
}

func NewEmptyEntityContext

func NewEmptyEntityContext() *EntityContext

func NewEntityContext

func NewEntityContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *EntityContext

func (*EntityContext) EnterRule

func (s *EntityContext) EnterRule(listener antlr.ParseTreeListener)

func (*EntityContext) Entity_name

func (s *EntityContext) Entity_name() IEntity_nameContext

func (*EntityContext) Entity_value

func (s *EntityContext) Entity_value() IEntity_valueContext

func (*EntityContext) ExitRule

func (s *EntityContext) ExitRule(listener antlr.ParseTreeListener)

func (*EntityContext) GetParser

func (s *EntityContext) GetParser() antlr.Parser

func (*EntityContext) GetRuleContext

func (s *EntityContext) GetRuleContext() antlr.RuleContext

func (*EntityContext) IsEntityContext

func (*EntityContext) IsEntityContext()

func (*EntityContext) ToStringTree

func (s *EntityContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string

type Entity_nameContext

type Entity_nameContext struct {
	*antlr.BaseParserRuleContext
	// contains filtered or unexported fields
}

func NewEmptyEntity_nameContext

func NewEmptyEntity_nameContext() *Entity_nameContext

func NewEntity_nameContext

func NewEntity_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Entity_nameContext

func (*Entity_nameContext) CLOSE_PAREN

func (s *Entity_nameContext) CLOSE_PAREN() antlr.TerminalNode

func (*Entity_nameContext) EnterRule

func (s *Entity_nameContext) EnterRule(listener antlr.ParseTreeListener)

func (*Entity_nameContext) ExitRule

func (s *Entity_nameContext) ExitRule(listener antlr.ParseTreeListener)

func (*Entity_nameContext) GetParser

func (s *Entity_nameContext) GetParser() antlr.Parser

func (*Entity_nameContext) GetRuleContext

func (s *Entity_nameContext) GetRuleContext() antlr.RuleContext

func (*Entity_nameContext) IsEntity_nameContext

func (*Entity_nameContext) IsEntity_nameContext()

func (*Entity_nameContext) OPEN_PAREN

func (s *Entity_nameContext) OPEN_PAREN() antlr.TerminalNode

func (*Entity_nameContext) ToStringTree

func (s *Entity_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string

func (*Entity_nameContext) WORD

type Entity_valueContext

type Entity_valueContext struct {
	*antlr.BaseParserRuleContext
	// contains filtered or unexported fields
}

func NewEmptyEntity_valueContext

func NewEmptyEntity_valueContext() *Entity_valueContext

func NewEntity_valueContext

func NewEntity_valueContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Entity_valueContext

func (*Entity_valueContext) CLOSE_SB

func (s *Entity_valueContext) CLOSE_SB() antlr.TerminalNode

func (*Entity_valueContext) EnterRule

func (s *Entity_valueContext) EnterRule(listener antlr.ParseTreeListener)

func (*Entity_valueContext) ExitRule

func (s *Entity_valueContext) ExitRule(listener antlr.ParseTreeListener)

func (*Entity_valueContext) GetParser

func (s *Entity_valueContext) GetParser() antlr.Parser

func (*Entity_valueContext) GetRuleContext

func (s *Entity_valueContext) GetRuleContext() antlr.RuleContext

func (*Entity_valueContext) IsEntity_valueContext

func (*Entity_valueContext) IsEntity_valueContext()

func (*Entity_valueContext) OPEN_SB

func (s *Entity_valueContext) OPEN_SB() antlr.TerminalNode

func (*Entity_valueContext) Text

func (*Entity_valueContext) ToStringTree

func (s *Entity_valueContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string

type IAnnotationContext

type IAnnotationContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsAnnotationContext differentiates from other interfaces.
	IsAnnotationContext()
}

IAnnotationContext is an interface to support dynamic dispatch.

type IEntityContext

type IEntityContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsEntityContext differentiates from other interfaces.
	IsEntityContext()
}

IEntityContext is an interface to support dynamic dispatch.

type IEntity_nameContext

type IEntity_nameContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsEntity_nameContext differentiates from other interfaces.
	IsEntity_nameContext()
}

IEntity_nameContext is an interface to support dynamic dispatch.

type IEntity_valueContext

type IEntity_valueContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsEntity_valueContext differentiates from other interfaces.
	IsEntity_valueContext()
}

IEntity_valueContext is an interface to support dynamic dispatch.

type IIntent_nameContext

type IIntent_nameContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsIntent_nameContext differentiates from other interfaces.
	IsIntent_nameContext()
}

IIntent_nameContext is an interface to support dynamic dispatch.

type IReplyContext

type IReplyContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsReplyContext differentiates from other interfaces.
	IsReplyContext()
}

IReplyContext is an interface to support dynamic dispatch.

type ITextContext

type ITextContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsTextContext differentiates from other interfaces.
	IsTextContext()
}

ITextContext is an interface to support dynamic dispatch.

type IUtteranceContext

type IUtteranceContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsUtteranceContext differentiates from other interfaces.
	IsUtteranceContext()
}

IUtteranceContext is an interface to support dynamic dispatch.

type Intent_nameContext

type Intent_nameContext struct {
	*antlr.BaseParserRuleContext
	// contains filtered or unexported fields
}

func NewEmptyIntent_nameContext

func NewEmptyIntent_nameContext() *Intent_nameContext

func NewIntent_nameContext

func NewIntent_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Intent_nameContext

func (*Intent_nameContext) AllWHITESPACE

func (s *Intent_nameContext) AllWHITESPACE() []antlr.TerminalNode

func (*Intent_nameContext) EnterRule

func (s *Intent_nameContext) EnterRule(listener antlr.ParseTreeListener)

func (*Intent_nameContext) ExitRule

func (s *Intent_nameContext) ExitRule(listener antlr.ParseTreeListener)

func (*Intent_nameContext) GetParser

func (s *Intent_nameContext) GetParser() antlr.Parser

func (*Intent_nameContext) GetRuleContext

func (s *Intent_nameContext) GetRuleContext() antlr.RuleContext

func (*Intent_nameContext) INTENT_NAME_START

func (s *Intent_nameContext) INTENT_NAME_START() antlr.TerminalNode

func (*Intent_nameContext) IsIntent_nameContext

func (*Intent_nameContext) IsIntent_nameContext()

func (*Intent_nameContext) ToStringTree

func (s *Intent_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string

func (*Intent_nameContext) WHITESPACE

func (s *Intent_nameContext) WHITESPACE(i int) antlr.TerminalNode

func (*Intent_nameContext) WORD

type NLUExampleErrorListener added in v0.2.2

type NLUExampleErrorListener struct {
	// contains filtered or unexported fields
}

func NewNLUExampleErrorListener added in v0.2.2

func NewNLUExampleErrorListener(bufSize uint16, verbose bool) *NLUExampleErrorListener

func (*NLUExampleErrorListener) Close added in v0.2.2

func (l *NLUExampleErrorListener) Close()

func (*NLUExampleErrorListener) Errors added in v0.2.2

func (l *NLUExampleErrorListener) Errors() <-chan ParseError

func (*NLUExampleErrorListener) ReportAmbiguity added in v0.2.2

func (l *NLUExampleErrorListener) ReportAmbiguity(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex int, exact bool, ambigAlts *antlr.BitSet, configs antlr.ATNConfigSet)

func (*NLUExampleErrorListener) ReportAttemptingFullContext added in v0.2.2

func (l *NLUExampleErrorListener) ReportAttemptingFullContext(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex int, conflictingAlts *antlr.BitSet, configs antlr.ATNConfigSet)

func (*NLUExampleErrorListener) ReportContextSensitivity added in v0.2.2

func (l *NLUExampleErrorListener) ReportContextSensitivity(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex, prediction int, configs antlr.ATNConfigSet)

func (*NLUExampleErrorListener) SyntaxError added in v0.2.2

func (l *NLUExampleErrorListener) SyntaxError(r antlr.Recognizer, sym interface{}, line, col int, msg string, e antlr.RecognitionException)

type NluRuleListener

type NluRuleListener struct {
	BaseAnnotationGrammarListener
	// contains filtered or unexported fields
}

func NewNluRuleListener

func NewNluRuleListener(bufSize uint16) *NluRuleListener

func (*NluRuleListener) Close

func (l *NluRuleListener) Close()

func (*NluRuleListener) EnterEntity

func (l *NluRuleListener) EnterEntity(c *EntityContext)

func (*NluRuleListener) EnterIntent_name

func (l *NluRuleListener) EnterIntent_name(c *Intent_nameContext)

func (*NluRuleListener) EnterText

func (l *NluRuleListener) EnterText(c *TextContext)

func (*NluRuleListener) ExitEntity

func (l *NluRuleListener) ExitEntity(c *EntityContext)

func (*NluRuleListener) ExitReply

func (l *NluRuleListener) ExitReply(c *ReplyContext)

func (*NluRuleListener) ExitUtterance

func (l *NluRuleListener) ExitUtterance(c *UtteranceContext)

func (*NluRuleListener) Utterances

func (l *NluRuleListener) Utterances() <-chan Utterance

type Node

type Node struct {
	Text      string `json:"text"`
	Entity    string `json:"entity"`
	Intent    string `json:"intent"`
	IntentBIO string `json:"intent_bio"`
}

type ParseError added in v0.2.2

type ParseError struct {
	// contains filtered or unexported fields
}

func NewParseError added in v0.2.2

func NewParseError(s string) ParseError

func (*ParseError) Append added in v0.2.2

func (p *ParseError) Append(e ParseError)

func (ParseError) Error added in v0.2.2

func (p ParseError) Error() string

func (ParseError) Len added in v0.2.2

func (p ParseError) Len() uint64

type ReplyContext

type ReplyContext struct {
	*antlr.BaseParserRuleContext
	// contains filtered or unexported fields
}

func NewEmptyReplyContext

func NewEmptyReplyContext() *ReplyContext

func NewReplyContext

func NewReplyContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ReplyContext

func (*ReplyContext) AllEntity

func (s *ReplyContext) AllEntity() []IEntityContext

func (*ReplyContext) AllText

func (s *ReplyContext) AllText() []ITextContext

func (*ReplyContext) AllWHITESPACE

func (s *ReplyContext) AllWHITESPACE() []antlr.TerminalNode

func (*ReplyContext) EnterRule

func (s *ReplyContext) EnterRule(listener antlr.ParseTreeListener)

func (*ReplyContext) Entity

func (s *ReplyContext) Entity(i int) IEntityContext

func (*ReplyContext) ExitRule

func (s *ReplyContext) ExitRule(listener antlr.ParseTreeListener)

func (*ReplyContext) GetParser

func (s *ReplyContext) GetParser() antlr.Parser

func (*ReplyContext) GetRuleContext

func (s *ReplyContext) GetRuleContext() antlr.RuleContext

func (*ReplyContext) Intent_name

func (s *ReplyContext) Intent_name() IIntent_nameContext

func (*ReplyContext) IsReplyContext

func (*ReplyContext) IsReplyContext()

func (*ReplyContext) Text

func (s *ReplyContext) Text(i int) ITextContext

func (*ReplyContext) ToStringTree

func (s *ReplyContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string

func (*ReplyContext) WHITESPACE

func (s *ReplyContext) WHITESPACE(i int) antlr.TerminalNode

type TextContext

type TextContext struct {
	*antlr.BaseParserRuleContext
	// contains filtered or unexported fields
}

func NewEmptyTextContext

func NewEmptyTextContext() *TextContext

func NewTextContext

func NewTextContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TextContext

func (*TextContext) AllWHITESPACE

func (s *TextContext) AllWHITESPACE() []antlr.TerminalNode

func (*TextContext) AllWORD

func (s *TextContext) AllWORD() []antlr.TerminalNode

func (*TextContext) EnterRule

func (s *TextContext) EnterRule(listener antlr.ParseTreeListener)

func (*TextContext) ExitRule

func (s *TextContext) ExitRule(listener antlr.ParseTreeListener)

func (*TextContext) GetParser

func (s *TextContext) GetParser() antlr.Parser

func (*TextContext) GetRuleContext

func (s *TextContext) GetRuleContext() antlr.RuleContext

func (*TextContext) IsTextContext

func (*TextContext) IsTextContext()

func (*TextContext) ToStringTree

func (s *TextContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string

func (*TextContext) WHITESPACE

func (s *TextContext) WHITESPACE(i int) antlr.TerminalNode

func (*TextContext) WORD

func (s *TextContext) WORD(i int) antlr.TerminalNode

type Utterance

type Utterance struct {
	Nodes     []Node `json:"parsed"`
	Entity    string `json:"-"`
	Intent    string `json:"-"`
	IntentBIO string `json:"-"`
}

func NewUtterance

func NewUtterance() Utterance

type UtteranceContext

type UtteranceContext struct {
	*antlr.BaseParserRuleContext
	// contains filtered or unexported fields
}

func NewEmptyUtteranceContext

func NewEmptyUtteranceContext() *UtteranceContext

func NewUtteranceContext

func NewUtteranceContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *UtteranceContext

func (*UtteranceContext) AllEND

func (s *UtteranceContext) AllEND() []antlr.TerminalNode

func (*UtteranceContext) AllReply

func (s *UtteranceContext) AllReply() []IReplyContext

func (*UtteranceContext) END

func (*UtteranceContext) EnterRule

func (s *UtteranceContext) EnterRule(listener antlr.ParseTreeListener)

func (*UtteranceContext) ExitRule

func (s *UtteranceContext) ExitRule(listener antlr.ParseTreeListener)

func (*UtteranceContext) GetParser

func (s *UtteranceContext) GetParser() antlr.Parser

func (*UtteranceContext) GetRuleContext

func (s *UtteranceContext) GetRuleContext() antlr.RuleContext

func (*UtteranceContext) IsUtteranceContext

func (*UtteranceContext) IsUtteranceContext()

func (*UtteranceContext) Reply

func (s *UtteranceContext) Reply(i int) IReplyContext

func (*UtteranceContext) ToStringTree

func (s *UtteranceContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL