coherence-ua — estimation of the coherence of a text

coherence-ua is a software Python package for the estimation of the coherence of Ukrainian texts based on a neural network model (Transformer architecture). The training of the model was performed on a set of Ukrainian news. Input data of the model are represented as text. The model implements the following methods:

  • get_prediction_series — the estimation of the coherence for each text’s group. The term “group” implies a set of text sentences (each group incorporates 3 sentences) with an ordinary offset. For instance, <s1, s2, s3>, <s2, s3, s4>, <s3, s4, s5>, where <si> represents the separate sentence of a text.
  • evaluate_coherence_as_product — the estimation of the coherence of a text that is calculated as a product of the output values of all groups.
  • evaluate_coherence_using_threshold — the estimation of the coherence of a text that is calculated as the ratio of a number of coherent groups over a number of all groups according to a set threshold value.

The software Python package is created by Artem Kramov