From 511cc25b58129fdc74fbe7839ac4552becce1f7b Mon Sep 17 00:00:00 2001 From: Jan Niestadt Date: Fri, 21 Jun 2024 13:44:25 +0200 Subject: [PATCH] Docs: ==> won't reject hits without alignments. --- site/docs/guide/corpus-query-language.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/site/docs/guide/corpus-query-language.md b/site/docs/guide/corpus-query-language.md index 0a432b4e9..87eda7e11 100644 --- a/site/docs/guide/corpus-query-language.md +++ b/site/docs/guide/corpus-query-language.md @@ -532,7 +532,15 @@ Assuming your data has both sentence and word alignments, and you want to find a containing 'cat' ==>nl _ -This should find aligning English and Dutch sentences, including any word alignments between words in those sentences. +This should find aligning English and Dutch sentences, including any word alignments between words in those sentences. You can also filter by alignment type, as we'll show later. + +::: details If no alignments are found + +The `==>` operator will try to find alignments, but won't skip a hit if it couldn't find any aligments for that hit. Instead, the hit will simply be reported without any alignment information. + +For example, if you're searching for translations of `cat` to Dutch, you will see both English `cat` hits where the translation to Dutch was found, and `cat` hits where it wasn't. + +::: ### Switching the main search field @@ -542,7 +550,6 @@ If you want to search the Dutch version instead, and find alignments with the En But of course, the main search field shouldn't be `contents__en` in this case; we want to switch it to `contents__nl`. You can specify a main search field other than the default with the BLS parameter `field`. In this case, if you specify `field=nl`. BlackLab will automatically recognize that you're specifying a version of the main annotated field and use the correct 'real' field, probably `contents__nl` in this case. - ### Filtering the target span In the previous example, we used `_` as the target span. This is the default, and means "the best matching span".