Russian nouns in grammatical dictionary

Russian noun declension in SQL dictionary

Typical noun in Russian language has 12 grammatical forms as a result of declension: six cases (nominative, genitive, instrumentative, accusative, dative and prepositive) and two numbers (singular and plural). Some nouns have additional form of genitive case. Uncountable nouns have only 6 forms for singular number. Partitive and locative cases are optional and rare.

countable noun uncountable noun

Given a noun basic form, it is possible to get the whole list of grammatical forms and their attributes by querying the database:

SELECT F.name, P.str_pairs
 FROM  sg_class C, sg_entry E, sg_form F, coord_pairs P
 WHERE C.name='СУЩЕСТВИТЕЛЬНОЕ' AND
       E.id_class=C.id AND E.name='кресло' AND
       F.id_entry=E.id AND
       P.id=F.id_dims

This query shows 12 grammatical forms:

namestr_pairs
кресло ЧИСЛО:ЕД ПАДЕЖ:ИМ
кресла ЧИСЛО:МН ПАДЕЖ:ИМ
кресла ЧИСЛО:ЕД ПАДЕЖ:РОД
кресел ЧИСЛО:МН ПАДЕЖ:РОД
креслом ЧИСЛО:ЕД ПАДЕЖ:ТВОР
креслами ЧИСЛО:МН ПАДЕЖ:ТВОР
кресло ЧИСЛО:ЕД ПАДЕЖ:ВИН
кресла ЧИСЛО:МН ПАДЕЖ:ВИН
креслу ЧИСЛО:ЕД ПАДЕЖ:ДАТ
креслам ЧИСЛО:МН ПАДЕЖ:ДАТ
кресле ЧИСЛО:ЕД ПАДЕЖ:ПРЕДЛ
креслах ЧИСЛО:МН ПАДЕЖ:ПРЕДЛ

Human readable grammatical attributes in second column can be used to filter the result set. As an example let us extract the singular number forms of the noun 'сахар':

SELECT F.name, CP.str_pairs
 FROM  sg_class C, sg_entry E, sg_form F, coord_pairs CP
 WHERE C.name='СУЩЕСТВИТЕЛЬНОЕ' AND E.id_class=C.id -- SELECT the nouns
       AND E.name='сахар'
       AND F.id_entry=E.id -- SELECT the noun forms
       AND CP.id=F.id_dims -- retrieve the grammatical attributes of the form
       AND CP.str_pairs LIKE '%ЧИСЛО:ЕД%'

As you can see this noun has an additional form for partitive case:

namestr_pairs
сахар ЧИСЛО:ЕД ПАДЕЖ:ИМ
сахара ЧИСЛО:ЕД ПАДЕЖ:РОД
сахару ЧИСЛО:ЕД ПАДЕЖ:ПАРТ
сахаром ЧИСЛО:ЕД ПАДЕЖ:ТВОР
сахар ЧИСЛО:ЕД ПАДЕЖ:ВИН
сахару ЧИСЛО:ЕД ПАДЕЖ:ДАТ
сахаре ЧИСЛО:ЕД ПАДЕЖ:ПРЕДЛ

Partitive case of this noun is in common use in such phrases as follows:

Добавь немного сахару.

A difference between Russian and Englisg nouns

As you can notice, the Russian nouns do not require the context to be distinguished from other parts of speech. This differs from the English language where the word 'inside' can be preposition, adverb, noun or adjective:

I went inside

The letter inside the envelope

From the inside

The inside man

The Russian words can usually be identified as nouns without additional information. The exceptions are few. For example, 'уж' can play the role of noun or adverb as shown by following sentences:

Уж замуж невтерпеж

Уж - это змея

The following MySQL SQL query evaluates the number of noun forms that can also be recognized as verbs, adverbial participles, adjectives or adverbs:

select max(X)*100.0/max(Y)
 from
  (
   select count( distinct NF.name ) as X, 0 as Y
    from sg_class C, sg_entry N, sg_entry X, sg_class XC, sg_form NF, sg_form XF, sg_lexem L
    where C.name='СУЩЕСТВИТЕЛЬНОЕ' and N.id_class=C.id and
          NF.id_entry=N.id and L.id=NF.id_lexem and
          XF.id_lexem=L.id and X.id=XF.id_entry and
          X.id_class<>C.id and XC.id=X.id_class and N.flags=0

   union

   select 0 as X, count(L2.id) as Y
    from sg_lexem L2
) Z

It estimates the probability of speech recognition error as 0.16%. Compare this value to ,b>5.4% for English nouns. These values do not take the word frequency into accoun.

Determination of Russian noun gender

This SQL query shows the gender of several noun:

SELECT E.name, S.name
 FROM  sg_coord C, sg_entry E, sg_entry_coord EC, sg_state S
 WHERE C.name='РОД' AND
       E.name IN ( 'мышка', 'мышонок', 'животное' ) AND
       EC.id_entry=E.id AND EC.icoord=C.id AND
       S.id_coord=C.id AND S.id=EC.istate

This straghtforward is applyable in for almost all nouns. Exceptions are rare: some nouns can be either masculine or feminine depending on context. For example, 'Женя' may be a short form of Евгений (masculine) or Евгения (feminine):

male name   female name

ORM library provides another way to determine the gender of a noun. The following C# code prints the relevant information about the nouns 'мышка', 'мышонок' and 'животное'


// Connect to the dictionary database
SqlConnection cnx = new SqlConnection("Data Source=localhost;Initial Catalog=solarix;Integrated Security=True;MultipleActiveResultSets=true;" );
cnx.Open();
Solarix.MSSQL_DataAccessLayer dal = new Solarix.MSSQL_DataAccessLayer(cnx);

// Noun gender determination
foreach( string noun_str in new string[] { "мышка", "мышонок", "животное"
 } )
 {
  // look up the dictionary and find the word entry
  Solarix.WordEntry noun_entry = dict.entry[noun_str]; 
  
  // get the gender attribute
  Solarix.CoordPair igender = noun_entry.attrs.FindState(SolarixGrammarEngineNET.GrammarEngineAPI.GENDER_ru);

  // print the gender in human readable form
  switch(igender.id_state)
  {
   case SolarixGrammarEngineNET.GrammarEngineAPI.MASCULINE_GENDER_ru:
    Console.WriteLine("{0}: masculine gender", noun_str );
    break;

   case SolarixGrammarEngineNET.GrammarEngineAPI.FEMININE_GENDER_ru:
    Console.WriteLine("{0}: feminine gender", noun_str );
    break;
    
   case SolarixGrammarEngineNET.GrammarEngineAPI.NEUTRAL_GENDER_ru:
    Console.WriteLine("{0}: neuter gender", noun_str );
    break;
  }
 }

 // ...

The result of this code execution is shown here:

мышка: feminine gender
мышонок: masculine gender
животное: neuter gender

Additional information

Имя существительное

SQL Dictionary SDK

Grammatical Dictionary SDK

  © Козиев Илья 2019
changed 05-Feb-12