Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
Upgrading ConText component to FastContext within NCBO annotatorplus …
Browse files Browse the repository at this point in the history
…UI (cf. annotators issue ontoportal#28 : ontoportal-lirmm/annotators#28).

Fixing FastContext checkbox label within annotator UI.
  • Loading branch information
Jérôme Lamarque committed Apr 22, 2020
1 parent f83fda5 commit 0eec9a7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 18 deletions.
8 changes: 2 additions & 6 deletions app/controllers/ncbo_annotatorplus_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ def create
:exclude_numbers => params[:exclude_numbers] ||= "false", # service default is false
:whole_word_only => params[:whole_word_only] ||= "true", # service default is true
:exclude_synonyms => params[:exclude_synonyms] ||= "false", # service default is false
:negation => params[:negation] ||= "false", # service default is false
:experiencer => params[:experiencer] ||= "false", # service default is false
:temporality => params[:temporality] ||= "false", # service default is false
:fast_context => params[:fast_context] ||= "false", # service default is false
:score => params[:score],
:score_threshold => params[:score_threshold] ||=-1,
:confidence_threshold => params[:confidence_threshold] ||=-1,
Expand All @@ -63,9 +61,7 @@ def create
query += "&score=" + options[:score] unless options[:score] == ""
query += "&score_threshold=" + options[:score_threshold] unless options[:score] == "" or options[:score_threshold]==-1
query += "&confidence_threshold=" + options[:confidence_threshold] unless options[:score] == "" or options[:confidence_threshold]==-1
query += "&negation=" + options[:negation] unless options[:negation].empty?
query += "&experiencer=" + options[:experiencer] unless options[:experiencer].empty?
query += "&temporality=" + options[:temporality] unless options[:temporality].empty?
query += "&fast_context=" + options[:fast_context] unless options[:fast_context].empty?
query += "&ontologies=" + CGI.escape(options[:ontologies].join(',')) unless options[:ontologies].empty?
query += "&semantic_types=" + options[:semantic_types].join(',') unless options[:semantic_types].empty?
query += "&semantic_groups=" + options[:semantic_groups].join(',') unless options[:semantic_groups].empty?
Expand Down
2 changes: 1 addition & 1 deletion app/views/annotator/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
- faxt_context_tooltip = "Enable FastContext to detect : if a concept has been negated (affirmed, negated), who experienced the found concept (patient, other), when the annotated concept occurred (recent, historical, hypothetical), and/or if the annotated concept is uncertain (certain, uncertain)"
%p{title: faxt_context_tooltip, style: ""}
= check_box_tag :fast_context, :all, false, :id => "fast_context"
= label_tag :fast_context, "Enable/disable FastContext"
= label_tag :fast_context, "Enable FastContext"
= help_icon("/annotator", {:title => faxt_context_tooltip}).html_safe

%div
Expand Down
19 changes: 8 additions & 11 deletions app/views/ncbo_annotatorplus/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,15 @@
= check_box_tag :exclude_synonyms, :all, false, :id => "exclude_synonyms"
= label_tag :exclude_synonyms, "Exclude Synonyms"

%div{:class => "panel panel-primary", :style => "width: 17em; display: inline-block; vertical-align: top; height: 256px;"}
%div{:class => "panel panel-primary", :style => "width: 20em; display: inline-block; vertical-align: top;"}
%div{:class => "panel-heading"}
%h3{:class => "panel-title"} NegEx / ConText
%h3{:class => "panel-title"} FastContext
%div{:class => "panel-body"}
%p{title: "Detect if a concept has been negated (affirmed, negated, possible)", style: "margin-top: 40px;"}
= check_box_tag :negation, :all, false, :id => "negation"
= label_tag :negation, "Detect negation"
%p{title: "Detect who experienced the found concept (patient, other)"}
= check_box_tag :experiencer, :all, false, :id => "experiencer"
= label_tag :experiencer, "Detect experiencer"
%p{title: "Detect when the annotated concept occurred (recent, historical, hypothetical)"}
= check_box_tag :temporality, :all, false, :id => "temporality"
= label_tag :temporality, "Detect temporality"
- faxt_context_tooltip = "Enable FastContext to detect : if a concept has been negated (affirmed, negated), who experienced the found concept (patient, other), when the annotated concept occurred (recent, historical, hypothetical), and/or if the annotated concept is uncertain (certain, uncertain)"
%p{title: faxt_context_tooltip, style: ""}
= check_box_tag :fast_context, :all, false, :id => "fast_context"
= label_tag :fast_context, "Enable FastContext"
= help_icon("/annotator", {:title => faxt_context_tooltip}).html_safe

%div
%b Ancestors Level:
Expand Down Expand Up @@ -148,6 +144,7 @@
%th Negation
%th Experiencer
%th Temporality
%th Certainty
%tbody
#download_links{:style => "margin-top: 1.5em;"}
%p
Expand Down

0 comments on commit 0eec9a7

Please sign in to comment.