Module: Charyf::Generators::Defaults

Extended by:
Defaults
Included in:
Defaults
Defined in:
lib/charyf/utils/generators/defaults.rb

Constant Summary collapse

SETTINGS =
{
    storage: 'memory',
    intents: ['adapt']
}
STORAGE_PROVIDERS =
{
    memory: {
        gem: 'charyf-memory-storage',
        gem_version: ['>= 0.1'],
        require: 'charyf/memory_storage',
        desc: <<-EOM
Memory storage does not provide permanent storage as the contract may require
but delivers enough capabilities for development and testing.
Should not be used on production environments as it is not persisted.
        EOM
    }
}
INTENT_PROCESSORS =
{
    adapt: {
        gem: 'adapt-charyf',
        gem_version: ['>= 0.3'],
        require: 'adapt-charyf',
        desc: <<-EOM
Ruby wrapper around python library from mycroft [adapt]. Works offline.
It uses building blocks as regexps or small expressions to define and determine intents.
see more at: https://github.com/Charyf/charyf-adapt-processor
        EOM
    },
    wit: {
        gem: 'witai-charyf',
        gem_version: ['>= 0.2'],
        require: 'witai/charyf',
        desc: <<-EOM
Charyf wrapper around WIT.ai service. Utilizes powerful NLP (works online as service).
Supports builtin entity tagging like datetimes, amounts, locations and more.
        EOM
    }
}

Instance Method Summary collapse

Instance Method Details

#intents_descObject



46
47
48
49
50
51
52
53
54
# File 'lib/charyf/utils/generators/defaults.rb', line 46

def intents_desc
  desc = "\n"
  desc << "Here is a list of currently available and supported intent processors, \nthat can be enabled during installation"
  desc << "\nIf your processor isn't listed here, you can change it later in your project settings"

  desc << desc(INTENT_PROCESSORS)

  "\t" + desc.gsub("\n", "\n\t")
end

#storage_descObject



56
57
58
59
60
61
62
63
64
65
66
# File 'lib/charyf/utils/generators/defaults.rb', line 56

def storage_desc
  desc = "\n"
  desc << "Here is a list of currently available and supported storage providers, \nthat can be enabled during installation"
  desc << "\nIf your provider  isn't listed here, you can change it later in your project settings"

  desc << desc(STORAGE_PROVIDERS)

  desc

  "\t" + desc.gsub("\n", "\n\t")
end