Subentries

Subentries are how you define more specific sentiment behaviors for an entry, allowing to expand the entry definition to consider different contexts or morphological information.

This is the dialog that appears when you click on the "Add new" button available in the edit entry view:

Create a new subentry

As with the entries, there are two main aspects to define: the definition of the subentry and the sentiment behavior

The first two fields that you can see in the dialog are the form/lemma and the checkbox inherits aliases, which are the starting point to define the subentry. form/lemma is not editable and will always correspond to the form/lemma of the entry. When enabled, inherits aliases allows you to decide if you want the aliases defined for the entry to be taken into account in the subentry.

After these two fields, you can add the conditions that are going to apply to the subentry. There are two non-exclusive types:

  • Context condition, to specify the context in which the entry will have the assigned sentiment behavior.
  • Morphological condition, to specify the morphological function the entry must have in the text to have the assigned sentiment behavior.

Both conditions are enabled through the checkbox at the top of each column. They are not exlusive, both can be applied at the same time, and at least one of them must be defined to create a subentry.

If no condition is specified, the following error will appear:

Error for no conditions specified

The context condition is composed of two fields, the context operator and the context condition:

Context conditions in subentries

The first field, context operator indicates the relation that's going to be between the form/lemma of the subentry (and thus, of the entry) with the context condition. The are four possible values:

  • WITH, when we want the condition to appear in the same sentence as the form/lemma of the entry.
  • WITHOUT, when we want the condition not to appear in the same sentence as the form/lemma of the entry.
  • BEFORE, when the form/lemma appears in the sentence before the context condition.
  • AFTER, when the form/lemma appears in the sentence after the context condition.

The context condition field works the same way as the aliases: each condition has to be specified in a new line, and like the aliases, the word/s can be considered a lemma it will be used as such, otherwise it will be considered just a form.

Let's see some examples:

Form/lemma Operator Condition Text Condition detected?
growth WITH zero The growth was close to zero
growth WITH zero There was close to zero growth last quarter
bubbly WITHOUT drink
beverage
She has a bubbly personality
bubbly WITHOUT drink
beverage
Perhaps they preferred bubbly drinks.
deserve BEFORE better She deserved much better than that.
deserve BEFORE better That's better, he didn't deserve it.
problem AFTER math
geometry
The geometry problem was very difficult
problem AFTER math
geometry
He had a problem in math class

The morphological condition has only one field: the morphological analysis you want the form/lemma of the entry to act as.

Context conditions in subentries

There are five possible values corresponding to the most common grammar categories (or parts of speech):

  • ADJECTIVE
  • ADVERB
  • NOUN
  • QUANTIFIER
  • VERB

The following are some examples on how this condition can be used:

Form/lemma Morphological condition Text Condition detected?
bluff VERB He's bluffing, there's no one in there.
bluff VERB I'm calling your bluff, all in.
mean ADJECTIVE He's always so mean to me.
mean ADJECTIVE He does not mean that, I'm sure.

After adding the conditions you want to the definition, there are only two fields left in the dialog: entry type and value which behave almost exactly the same as what was explained in the entry editing view. The only difference is that subentries cannot have NONE as an entry type.

Once a subentry is created, it will appear in the corresponding table in the entry editing view. This is how it looks:

Subentries table in the entry view

In the image there are three examples, one with each of the possible combinations of conditions: a subentry with a context condition, a subentry with a morphological condition, and finally, a subentry with both.

The table shows a summary of the subentry, its definition and the behavior associated very similarly to how it appears when you create it. The only difference is that for the context condition, instead of being in different lines, they are all grouped in a single line and separated by pipes, '|'.

Did you notice...?

The table in which the subentries appear supports pagination, dynamic filtering and allows you to order its contents by different columns.

To edit a subentry, you just have to click on the form/lemma, which access the subentry editing view.

Subentry editing view

In this view you can see all the fields configured in the creation of the subentries, plus a section to expand the advanced settings, which are similar to the ones available for entries, and that are explained in detailed in the advanced settings section.