From 732332a3c5dab44d651a09f449342181dbcc7a50 Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Mon, 24 Jun 2024 12:50:33 +0530 Subject: [PATCH] Spell fix s/e.g/e.g./ across code, tests and docs --- docker-compose.yml | 3 ++- documentation/docs/clients/emacs.md | 6 +++--- documentation/docs/clients/obsidian.md | 2 +- documentation/docs/miscellaneous/performance.md | 2 +- src/interface/obsidian/src/utils.ts | 2 +- src/khoj/database/models/__init__.py | 2 +- src/khoj/search_filter/date_filter.py | 4 ++-- src/khoj/utils/helpers.py | 2 +- tests/conftest.py | 6 +++--- tests/data/org/interface_emacs_readme.org | 6 +++--- 10 files changed, 18 insertions(+), 17 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 87b7acb3..acb5f896 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -45,7 +45,8 @@ services: - KHOJ_DEBUG=False - KHOJ_ADMIN_EMAIL=username@example.com - KHOJ_ADMIN_PASSWORD=password - # Uncomment the following lines to make your instance publicly accessible. Replace the domain with your domain. Proceed with caution, especially if you are using anonymous mode. + # Uncomment the following lines to make your instance publicly accessible. + # Replace the domain with your domain. Proceed with caution, especially if you are using anonymous mode. # - KHOJ_NO_HTTPS=True # - KHOJ_DOMAIN=192.168.0.104 command: --host="0.0.0.0" --port=42110 -vv --anonymous-mode diff --git a/documentation/docs/clients/emacs.md b/documentation/docs/clients/emacs.md index 7ce8e023..3252c598 100644 --- a/documentation/docs/clients/emacs.md +++ b/documentation/docs/clients/emacs.md @@ -90,13 +90,13 @@ M-x package-install khoj See [Khoj Search](/features/search) for details 1. Hit `C-c s s` (or `M-x khoj RET s`) to open khoj search 2. Enter your query in natural language
- E.g *"What is the meaning of life?"*, *"My life goals for 2023"* + E.g. *"What is the meaning of life?"*, *"My life goals for 2023"* ### Chat See [Khoj Chat](/features/chat) for details 1. Hit `C-c s c` (or `M-x khoj RET c`) to open khoj chat 2. Ask questions in a natural, conversational style
- E.g *"When did I file my taxes last year?"* + E.g. *"When did I file my taxes last year?"* ### Find Similar Entries This feature finds entries similar to the one you are currently on. @@ -105,7 +105,7 @@ This feature finds entries similar to the one you are currently on. ### Advanced Usage - Add [query filters](https://github.com/khoj-ai/khoj/#query-filters) during search to narrow down results further - e.g `What is the meaning of life? -"god" +"none" dt>"last week"` + e.g. `What is the meaning of life? -"god" +"none" dt>"last week"` - Use `C-c C-o 2` to open the current result at cursor in its source org file - This calls `M-x org-open-at-point` on the current entry and opens the second link in the entry. diff --git a/documentation/docs/clients/obsidian.md b/documentation/docs/clients/obsidian.md index c59f74f2..37a2526e 100644 --- a/documentation/docs/clients/obsidian.md +++ b/documentation/docs/clients/obsidian.md @@ -31,7 +31,7 @@ See the official [Obsidian Plugin Docs](https://help.obsidian.md/Extending+Obsid ## Use ### Chat Click the *Khoj chat* icon 💬 on the [Ribbon](https://help.obsidian.md/User+interface/Workspace/Ribbon) or run *Khoj: Chat* from the [Command Palette](https://help.obsidian.md/Plugins/Command+palette) and ask questions in a natural, conversational style.
-E.g *"When did I file my taxes last year?"* +E.g. *"When did I file my taxes last year?"* See [Khoj Chat](/features/chat) for more details diff --git a/documentation/docs/miscellaneous/performance.md b/documentation/docs/miscellaneous/performance.md index 514af8e6..8322cf33 100644 --- a/documentation/docs/miscellaneous/performance.md +++ b/documentation/docs/miscellaneous/performance.md @@ -10,7 +10,7 @@ Here are some top-level performance metrics for Khoj. These are rough estimates - Semantic search using the bi-encoder is fairly fast at \<100 ms across all content types - Reranking using the cross-encoder is slower at \<2s on 15 results. Tweak `top_k` to tradeoff speed for accuracy of results -- Filters in query (e.g by file, word or date) usually add \<20ms to query latency +- Filters in query (e.g. by file, word or date) usually add \<20ms to query latency ### Indexing performance diff --git a/src/interface/obsidian/src/utils.ts b/src/interface/obsidian/src/utils.ts index 6ecf0bf6..5f3e5acb 100644 --- a/src/interface/obsidian/src/utils.ts +++ b/src/interface/obsidian/src/utils.ts @@ -354,7 +354,7 @@ export function getLinkToEntry(sourceFiles: TFile[], chosenFile: string, chosenE // This finds longest path match when multiple files have same name .sort((a, b) => b.path.length - a.path.length) // The first match is the best file match across OS - // e.g Khoj server on Linux, Obsidian vault on Android + // e.g. Khoj server on Linux, Obsidian vault on Android .find(file => chosenFile.replace(/\\/g, "/").endsWith(file.path)) // Return link to vault file at heading of chosen search result diff --git a/src/khoj/database/models/__init__.py b/src/khoj/database/models/__init__.py index fcda8c10..00a594ca 100644 --- a/src/khoj/database/models/__init__.py +++ b/src/khoj/database/models/__init__.py @@ -213,7 +213,7 @@ class SearchModelConfig(BaseModel): model_type = models.CharField(max_length=200, choices=ModelType.choices, default=ModelType.TEXT) # Bi-encoder model of sentence-transformer type to load from HuggingFace bi_encoder = models.CharField(max_length=200, default="thenlper/gte-small") - # Config passed to the sentence-transformer model constructor. E.g device="cuda:0", trust_remote_server=True etc. + # Config passed to the sentence-transformer model constructor. E.g. device="cuda:0", trust_remote_server=True etc. bi_encoder_model_config = models.JSONField(default=dict) # Query encode configs like prompt, precision, normalize_embeddings, etc. for sentence-transformer models bi_encoder_query_encode_config = models.JSONField(default=dict) diff --git a/src/khoj/search_filter/date_filter.py b/src/khoj/search_filter/date_filter.py index 0f53abbe..62643e15 100644 --- a/src/khoj/search_filter/date_filter.py +++ b/src/khoj/search_filter/date_filter.py @@ -125,7 +125,7 @@ class DateFilter(BaseFilter): return [] # extract, parse natural dates ranges from date range filter passed in query - # e.g today maps to (start_of_day, start_of_tomorrow) + # e.g. today maps to (start_of_day, start_of_tomorrow) date_ranges_from_filter = [] for cmp, date_str in date_range_matches: if self.parse(date_str): @@ -133,7 +133,7 @@ class DateFilter(BaseFilter): date_ranges_from_filter += [[cmp, (dt_start.timestamp(), dt_end.timestamp())]] # Combine dates with their comparators to form date range intervals - # For e.g + # For e.g. # >=yesterday maps to [start_of_yesterday, inf) #