MAPTO directive in attribute definitions serves for defining a map between the attribute and another attribute. It is computed from vertical data using tool mknormattr.

First you need to define which attribute should be mapped to what. This is done in the corpus configuration file. Let us say we want to have a mapping between word and WSATTR for a given corpus (let it be lempos for the purpose of this example). Then we specify:

ATTRIBUTE word {
        MAPTO lempos
}

Now we let manatee compute the mapping by running this command:

mknormattr CORPUS SOURCE_ATTRIBUTE TARGET_ATTRIBUTE

Let us say we work with BNC, so the command will look like this:

mknormattr bnc2_tt21 word lempos

It takes a few seconds for 100-million-word corpus. After the computation we can e.g. query the corpus for wordforms for which we don’t know the lemma. If we have MAPTO word=>lemma, we can use CQL [word@lemma="mice"] and we obtain hits also for “mouse”.

$ corpquery bnc2_tt2 '[word@lemma="mice"]' -n
2501
$ corpquery bnc2_tt2 '[lemma="mouse"]' -n
2501

The -n parameter tells corpquery to count the results and do not output the hits. Similarly, we can do these queries (with the mapping between word and lempos):

$ corpquery bnc2_tt2 '[word@lempos="books"]' -n
36562
$ corpquery bnc2_tt2 '[word="books"]' -n
11597