13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/rbbt/ner/linnaeus.rb', line 13
def self.init
begin
@@ArgParser = Rjb::import('martin.common.ArgParser')
@@Args = @@ArgParser.new(ARGS)
@@Loggers = Rjb::import('martin.common.Loggers')
@@Logger = @@Loggers.getDefaultLogger(@@Args)
@@EntityTagger = Rjb::import('uk.ac.man.entitytagger.EntityTagger')
@@Matcher = @@EntityTagger.getMatcher(@@Args, @@Logger)
rescue
if $!.message =~ /heap space/i
Log.warn "Heap Space seems too low. Make sure Linnaeus is loaded before other Java wrappers so that it has the chance to init the Java Bridge with sufficient heap space"
end
raise $!
end
end
|