vsdk 7.3.2
 
Loading...
Searching...
No Matches
Vsdk::Nlu::Parserabstract

Process text into intent and entities using Natural Language Understanding techniques. More...

#include <Parser.hpp>

Inheritance diagram for Vsdk::Nlu::Parser:

Public Member Functions

virtual ~Parser ()=default
 
auto name () const -> std::string const &
 Name of this particular Parser instance.
 
virtual void process (std::string const &text)=0
 Parse text into an intent / entities result.
 

Protected Member Functions

 Parser (std::string name) noexcept
 
virtual void configure (nlohmann::json const &)
 
void dispatchEvent (EventCode code, std::string message, std::chrono::milliseconds time)
 
void dispatchError (ErrorType type, ErrorCode code, std::string message=std::string())
 

Protected Attributes

std::string _name
 

Detailed Description

Process text into intent and entities using Natural Language Understanding techniques.

Constructor & Destructor Documentation

◆ Parser()

Parser::Parser ( std::string  name)
explicitprotectednoexcept

◆ ~Parser()

virtual Vsdk::Nlu::Parser::~Parser ( )
virtualdefault

Member Function Documentation

◆ name()

auto Parser::name ( ) const -> std::string const &

Name of this particular Parser instance.

◆ process()

virtual void Vsdk::Nlu::Parser::process ( std::string const &  text)
pure virtual

Parse text into an intent / entities result.

Parameters
textThe text you want to process
Note
The result will be gicen through the result callback installed (using the subscribe function) on this particular parser

◆ configure()

virtual void Vsdk::Nlu::Parser::configure ( nlohmann::json const &  )
protectedvirtual

◆ dispatchEvent()

void Parser::dispatchEvent ( EventCode  code,
std::string  message,
std::chrono::milliseconds  time 
)
protected

◆ dispatchError()

void Parser::dispatchError ( ErrorType  type,
ErrorCode  code,
std::string  message = std::string() 
)
protected

Member Data Documentation

◆ _name

std::string Vsdk::Nlu::Parser::_name
protected