From 2abcd54c148d0983570d681506002d9d3782d2eb Mon Sep 17 00:00:00 2001 From: Alex Skrenchuk Date: Mon, 18 Nov 2024 13:14:05 -0800 Subject: [PATCH] fix for #37 --- lib/ncbo_annotator.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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