Skip to content

Commit 1b4f613

Browse files
committed
♻️ cosmetic code refactoring
1 parent 02a858b commit 1b4f613

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

ontoaligner/aligner/retrieval/retrieval.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2025 Scientific Knowledge Organization (SciKnowOrg) Research Group.
1+
# Copyright 2025 Scientific Knowledge Organization (SciKnowOrg) Research Group.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -311,15 +311,7 @@ def generate(self, input_data: List) -> List:
311311
queries_embedding = self.transform(inputs=[source["text"] for source in source_ontology])
312312
queries_embedding = queries_embedding / np.sqrt((queries_embedding**2).sum(1, keepdims=True))
313313

314-
# q_len = len(source_ontology)
315314
c_len = len(target_ontology)
316-
# dim = queries_embedding.shape[1]
317-
# y = np.zeros(q_len+c_len)
318-
# y[0:q_len] = 1
319-
# x = np.concatenate([queries_embedding, candidates_embedding])
320-
# clf = svm.LinearSVC(class_weight='balanced', verbose=False, max_iter=10000, tol=1e-6, C=0.1)
321-
# clf.fit(x, y)
322-
# estimated_similarity = cosine_similarity(queries_embedding, candidates_embedding)
323315

324316
for source_id, query_embed in tqdm(enumerate(queries_embedding)):
325317
x = np.concatenate([[query_embed], candidates_embedding])

0 commit comments

Comments
 (0)