Module: Wapiti
- Defined in:
- lib/wapiti/log.rb,
lib/wapiti/model.rb,
lib/wapiti/token.rb,
lib/wapiti/errors.rb,
lib/wapiti/dataset.rb,
lib/wapiti/options.rb,
lib/wapiti/utility.rb,
lib/wapiti/version.rb,
lib/wapiti/sequence.rb
Defined Under Namespace
Modules: Native
Classes: Dataset, Error, Model, NativeError, Options, Sequence, Token
Constant Summary
collapse
- Logger =
::Logger.new(STDERR,
level: ENV['WAPITI_LOG_LEVEL'] || :error,
progname: 'wapiti',
formatter: proc { |level, time, name, msg|
"#{level} [#{time}] #{name}: #{msg}\n"
}
)
- VERSION =
'2.1.0'.freeze
Class Method Summary
collapse
Class Method Details
.debug! ⇒ Object
25
26
27
|
# File 'lib/wapiti/log.rb', line 25
def debug!
log.level = :debug
end
|
.load(model) ⇒ Object
9
10
11
|
# File 'lib/wapiti/utility.rb', line 9
def load(model)
Model.load(model)
end
|
.log ⇒ Object
13
14
15
|
# File 'lib/wapiti/log.rb', line 13
def log
Logger
end
|
.quiet! ⇒ Object
17
18
19
|
# File 'lib/wapiti/log.rb', line 17
def quiet!
log.level = :error
end
|
.train(data, options, &block) ⇒ Object
Creates a Model based on the pattern in the passed-in options and training data
supplied as input.
5
6
7
|
# File 'lib/wapiti/utility.rb', line 5
def train(data, options, &block)
Model.train(data, options, &block)
end
|
.verbose! ⇒ Object
21
22
23
|
# File 'lib/wapiti/log.rb', line 21
def verbose!
log.level = :info
end
|