Skip to content

Commit

Permalink
Ontology: add the algorithm description
Browse files Browse the repository at this point in the history
  • Loading branch information
djukicn authored and PrimozGodec committed Jul 19, 2022
1 parent 895845e commit 74ebf91
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions doc/widgets/ontology.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Ontology
========

Generate, edit, load and save ontologies
Generate, edit, load and save ontologies.

**Inputs**

Expand All @@ -15,9 +15,18 @@ The ontology widget enables various operations with ontologies:
- Generate ontology from words on the input
- Load existing ontology from a file or URL. The widget supports OWL, JSON, and Pickle formats.
- Manually edit the ontology
- Include word from the input in the existing ontology to the position where it fits best according to the embedding similarity
- Include word from the input in the existing ontology to the position where it fits best according to the fitness function
- Save ontology to file

Ontologies are generated using the genetic algorithm. The fitness function used in
the algorithm determines the quality of a generated ontology by considering pairwise
cosine similarities between each word in the ontology and its parent and siblings.
More concretely, the similarity is computed between SBERT embeddings of said words.
The fitness function also accounts for the average number of children each word has
(to avoid too shallow or too deep ontologies) and the syntactic overlap between words
and their children along with their respective lengths (this term is intended to push
more general words above the less general ones).

![](images/Ontology.png)

1. Switch between saved ontologies, add or remove ontology to the library, load or save ontology from/to file.
Expand Down

0 comments on commit 74ebf91

Please sign in to comment.