diff --git a/lib/ncbo_annotator.rb b/lib/ncbo_annotator.rb index 3fbbae28..5f69c43f 100644 --- a/lib/ncbo_annotator.rb +++ b/lib/ncbo_annotator.rb @@ -339,7 +339,7 @@ def create_term_cache_for_submission(logger, sub, redis=nil, redis_prefix=nil) resourceId, Annotator::Annotation::MATCH_TYPES[:type_synonym], syn, - semanticTypes) unless (syn.casecmp(prefLabel) == 0) + semanticTypes) unless (syn.to_s.casecmp(prefLabel) == 0) end create_term_entry(redis, redis_prefix, @@ -661,11 +661,11 @@ def redis_last_mgrep_restart_default_timestamp() def create_term_entry(redis, instance_prefix, ontResourceId, resourceId, label_type, val, semanticTypes) begin # NCBO-696 - Remove case-sensitive variations on terms in annotator dictionary - val.upcase!() + val.to_s.upcase!() rescue ArgumentError => e # NCBO-832 - SCTSPA Annotator Cache building error (UTF-8) val = val.encode('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: '') - val.upcase!() + val.to_s.upcase!() end # exclude single-character or empty/null values