Skip to content

Openconceptlab/ocl_issues#2505 | Fix US/British spelling mismatch in semantic concept search#868

Open
snyaggarwal wants to merge 1 commit intomasterfrom
issues#2505
Open

Openconceptlab/ocl_issues#2505 | Fix US/British spelling mismatch in semantic concept search#868
snyaggarwal wants to merge 1 commit intomasterfrom
issues#2505

Conversation

@snyaggarwal
Copy link
Copy Markdown
Contributor

Adds get_spelling_variant() to generate US<->British spelling alternatives (leukemia/leukaemia, haem/hem, paed/ped, oedema/edema, -our/-or, -ise/-ize, etc.). In semantic search, additional kNN sub-queries are fired using the variant's embedding so that e.g. querying "leukemia" still retrieves "leukaemia" concepts when the index is large enough to push them out of the default top-50 candidates. The rescore query is also expanded to boost exact matches of either spelling, and a pre-existing crash risk (empty should-clause when no synonyms are provided) is fixed.

Linked Issue

Closes OpenConceptLab/ocl_issues#2505

Adds get_spelling_variant() to generate US<->British spelling alternatives
(leukemia/leukaemia, haem/hem, paed/ped, oedema/edema, -our/-or, -ise/-ize,
etc.). In semantic search, additional kNN sub-queries are fired using the
variant's embedding so that e.g. querying "leukemia" still retrieves
"leukaemia" concepts when the index is large enough to push them out of the
default top-50 candidates. The rescore query is also expanded to boost exact
matches of either spelling, and a pre-existing crash risk (empty should-clause
when no synonyms are provided) is fixed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@snyaggarwal snyaggarwal requested a review from paynejd May 7, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OCL Mapper name matching issues — exact CIEL bridge text and British English

1 participant