Skip to content

Commit

Permalink
fix annotator after updating RDF version to 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Feb 28, 2024
1 parent 9af92c0 commit 7cc7fd5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ GEM

PLATFORMS
x86_64-darwin-23
x86_64-linux

DEPENDENCIES
addressable (~> 2.8.0)
Expand Down
6 changes: 4 additions & 2 deletions lib/ncbo_annotator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -733,11 +733,13 @@ 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 = val.dup.upcase
rescue ArgumentError => e
binding.pry
val = val.dup
# NCBO-832 - SCTSPA Annotator Cache building error (UTF-8)
val = val.encode('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: '')
val.upcase!()
val = val.upcase
end

# exclude single-character or empty/null values
Expand Down

0 comments on commit 7cc7fd5

Please sign in to comment.