Skip to content

Commit

Permalink
Logging diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
isc-lperezra committed Dec 23, 2024
1 parent 5229282 commit abfd167
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/ENCODER/BP/AnalyzeTextProcess.cls
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Method AnalyzeText(text As %String, analysisId As %String, language As %String)
sqlsentence = ""
# iris.cls("Ens.Util.Log").LogInfo("ENCODER.BP.AnalyzeTextProcess", "AnalyzeText", "Starting process")
for phraseToAnalyze in phrases :
iris.cls("Ens.Util.Log").LogInfo("ENCODER.BP.AnalyzeTextProcess", "AnalyzeText", phraseToAnalyze)
if phraseToAnalyze != "":
embedding = model.encode(phraseToAnalyze, normalize_embeddings=True).tolist()
sqlsentence = "INSERT INTO ENCODER_Object.TextMatches (CodeId, Description, Similarity, AnalysisId, RawText) SELECT TOP 50 * FROM (SELECT CodeId, Description, VECTOR_DOT_PRODUCT(VectorDescription, TO_VECTOR('"+str(embedding)+"', DECIMAL)) AS Similarity, '"+analysisId+"', '"+phraseToAnalyze+"' FROM ENCODER_Object.Codes) ORDER BY Similarity DESC"
Expand Down

0 comments on commit abfd167

Please sign in to comment.