Extracting meaningful information from EHRs and EC is essential for predicting clinical trial outcomes and improving patient care. However, the text-based nature of these data sources makes it challenging to analyze and extract useful information. Clinical text embedding, which involves transforming the raw data into a more structured and meaningful format, can help to address this challenge. By learning to recognize patterns and relationships between words and phrases, representation learning algorithms can generate high-quality representations that capture the essential information in the data.