Text this: Enhancing rare disease diagnosis: a weighted cosine similarity approach for improved k-nearest neighbor algorithm