Skip to content

Commit

Permalink
fix for #37
Browse files Browse the repository at this point in the history
  • Loading branch information
alexskr committed Nov 18, 2024
1 parent f19ff20 commit 2abcd54
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/ncbo_annotator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2abcd54

Please sign in to comment.