No commit activity in last 3 years
No release in over 3 years
A botbase module plugin which matched a verbose command with a known alias command from a lookup file.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1.7, >= 1.7.26
 Project Readme

Introducing the botbase-module-alias gem

Testing the botbase module

require 'botbase-module-alias'


class DummyBot

  def received(msg, mode: nil, echo_node: nil)
    puts 'received: ' + msg
  end
end

dummy = DummyBot.new
bma = BotBaseModuleAlias.new aliases: '/home/james/jamesrobertson.eu/qbx/r/speech_alias.txt', callback: dummy
r = bma.query 'create a new password'
#=> received: lpa

file (speech_alias.txt):

<?dynarex schema="keywords[title, tags]/keyword(title, aliasname, hashtags)"?>
title: Speech alias
tags: alias speech verbose phrase
--+


t: ^create a new password$
a: lpa
h: password

t: ^create a random word$
a: rwo
h: password

In the code snippet above the botbase-module-alias gem queries a lookfile for a matching phrase and returns the associated alias command. Alias commands are convenient to type from the command-line, however with speech recognition it is easier to say the verbose command.

Resources

botbase plugin alias aliases