Skip to content

Automatic Inflections

Saturnine edited this page Mar 26, 2023 · 2 revisions

Inflection Features

Lexicanter offers a way to expand your lexical entries with inflection information automatically generated from sound change rules. It's a useful feature for generating verb conjugation tables, noun declension tables, and the like. This feature must be enabled under Advanced Settings.

The Inflection Tab

When you first open this tab, there will be a single button which reads 'Add Inflection Group'. When you click on this, an inflection group editor will be created. It has two text fields: the first is labelled 'Tags', and the second is labelled 'RegEx Filter' and should be pre-populated with .+. Below that, there will be a block-based editor similar to what is used in the Documentation tab.

Tags

The tags you assign to an inflection group should correspond to tags that you use in the lexicon. For example, if this inflection group is for verbs and you've marked verbs in the lexicon with the tag verb, you should put that tag here. The inflection group will only be applied to lexical entries with tags that match the inflection group's own tags. You can use multiple tags if you wish, and the inflection group will be applied to any entry that has at least one of those tags.

RegEx Filter

You can write a regular expression to filter which words the inflection group is applied to even further. If you're unfamiliar with regular expressions, you can read up on them here. Some basic patterns will be described here. As an example, let's say that, like in Spanish, your verbs end in -ar, -er, and -ir, and there is a different set of conjugations depending on which ending the verb has, but in the lexicon, each kind of verb has the same 'verb' tag. You can target your inflection group toward only -ar verbs by writing the following RegEx filter:

^.+ar$

Now this inflection group will only apply to words which have the 'verb' tag and end in -ar.

Editor

You can write whatever you want in the editor. You have headings, paragraphs, tables, and document markup at your disposal. However, there is a key difference between this and the Documentation tab editor: the app will check through the table cells of all tables in your inflection group when it applies the inflection group to a word, and if the table cell has a sound change rule in it, it will replace the contents of that cell with the word and apply the rule to it. So for example, if a table has a cell in it with the rule

ar > o / _^

Then in the lexicon tab, on the word hablar, that cell will be replaced with 'hablo'. Cells which do not have / or > in them are ignored. To learn more about writing sound change rules in Lexicanter, read the Pronunciation Rules page.

In the Lexicon

After creating inflection groups, a dropdown labelled 'Inflections' will appear in the lexical entries underneath the senses to which that inflection group applies.

Agenda

Several improvements are planned for the Inflections features, including a way to specify irregulars and a UI-based way to filter words instead of requiring the user to manually write RegEx filters (although that will remain an option for advanced users).

Clone this wiki locally