Construction patterns
A pattern describes a sequence of words that Webtool looks for in a sentence. You write patterns in two places:
- On a construction, in the Patterns section of the Construction editor. This is the full notation: spellings, lemma forms, parts of speech, morphology, references to other constructions, and named parts that become construction elements (CEs).
- On a multiword lemma, in Pattern (BNF) in the Lemma editor. This uses only spellings and lemma forms. See Patterns on multiword lemmas.
Phrases made of variable words, such as N de N or a number written in
words, are constructions. Before December 2026 they were lemmas whose names
started with $; those lemmas no longer exist.
Where construction patterns live#
Open a construction in the Construction editor and go to its Patterns section. A construction can have several patterns: Webtool finds the construction when any one of them matches. Add a pattern with Add pattern; select one in the list to edit or delete it.
Three fields in Construction properties decide how its patterns are used:
| Field | What it does |
|---|---|
| Short name | How other patterns refer to this construction: a construction with short name np is written {$np}. Lowercase letters, numbers and _. Unique in its language. |
| Helper | A modeling choice: the construction is a building block for other patterns, not a construction of its own. Lists and reports hide it unless you turn on Show helpers. Being used in another pattern does not make a construction a helper. |
| Review status | Only CREATED and CHECKED constructions are offered to annotators. A PENDING construction is still matched, so other patterns can use it, but nobody sees it. |
Annotators are offered a construction only when it is active, is CREATED or CHECKED, and evokes at least one frame (Frame evocation section). Whether it is a helper does not matter: a construction that should not be offered simply evokes no frame.
Read a pattern from left to right#
({NOUN} | {PROPN})@Part {=de} {NOUN}@Whole
Read it as “a common or proper noun, which is the part Part, followed by a form of the lemma de, followed by a noun, which is the part Whole.” Each position takes one word unless it says otherwise, and the positions are next to each other in the sentence.
Spellings and lemma forms#
| Notation | How to read it |
|---|---|
foto |
This spelling, not fotos. Case is ignored; accents are not. |
visto_que |
The two words visto que. _ joins the words of one spelling. |
{=foto} |
Any registered form of a lemma named foto in the pattern's language. |
{=foto:NOUN} |
Forms only of the foto lemmas whose part of speech is NOUN. |
{=tirar:VERB} foto |
Any form of tirar, then exactly foto. |
{=name:POS} picks which lexicon entries supply the forms. It does not
check the tag the sentence parser gave the word. If no lemma has that name,
the slot matches the name as a plain spelling.
Parts of speech and morphology#
| Notation | How to read it |
|---|---|
{NOUN} |
A word the sentence parser tagged NOUN, whatever its spelling. |
{VERB:inf} |
A VERB with VerbForm=Inf. The shorthands are inf, fin, ger and part. |
{NOUN:Number=Plur} |
A plural NOUN. |
{VERB:Tense=Past,VerbForm=Part} |
A VERB with both features. Separate constraints with commas; all must hold. |
{PRON:deprel=expl} |
A PRON whose dependency relation is expl. A word labeled obl:tmod counts as obl. |
{NUM:form=digits} |
A NUM written with digits, such as 10 or 1.000,50. |
{*} |
Any one word. |
Use the uppercase Universal Dependencies tags: NOUN, PROPN, VERB, AUX,
ADJ, ADV, ADP, DET, PRON, NUM, CCONJ, SCONJ and so on. A
feature the parser never assigns simply never matches, so test a pattern on
words it must reject as well as on words it must accept.
Sequences, optional parts, alternatives, repetition#
| Notation | How to read it |
|---|---|
A [B] C |
A C or A B C. The bracketed part may be skipped. |
[de {=casa:NOUN}] |
The whole bracketed sequence may be skipped. |
(por | para) isso |
por or para, then isso. |
({DET} | {NUM} | {ADJ}) |
One word that is a DET, a NUM or an ADJ. |
(A B) |
A B as one group, not optional. |
{ADJ}+ |
One or more adjectives. |
{ADJ}* |
Any number of adjectives, none included. |
A, B and C stand for any part of a pattern. Always put alternatives in
parentheses: write (por | para), not por | para. A modifier after a group
applies to the whole group. The order of alternatives is not a priority.
Name the parts: construction elements#
Put @Name right after a part to say that its words fill the construction
element Name:
(({NOUN} | {PROPN}) [{ADJ}])@N1 {=de} ([{$art}] {NOUN})@N2
- The label goes after the braces or the parentheses:
{NOUN}@Head, not{NOUN@Head}. - The name must be a construction element of this construction. Tick Create missing construction elements to have Webtool create the ones that don't exist yet, each in a new color.
- Webtool stores the link to the element, not its name. Renaming an element later does not break the pattern.
- Words of the match outside every labeled part belong to the construction but to no element (like de above).
When annotators open a sentence, the words of each element are already marked in the construction's CE layer. When a CE is linked to one frame element of the chosen frame, that FE is filled in on the same words. When it is linked to several, no FE is filled in and the annotator marks the right one (see the FE annotation guide).
Refer to another construction#
{$name} matches wherever the construction with short name name matches,
taking all of its words:
[{$quant}] [({$art} | {$dem} | {$poss_det})] [{$num}] {NOUN}
- The construction must exist in the same language. Webtool refuses a pattern that names an unknown short name, and refuses to change a short name that other patterns use.
- References can be nested: a construction can refer to one that refers to another. Webtool keeps matching until nothing new is found.
- A referenced construction can be a construction of its own (
pred,ref) or a helper, a building block with no meaning of its own (thenumero_*pieces of Numeral). Marking a helper is a modeling decision. {$np}@Arglabels the words of the reference as the element Arg.
Lemma type slots#
{TYPE:focus} matches a word, or a multiword lemma already found, that has a
lemma of type focus. {TYPE:focus:ADV} also requires that lemma's part of
speech to be ADV. This differs from {ADV}, which uses the sentence parser's
tag. Types are Webtool's lemma classification, not frames. A lemma with no
type never matches.
Which matches count#
- For each construction, Webtool keeps the longest matches. A match inside a longer match of the same construction is left out; matches of different constructions can overlap.
- When a pattern can match the same words in more than one way, the elements follow the first way in pattern order: an optional part is used when it can be, and a reference takes as many words as it can while the rest still matches.
- Some constructions replace lexical units for their words. Inside a match of Numeral, for example, the lexical units of Cardinal_numbers are not offered. This is set by the system administrator.
Check a pattern on real sentences#
The Lexical parser (Parsers menu) lists every construction found in a sentence, helpers included, with the words each one matched. The Lemma Graph (Grapher menu) draws the same matches as a tree. Use them after every change:
- Try sentences that must match, including inflections, omitted optional parts, and every alternative.
- Try near misses that must not match.
- If a construction is missing, check the constructions it refers to first.
Patterns on multiword lemmas#
A multiword lemma, such as janela solar, has a pattern in Pattern (BNF) in
the Lemma editor. Its pattern uses only spellings, {=lemma} slots, […],
(… | …) and _. Parts of speech, {*}, repetition, {$name}, {TYPE:…}
and @Name belong to construction patterns.
{=janela} {=solar}
Read it as “a form of janela, followed by a form of solar.” Each slot is checked on its own, so the pattern does not require both words to agree.

When you create a multiword lemma, Webtool writes a first pattern: a word that
is the name of a lemma becomes a {=…} slot, other words stay spellings, and
an inner hyphen becomes an optional [-], as in {=calar} [-] {=se}. Review
it rather than assume every word should inflect.
- A spelling can carry
:head,:fixedor both, as innovo:headorde:fixed.:headmarks the head; it does not allow inflection. - An entry's Forms and its Pattern are related but different. Don't assume every phrase in Forms is recognized; check it in context.
- After editing, click Compile pattern to save the text and rebuild the graph. If compiling fails, the previous pattern stays in place.
Notation that does not do what it seems#
Webtool refuses {NOUN@Head} and {CE:Head}. It accepts the others, but they
don't do what they seem to.
| Notation | What happens | Write instead |
|---|---|---|
{NOUN@Head}, {CE:Head} |
Refused. | {NOUN}@Head: labels go after the braces. |
{CXN:np}, {CXN#123} |
Read as a word tagged CXN, which never occurs. |
{$np}. |
<A> |
Read as plain A: required, never added. |
A, or [A] if it may be absent. |
# comment |
Read as the spellings # and comment. |
Keep explanations outside the pattern field. |