Skip to content

Block-Negative Filter #36

@mr-martian

Description

@mr-martian

Yet another idea to make filters less annoying (which hopefully makes more sense than #21):

We keep ending up with constructions like

PATTERNS
Verbs

PATTERN Verbs
( V-Stems(1) [<v>:] V-Stems(2) [<pres>:] V-Pres )[^[Var,Ver,Vir]]

LEXICON V-Pres
<p1><sg>:>o[Var]
<p1><sg>:>o[Ver]
<p1><sg>:>o[Vir]
<p2><sg>:>as[Var]
<p2><sg>:>es[Ver]
<p2><sg>:>es[Vir]
<p3><sg>:>a[Var]
<p3><sg>:>e[Ver]
<p3><sg>:>e[Vir]

LEXICON V-Stems(2)
preguntar:pregunt[Var]     <tv>:[Var]  # "ask"
deber:deb[Ver]             <tv>:[Ver]  # "owe"
escribir:escrib[Vir]       <tv>:[Vir]  # "write"

Where the inflections get duplicated in order for the xor filter to work (the stems get duplicated too, but that's far rarer).

My idea is to add a filter which cancels negative tags, so that ( A B[~[x,y]] ) = ( A B ) but ( A B[~[x,y]] )[-x,-y,-z] = ( A[-x,-y,-z] B[-z] )

Given such a filter, the above example could become:

PATTERNS
Verbs

PATTERN Verbs
( V-Stems(1) [<v>:] V-Stems(2) [<pres>:] V-Pres[~[Var,Ver,Vir]] )[^[Var,Ver,Vir]]

LEXICON V-Pres
<p1><sg>:>o[Var,Ver,Vir]
<p2><sg>:>as[Var]
<p2><sg>:>es[Ver,Vir]
<p3><sg>:>a[Var]
<p3><sg>:>e[Ver,Vir]

LEXICON V-Stems(2)
preguntar:pregunt[Var]     <tv>:[Var]  # "ask"
deber:deb[Ver]             <tv>:[Ver]  # "owe"
escribir:escrib[Vir]       <tv>:[Vir]  # "write"

@jonorthwash @nlhowell thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions