Skip to content

Commit 9b6a920

Browse files
committed
Deploying to gh-pages from @ 240f723 🚀
1 parent 9a0c118 commit 9b6a920

51 files changed

Lines changed: 239 additions & 64 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

404.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSE-text.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSE.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

articles/getting-started.html

Lines changed: 70 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

articles/getting-started.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,77 @@ results <- client$search$basic(
101101
)
102102
```
103103

104+
## Semantic Search
105+
106+
Search using natural language queries powered by neural embeddings:
107+
108+
``` r
109+
# Natural language search - understands clinical intent
110+
results <- client$search$semantic("high blood sugar levels")
111+
for (r in results$data$results) {
112+
cat(sprintf("%s (similarity: %.2f)\n", r$concept_name, r$similarity_score))
113+
}
114+
```
115+
116+
Filter semantic search results:
117+
118+
``` r
119+
results <- client$search$semantic(
120+
"heart attack",
121+
vocabulary_ids = "SNOMED",
122+
domain_ids = "Condition",
123+
threshold = 0.5
124+
)
125+
```
126+
127+
Fetch all semantic search results with automatic pagination:
128+
129+
``` r
130+
all_results <- client$search$semantic_all(
131+
"chronic kidney disease",
132+
page_size = 50,
133+
max_pages = 5,
134+
progress = TRUE
135+
)
136+
print(nrow(all_results))
137+
```
138+
139+
## Similarity Search
140+
141+
Find concepts similar to a reference concept:
142+
143+
``` r
144+
# Find concepts similar to Type 2 diabetes mellitus
145+
similar <- client$search$similar(concept_id = 201826)
146+
for (s in similar$similar_concepts) {
147+
cat(sprintf("%s (score: %.2f)\n", s$concept_name, s$similarity_score))
148+
}
149+
```
150+
151+
Search by natural language query with different algorithms:
152+
153+
``` r
154+
# Semantic similarity (neural embeddings)
155+
similar <- client$search$similar(
156+
query = "high blood pressure",
157+
algorithm = "semantic"
158+
)
159+
160+
# Lexical similarity (string matching)
161+
similar <- client$search$similar(
162+
query = "high blood pressure",
163+
algorithm = "lexical"
164+
)
165+
166+
# Hybrid (combined - default)
167+
similar <- client$search$similar(
168+
query = "high blood pressure",
169+
algorithm = "hybrid",
170+
include_scores = TRUE,
171+
include_explanations = TRUE
172+
)
173+
```
174+
104175
## Autocomplete
105176

106177
Get suggestions for autocomplete:

articles/index.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

authors.html

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

authors.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ Source:
1313
[`DESCRIPTION`](https://github.com/omopHub/omophub-R/blob/main/DESCRIPTION)
1414

1515
Chen A (2026). *omophub: R Client for the 'OMOPHub' Medical Vocabulary
16-
API*. R package version 1.3.0, <https://github.com/omopHub/omophub-R>.
16+
API*. R package version 1.4.0, <https://github.com/omopHub/omophub-R>.
1717

1818
@Manual{,
1919
title = {omophub: R Client for the 'OMOPHub' Medical Vocabulary API},
2020
author = {Alex Chen},
2121
year = {2026},
22-
note = {R package version 1.3.0},
22+
note = {R package version 1.4.0},
2323
url = {https://github.com/omopHub/omophub-R},
2424
}

index.html

Lines changed: 11 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ results <- client$search$semantic(
112112

113113
# Fetch all results with auto-pagination
114114
all_results <- client$search$semantic_all("chronic kidney disease", page_size = 50)
115+
116+
# Find concepts similar to a reference concept
117+
similar <- client$search$similar(concept_id = 201826, algorithm = "hybrid")
118+
for (s in similar$similar_concepts) {
119+
cat(sprintf("%s (score: %.2f)\n", s$concept_name, s$similarity_score))
120+
}
115121
```
116122

117123
## Use Cases
@@ -201,7 +207,7 @@ concepts_df %>%
201207
| Resource | Description | Key Methods |
202208
|----------------|-------------------------------------|--------------------------------------------------------------------------------------------------------|
203209
| `concepts` | Concept lookup and batch operations | [`get()`](https://rdrr.io/r/base/get.html), `get_by_code()`, `batch()`, `suggest()` |
204-
| `search` | Full-text and semantic search | `basic()`, `advanced()`, `semantic()`, `semantic_all()`, `basic_all()` |
210+
| `search` | Full-text and semantic search | `basic()`, `advanced()`, `semantic()`, `semantic_all()`, `similar()`, `basic_all()` |
205211
| `hierarchy` | Navigate concept relationships | `ancestors()`, `descendants()` |
206212
| `mappings` | Cross-vocabulary mappings | [`get()`](https://rdrr.io/r/base/get.html), [`map()`](https://purrr.tidyverse.org/reference/map.html) |
207213
| `vocabularies` | Vocabulary metadata | [`list()`](https://rdrr.io/r/base/list.html), [`get()`](https://rdrr.io/r/base/get.html), `stats()` |

0 commit comments

Comments
 (0)