Understand spoken language

Advanced relations

Submitted by admin on 16 December 2014

Creating many-to-many relations

Creating many-to-many relations (e.g. when you have 3 or more words, all of which you want to relate to each other, in a set of "see also" or "homonym" links where every word in the set has a relation to every other word in the set), is a little harder than when you just want to relate 2 items together.

One way is of course is to create all the 1-to-1 relations between each of the words. This works, but has a several problems:

  • it's a lot of work
  • it's difficult to have a clear view of which relations exist and which are still missing
  • if you want to add a new word to be a relation to each of the words in the many-to-many set, then you have to create a whole lot of new relations

The following video shows how to solve this by creating a single relation which links all of the required words together in a single relation.

Editing existing relations

Sometimes you want to edit an existing relation and add another word to this particular set of many-to-many words.

To edit a relation you have to open the relation with the "Edit" link in the "Edit what relations exist" screen (http://lingopolo.com/french/admin/content/relation).

When you are in the Edit screen for a particular relation (see below), click on the "Edit see also endpoints" . 

Edit relation "see also" endpoints

What this will do is to load each of the words/phrases as if creating a relation to begin with.

The relation is ready for edit

When you then edit a word (usually the word you want to add to the relation), then the Entity Collector will display as per normal when creating a relation. You can now add new words to this relation before doing "Save relation".

Entity Collector

The video at the bottom of this page covers how to find and edit an existing relation, so that you can add words to it, or remove words from it.

Finding relations gone bad

The following shows an example where something is wrong with the relations. The same "see also" appears twice, which should not happen. We need to investigate why this is happening, and fix it. The problem is almost always that their are multiple relations when there should only be one. I will now explain how to find out the cause of the problem.

relation duplicates

The first step is to use the "Editor's Links' menu to go into the Relations page (http://lingopolo.com/french/admin/content/relation). Then set the filter to the type of relation which has the problem. In our case it is a "See also" relation, so select the relation type "See also" and click the "Filter" button. This will reduce the number of relations displayed.

Setting the filter on the relations

The next step is to search on the page for the English version of the words (you will see when you look at the list of the relations that it is only the English text). This depends on the browser you are using, but in Google Chrome, CTRL + F will bring up a search box, and clicking on the down arrow will perform the search. In this first example the searched for words have not been found.

relation not found

At the bottom of the page there is a pager to go between the different pages of relations. You will need to go through each page, one by one, perform the search, and then go to the next page.

relation pager

On the image below, you will see that there has been a match, and you can see Relation 311 has 6 words/phrases all joined in a single relation.

relation found

Continuing the search on other pages finds another relation which links the same 3 words/phrases:

relation found on page 5

This is wrong in this instance, and is the cause of the duplicates. The correct way to proceed in this case is:

  • delete the more recently created relation, Relation 592 in this case (which was incorrect, since the original relation should have been added to rather than a new one created)
  • edit the earlier relation (see the earlier section Editing existing relations), and add/delete extra words as required

Finding and deleting unwanted old relations

The video also covers how to find and delete unwanted existing relations.