  The classical method of the thematic classification of texts is based on
using the frequency weight on the list of words occurring in texts from the
text corpus that determines the theme. In this method , the weight of each word
is defined as its normalized frequency in the texts of the corpus. The
frequency weight is applied for determining the relevance of the tested text to
the theme given via a text corpus: the relevance of the tested text is defined
as the value of its frequency weight (see [1]-[3]). In the present work we
propose a method of constructing some optimal weights generated via certain
variational principles leading to LP (linear programming)problems. A noteworthy
feature of those optimal weights is a relatively small number of words
belonging to their supports: in all the examples we considered that number did
not exceed 10 percent of the quantity of different words (lemmas) occurring in
texts of the corpus, and besides the majority of those words were apparent
candidates to be selected as key words of the corpus. The application of our
method to the determination of the relevance of texts to a given collection of
thematic text corpuses demonstrated its high efficiency and performance.
