apertium/lexd

Positive Spread Filter

Closed this issue · 1 comments

I have now several times run into cases where I wanted to write something like

PATTERN Verb
VerbStem[punct] ... # other suffixes specific to punctual verbs
VerbStem[stat] ...

PATTERN VerbStem
VerbRoot VerbPersNum

LEXICON VerbPersNum
<p3><sg>:[stat,punct] # suffix that is the same for stative and punctual
<p3><pl>:a[stat] # suffix that is specific to stative
<p3><pl>:o[punct]

LEXICON VerbRoot
blah[stat] # verb that only takes stative morphology
bloop[stat,punct] # verb that takes stative or punctual morphology

The problem with this is that VerbStem[punct] will get all entries in VerbStem which have either VerbRoot[punct] or VerbPersNum[punct], mixing freely.

What I think I want here is a way to specify that a positive tag should be applied to all components of a pattern, perhaps VerbStem[*[punct]] or just VerbStem[*punct].

Of course, this could be rewritten using exclusive-or filters, but that gets rather messy and the shared entries have to be duplicated.

@nlhowell thoughts?

I just realized that the semantics I was imagining for this work out to a syntactic sugar for negative tags and VerbStem[*punct] is really just VerbStem[-nonpunct], which is a bit annoying to write, but oh well.