Skip to content

Commit

Permalink
save correction
Browse files Browse the repository at this point in the history
  • Loading branch information
ofilangi committed Sep 20, 2024
1 parent ab8157f commit 364a7ba
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 11 deletions.
8 changes: 4 additions & 4 deletions config/1-article.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@
}
},
"mesh_link" : {
"mesh" : {
"url": "https://nlmpubs.nlm.nih.gov/projects/mesh/rdf/mesh.nt",
"mesh": {
"filepath" : "data/mesh/2024.ttl",
"prefix": "http://id.nlm.nih.gov/mesh/",
"format": "nt",
"format": "turtle",
"label" : "<http://www.w3.org/2000/01/rdf-schema#label>",
"properties": ["<http://id.nlm.nih.gov/mesh/vocab#scopeNote>"]
"properties": ["<http://www.w3.org/2000/01/rdf-schema#comment>"]
}
},
"chemical_link" : {
Expand Down
2 changes: 1 addition & 1 deletion config/igepp.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"encodeur" : "sentence-transformers/all-MiniLM-L6-v2",
"threshold_similarity_tag_chunk" : 0.65,
"threshold_similarity_tag" : 0.75,
"threshold_similarity_tag" : 0.85,
"batch_size" : 32,

"populate_owl_tag_embeddings" : {
Expand Down
2 changes: 1 addition & 1 deletion config/mesh_example.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"encodeur" : "sentence-transformers/all-MiniLM-L6-v2",
"threshold_similarity_tag_chunk" : 0.65,
"threshold_similarity_tag_chunk" : 0.40,
"threshold_similarity_tag" : 0.80,
"batch_size" : 32,

Expand Down
38 changes: 33 additions & 5 deletions exec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,41 @@ run_command() {
"$@"
local status=$?
if [ $status -ne 0 ]; then
echo "Erreur: La commande '$*' a échoué avec le code de sortie $status"
echo "Error: The command '$*' failed with exit code $status"
exit $status
fi
}

run_command python -m llm_semantic_annotator "$conffile" populate_owl_tag_embeddings
run_command python -m llm_semantic_annotator "$conffile" populate_ncbi_taxon_tag_embeddings
run_command python -m llm_semantic_annotator "$conffile" populate_abstract_embeddings
run_command python -m llm_semantic_annotator "$conffile" compute_tag_chunk_similarities
execute_command() {
case $1 in
1) run_command python -m llm_semantic_annotator "$conffile" populate_owl_tag_embeddings ;;
2) run_command python -m llm_semantic_annotator "$conffile" populate_ncbi_taxon_tag_embeddings ;;
3) run_command python -m llm_semantic_annotator "$conffile" populate_abstract_embeddings ;;
4) run_command python -m llm_semantic_annotator "$conffile" compute_tag_chunk_similarities ;;
*) echo "Invalid option" ;;
esac
}

echo "What would you like to execute?"
echo "1. Full workflow"
echo "2. populate_owl_tag_embeddings"
echo "3. populate_ncbi_taxon_tag_embeddings"
echo "4. populate_abstract_embeddings"
echo "5. compute_tag_chunk_similarities"
read -p "Enter your choice (1-5): " choice

case $choice in
1)
run_command python -m llm_semantic_annotator "$conffile" populate_owl_tag_embeddings
run_command python -m llm_semantic_annotator "$conffile" populate_ncbi_taxon_tag_embeddings
run_command python -m llm_semantic_annotator "$conffile" populate_abstract_embeddings
run_command python -m llm_semantic_annotator "$conffile" compute_tag_chunk_similarities
;;
2|3|4|5)
execute_command $((choice - 1))
;;
*)
echo "Invalid choice"
exit 1
;;
esac

0 comments on commit 364a7ba

Please sign in to comment.