The previous work from ref [1] describes the method of transforming a sign sequence into algebra through an example of a linguistic text. Two other examples of algebraic structuring of texts of a different nature are given to illustrate the method.

## 1. Morse-Weil-Gerke code as an algebra of matrix units

The symbol sequences (texts) of 26 Latin letters in the Morse code consist only of dots and dashes. This particular example was chosen because of its extremely concise dictionary (“dot” and “dash”).

Dots or dashes here represent the words, and the texts made up of such words represent 26 letters of the alphabet. Each word has two coordinates. The first coordinate is the number of the word (dot or dash) in this letter (from one to four). The second coordinate is the number in the dictionary (1 or 2). Dictionary *E _{1,1}* ("dot") and

*E*("dash").

_{2,2}Each letter (sign sequence) with a number from the table 1 can be associated with a matrix polynomial *P* from 4×4–sized matrix units according to the equation (8) from the previous work [1].

For instance, the letter Q (№17) is associated with the matrix polynomial:

All 26 polynomial letters in the table 2 have a common feature: only three particular matrix units (*E _{12}*,

*E*,

_{21}*E*) are their factors in the rightmost position.

_{32}If we represent all 26 polynomials from the table 2 as a column *||P||*, and also based on the fact that the following holds true for matrices and columns:

then the Morse code can be structured into three left ideals of matrix polynomial sets from the table 2 with bases ||*P*||_{1}, ||*P*||_{2}, ||*P*||_{3} :

where:

Symmetric matrix ||*P*||_{2}(||*P*||_{2})* ^{T}* as the number in diagonal elements is the number of basic elements (simple and composite matrix units) belonging to a letter; as the number in other elements it is the number of coinciding basic elements in the corresponding pair of sign sequences (letters). After normalization it determines the importance of the letter in the alphabet.

Symmetric matrix (||*P*||_{2})* ^{T }*||

*P*||

_{2}as the number in diagonal elements is the number of letters belonging to the basic elements; as the number in nondiagonal elements it is the number of matching letters in the corresponding pair of basic elements. After normalization it determines the importance of the basis element (header) in the alphabet.

The Morse code is algebraically structured into three ideals (classes) with bases (1.1). The representation of the alphabet in terms of ideals describes all similar codes with bases (1.1). The representation is provided in the tables 3 and 4

Due to the properties of matrix polynomials (only three matrix units *E _{12}, E_{21}, E_{32}* can be the rightmost factors), the Morse code alphabet:

**ABCDEFGHIJKLMNOPQRSTUVWXYZ**

is divided into three classes (three ideals) by the three generators *E _{12}, E_{21}, E_{32}*:

*E _{12}* – is the heading of the letters whose four character sequences start with a dash:

**_BCD__G___K_MNO_Q__T___XYZ **(13 letters)

*E _{21}* – is the heading of the letters in whose four character sequences a dot comes second:

**_BCD_F_HI_K__N____S_UV_XY_ **(13 letters)

*E _{32}* – is the heading of the letters in whose four character sequences a dash comes third:

**__C__F___J K ___OP____U_W_Y_** (9 letters)

## 2. Algebra of mathematical text

In the example [1], the linguistic text is transformed into a mathematical object (matrix polynomial) that we can perform algebraic operations with to analyze and synthesize texts. The following example illustrates a reverse transformation: mathematical objects (formulas) are first considered as texts (sign sequences), which are then converted back into mathematical objects but different from the original ones. This new form allows a more consistent discovering of properties of mathematical objects for comparison and classification.

Formulas for the volume of a cone (*V _{cone}*) cylinder

*V*and torus (

_{cylinder}*V*):

_{T}are first treated as texts. This means that the signs comprising the texts are not mathematical objects, and no algebraic operations can be performed on them. For example, *R ^{2}_{1}* is

*R*;

_{1}R_{1}*πR*is not a product of two numbers but just a sequence of two characters. Signs in (2.1),

_{1}*R*and

_{1}*H*, are the radius of the cone base and the height of the cone;

_{1}*R*and

_{2}*H*are the radius of the cylinder base and the height of the cylinder;

_{2}*R*and

_{3}*R*are the inner and outer radii of the torus, respectively;

_{4}*r*is the radius of the generating circle of the torus, and

*π*is

*π*.

Semiotic analysis of formulas as texts requires the presence of repetitions of signs: repetitions determine the patterns. There are actually more repetitions of signs in the formulas (2.1) than the indicated repetitions of the *π* sign. The signs *R _{1}*,

*R*,

_{2}*R*,

_{3}*R*,

_{4}*H*,

_{1}*H*and

_{2}*r*are segment lengths. One of the signs (for instance,

*r*) is a simple (standard of length), while the rest of the signs are composite:

*R*,

_{1}=ar*R*,

_{2}=br*R*,

_{3}=cr*R*,

_{4}=dr*H*,

_{1}=er*H*. Then the parts of the formulas (2.1) on the right side are:

_{2}=frIndex form:

Formulas (2.2) as a three-fragment polynomial of matrix units, *P*:

where:

Block-matrix form:

where:

The *P* columns contain signs from the three formulas (2.1). Two zeroes in a column indicate that the corresponding sign is present in only one formula. For example, the sign “1/3” (or *E _{1,1}*), two “

*a*” signs (or

*E*), one “

_{3,3}+E_{5,3}*e*” (or

*E*) are present only in the first formula for the cone (the first line (2.5)). Only the cylinder (second row (2.5)) has two “

_{7,7}*b*” signs (or

*E*) and one “

_{11,11}+E_{13,11}*f*” (or

*E*). Only the torus (third line (2.5)) contains a

_{15,15}*(c+d)*sign (or

*E*). Common signs of the cone, cylinder and torus are found in the second and fourth columns (2.5). Then:

_{20,20}where:

In (2.7), the matrix text is decomposed by different bases *P _{divisor1}* and

*P*. The

_{divisor2}*P*basis relies on the mutual positions between the repeating signs, relative to the torus in the formulas (2.1). The

_{divisor1}*P*relies on the positions between repeating signs relative to the signs of the

_{divisor2}*D*dictionary in the formulas (2.1). In a general case, relying on the position of signs in the formulas is essential if the signs are non-commutative (for example, signs are matrices, vectors, tensors or hypercomplex numbers). Still, it is useful even in scalar cases: for instance, it is the

_{R}*πr*area of the circle formula that is considered canonical not

^{2}*r*.

^{2}πGrebner-Shirshov basis for (2.7):

Then:

*P _{quotient1}* and

*P*have repetitions (link of matrix units by the second index), and they are subject to further reduction. All the links are solvable. The additive

_{quotient2}*P*and

_{quotient1}*P*will acquire a multiplicative form (as in the language example).

_{quotient2}The method of algebraic structuring of texts allows finding appropriate classifiers and dictionaries for texts of different nature. That is, classifying texts without a priori ascription of classification signs and class names. This kind of classification is called categorization or posterior classification. For instance, classification features for (2.4) will be:

*P*and_{divisor1}*P*(common_{divisor2}*π*and*r*in different places in the formulas)the total number of terms in the parentheses of

*P*and_{quotient1}*P*(four)_{quotient2}the ratio of

*π*and*r*in the parentheses of*P*and_{quotient1}*P*(1, 1, 2 and 3, 3, 2)_{quotient2}factors of the multiplicative form of

*P*and_{quotient1}*P*_{quotient1}various fragments of the

*P*remainder (deductions as a class of formulas with a remainder-fragment).

Names of classes coincide with the names of the classification features and their combinations.

## References

[1] Pshenichnikov S. B. Algebra of text. Researchgate Preprint, 2021.