====== Menu: Filter ======
Filtering of the query results ([[en:pojmy:konkordance|concordance]]) can be used to specify the initial query by an additional condition. In general, it is possible to replace any type of filter by a more complicated [[en:pojmy:dotazovaci_jazyk|CQL]] query, nonetheless when carrying out certian kinds of searches it is recommended to begin with a more general query and subsequently specify the results we wish to obtain. The advantage of this method is the possibility of continuous checking for what kind of results appear in the concordance.
[{{ :en:manualy:kontext:filtr.png?direct&300|Form for filtering }}]
In the [[en:manualy:kontext:index|KonText interface]] there are two types of filter to choose from:
- P-filter (positive filter)
- N-filter (negative filter)
While the positive filter is used to select a subset of concordances from the initial list, the negative filer allows to remove some of the irrelevant concordances from the list. As for the p-filter, the user specifies the condition which has to be met in order for a line to stay in the concordance list. According to the user's specification, the n-filter identifies those concordances which are to be removed from the result (the ones that satisfy the condition are eliminated).
Within the form for filtering it is necessary to initially specify the type of filter (positive/negative). Additional settings specify the condition (which is essentially an additional query applied to the results of the original search): the search span within which the filtered feature will be searched, the
[[en:eebo:first_query#query_types|type of query]] which will be used and the entry of the filtered query itself.
[{{ :en:manualy:kontext:filtr_konkordance.png?direct&300|The resulting concordance of lemma //klidný// with a positive filter marking //a// in the immediate proximity. }}]
The option **Selected token** (with the values **first**, **last**) is useful only for positive filtering. It specifies which of the context words should be marked as co-occurrence in KWIC in those cases when there are more than one such words occurring in its proximity. For example, when searching for [[en:pojmy:lemma|lemma]] //klidný// we find the following sentence:
''Stal se nervózním a neklidným a jeho oči těkaly''.
If we wish to filter out only those concordances in which the conjunction //a// occurs in the immediate proximity of lemma //klidný//, we have two options: either we mark the previous conjunction as a co-occurrence, or the one that follows [[en:pojmy:kwic|KWIC]]. If you select **first** selected token in the settings of filter, the leftmost token will be marked in the searched context. If you select **last**, the one that is farthest to the right will be marked.
The assessment of the filter automatically redirects the user to the page with the updated concordance. In the case of the negative filter the specified examples are erased from the concordance (the number of the concordance lines will also be reduced). In the case of the positive filter the resulting concordance contains only those lines that satisfy the condition, the overall frequency is also correspondingly lowered, the contextual co-occurrences (if there are any) are marked red.
----
**[[en:manualy:kontext:index|Menu]]**: [[en:manualy:kontext:novy_dotaz|Query]] • [[en:manualy:kontext:korpusy|Corpora]] • [[en:manualy:kontext:ulozit|Save]] • [[en:manualy:kontext:konkordance|Concordance]] • [[en:manualy:kontext:filtr|Filter]] • [[en:manualy:kontext:frekvence|Frequency]] • [[[[en:manualy:kontext:kolokace|Collocation]] • [[en:manualy:kontext:zobrazeni|View]] • [[en:manualy:kontext:napoveda|Help]]