Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type QuestionDetection ¶
type QuestionDetection int
QuestionDetection type of message detection.
const ( // QuestionBoth ignores if the message is a question or not QuestionBoth QuestionDetection = iota // QuestionOnly only detect if sentence ends with a question mark QuestionOnly // QuestionNo only detect if sentence doesn't end with a question mark QuestionNo )
type SentenceDetector ¶
type SentenceDetector struct { Question QuestionDetection Groups []WordGroup Variants []SentenceDetector }
SentenceDetector criteria for specific sentence detection.
func (*SentenceDetector) Detect ¶
func (d *SentenceDetector) Detect(sentence string) bool
Detect if the given sentence matches the criteria of the SentenceDetector.
Click to show internal directories.
Click to hide internal directories.