forked from ontoportal/ontologies_api
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #167 from ncbo/develop
Develop to Master merge, release v5.33.0
- Loading branch information
Showing
32 changed files
with
238 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
API_URL=http://localhost:9393 | ||
ONTOLOGIES_LINKED_DATA_PATH= | ||
GOO_PATH= | ||
SPARQL_CLIENT_PATH= | ||
ONTOPORTAL_KB=ontoportal_kb | ||
REDIS_HOST=redis-ut |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,10 @@ | ||
class RecommenderController < ApplicationController | ||
namespace "/recommender_v1" do | ||
|
||
# execute an annotator query | ||
# Mark this route as deprecated | ||
get do | ||
text = params["text"] | ||
raise error 400, "A text to be analyzed by the recommender must be supplied using the argument text=<text>" if text.nil? || text.strip.empty? | ||
acronyms = restricted_ontologies_to_acronyms(params) | ||
display_classes = params['display_classes'].eql?('true') # default will be false | ||
recommender = Recommender::Models::NcboRecommender.new | ||
recommendations = recommender.recommend(text, acronyms, display_classes) | ||
reply 200, recommendations | ||
reply 410, { message: "This API endpoint has been deprecated and is no longer available. Please use /recommender or refer to the API documentation for updated routes." } | ||
end | ||
|
||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.