You are here

Parsing Statistics

Our goal for a parsing analysis of the text was to analyze each stanza in order to identify the correct declined/ conjugated form for each term, and to associate it with its respective Clause as an argument (for e.g., the NOM subject or ACC object of a verb in active voice) or as an adjunct/ non-argument (for e.g, LOC, VOC). The declensions and conjugations should also show details of the base/ root and other relevant details of each declension/ conjugation. This is a very challenging problem, as will become clear from a review of our analysis of each stanza.

A sample parsing analysis for Stanza 1.39 is shown below:


A: katham na jnyeyam asti asmAbhiHa pApAt asmAn/asmAt nivartitum kulakSHayakRutam doSHam prapashyadbhiHa janArdana

A.2:

  • katham:Indeclinable
  • na:Indeclinable
  • jnyeyam:NOM-S:jnyeya:Neut.:Noun:potential_participle_passive_yat_9U_jnA
  • asmAbhiHa:INS-P:asmad:Masc.:Pronoun:Link_gov_jnyeyam
  • A.1:

  • pApAt:ABL-S:pApa:Neut.:Noun
  • asmAt:ABL-S:idam:Masc.:Pronoun
  • nivartitum:-:ni-vRut:1:A:VerbInfinitive
  • kulakSHayakRutam:ACC-S:kula-kSHaya-kRuta (kulakSHayakRuta) :Neut.:Noun:past_participle_passive_kta_8P_kRu:Link_subj_doSHam
  • doSHam:ACC-S:doSHa:Neut.:Noun:Link_gov_prapashyadbhiHa
  • prapashyadbhiHa:INS-P:prapashyat:Masc.:Adj:present_participle_shatRu_1P_pra-dRush
  • janArdana:VOC-S:janArdana:Masc.:Noun

  • In our presentation of the results, we will largely follow the method followed by Sanskrit grammarians for several thousand years (see for e.g., [KAL2015] [1] and [MM2015] [2] ). However, we are unable to provide an analysis of 'compound words' ('samAsa'), as this is beyond the capabilities of a syntactic parser. The parser needs to choose one from amongst several alternative forms for each term (for e.g., 'jnyeyam' above could be one of 'Adj/Noun:jnyeya:NOM-S-Neut.:that which ought to be known', 'Adj/Noun:jnyeya:ACC-S-Masc.:one who ought to be known', or 'Adj/Noun:jnyeya:ACC-S-Neut.:that which ought to be known' i.e. it could be either the subject of the clause, the object, or a Predicative Adjective)1. The parsing analysis of each stanza shows the clauses (for e.g., A.1 and A.2), as well as the selected declension/ conjugation/ indeclinable form for each term. Please note that the sample analysis above does not show the insertion by the parser of the elided 'copula verb' ('as:2:P:to be:VerbPresent') in clause A.1, which is crucial for the analysis, but may cause some confusion for the reader as it is not present in the input provided to the parser.


    Although our parser is still at an exploratory stage, it performed very well on stanzas of Chapter 3 of the text. However, we do not claim that this high level of accuracy can be replicated in further chapters, as significant variations have been noted in the syntactic complexity of each stanza, and a number of nuances will need to be handled. In general, the accuracy of the parser will be lower on liturgical texts and non-prose texts (where the word order is partially determined by the metre of the verse), making it extraordinarily difficult for the parser to make the correct choices in the absence of sufficient cues. It must be kept in mind that the insertion of elided verbs is crucial in order that the parser can make the right choices, but it is far from trivial to insert these elided terms correctly.

    It must also be pointed out that the input used by the parser was the output produced by the 'sandhi analyzer' (i.e. terms are expected to be in their underlying forms, prior to the operation of sandhi sutras), but with the 10 defects observed in the sandhi analysis stage being marked as 'unresolved' (for e.g., the input to the parser was changed to 'dvividhAHa/dvividhA' and proktAHa/proktA in Stanza 3.3, and this was treated by the parser as a term that was not 'resolved' by the 'sandhi analyzer'). The parser was additionally tasked with identifying the correct alternative for each such 'unresolved' term (for e.g., choose 'dvividhA' and 'proktA' instead of 'dvividhAHa' and 'proktAHa' in this stanza, if justified). Happily, the parser chose the correct alternative for 9 of these 10 defects. The only 'unresolved' term that was incorrectly resolved by the parser was the term 'varta/varte' in Stanza 3.22. This was a situation where both options were verbs that did not require a subject ('varte:1st Person Singular Atmanepada VerbPresent', 'varta:2nd Person Singular Parasmaipada VerbImperative'), hence the parser was not able to apply the subject agreement constraint in either case. Needless to say, this manual intervention is a temporary measure, as the 'sandhi analysis' software will eventually mark the alternatives for 'unresolved' terms automatically. We prefer to keep the 'sandhi analyzer' and the parser independent of each other at present, in order to be able to measure the defects in each independently.

    In conclusion, it is safe to say that parsing a text of this complexity is extraordinarily difficult given the occurrence of 'free' word order. However, despite this difficulty, we believe that it is necessary for a 'bottom-up' analysis of such texts in order to obtain a highly nuanced understanding of 'free' word order in Sanskrit. We will show a number of instances where the assignment by the parser does not coincide with one or the other of our chosen experts ([KAL2015] and [MM2015]). We have also come across a few instances (in later chapters of the text) where the parser's assignment is at variance with those of both the experts, but the parser has probably made the correct assignment (this is an advantage of a rule-based system, provided the rules are highly nuanced).

    Defective assignment of Case/ Number/ Clause have been highlighted in the respective stanzas. The standard used for identifying defects were [KAL2015] and [MM2015]. As will be seen in the table below, most of the defects identified as per [KAL2015] are questionable if checked against [MM2015]. It is possible that some of these 'defects' may be printing errors in [KAL2015].

    Table 1: Count of Expected terms in parser output
    Description Count Notes
    Input terms 552 The terms after the sandhi process analyses the input stanza.
    Additional Elided verb terms 33 The parser needs to insert elided verbs in a large number of clauses.
    False Negative Elided verb terms 1 The parser failed to create these elided verbs. See Table 5
    False Negative Elided non-verb terms 1 The parser failed to create these elided terms. See Table 5
    Total Expected terms 587 This count is used as the denominator for computing percentage of defects
    Total Defects (see Table 2 below) 1+9+5=19 2.6 percent (13/587)

    From the above analysis, we can see that the number of defects is quite small (i.e. 2.6 percent) in the assignment of terms by the parser. The parser necessarily needs to insert elided terms (largely verbs, but also nominals occasionally) in order to figure out the clause structure, as the correct assignment of terms is contingent upon identifying the clauses. In this process, some errors can result from the erroneous inclusion or exclusion of an elided term. However, we expect the parser to perform better while processing prose, as the complexity of non-prose texts is very high due to the constraints imposed by meter (i.e. 'free word-order' is expected to be less of a problem in prose text as compared with non-prose).


    Table 2: Summary of defects
    Description Count Notes
    Description Correct Defective Notes
  • *dd
  • 0 0 Incorrect definitions in the parser's lexicon are marked as '*dd' in the table below.
  • *spd
  • 0 0 Short-form pronouns are very difficult to handle reliably (marked as '*spd' below). The correct identification of short-form pronouns may be beyond the capability of a syntactic parser, as this task may require the parser to have an understanding of the 'real world'.Short-form pronouns are very difficult to handle reliably (marked as '*spd' below). The correct identification of short-form pronouns may be beyond the capability of a syntactic parser, as this task may require the parser to have an understanding of the 'real world'.
  • *ad
  • 5 1 Incorrect declension/ conjugation assignments by the parser are marked '*ad' below.
  • *gd
  • 2 0 Incorrect gender in declension assignments by the parser are marked '*gd' below. Selecting the correct gender (where there are multiple genders) is a semantic issue that is beyond the capabilities of a syntactic parser.
  • *cd
  • 11 9 Incorrect clause assignments by the parser are marked '*cd' below. Clause assignment is marked as N.A for [KAL2015], as it is not marked. Only significant differences are shown.
  • *hd
  • 11 5 Sometimes, a higher-level understanding is required to handle concepts such as metaphors, that require the creation of additional Hidden Clauses (and elided verbs). These semantic defects of the parser are marked '*hd' in the tables below. Clause assignment is marked as N.A for [KAL2015], as it is not marked. Only significant differences are shown.
  • *id
  • 0 0 Incorrect input leading to defective assignments by the parser are marked '*id' below.
    Total Defects 29 15 See Tables 3,4,5 below

    Notes:

    • We have not marked defects in identification of participles (for e.g., kta, yat, shatRu) or compound words (samAsa), as too many terms are unmarked as such in [MM2015] (although they are assumed to be present in the translations).
    • Further, we have not marked defects in the identification of the Arguments of participles, since these are not marked in [KAL2015], and occasionally unmarked in [MM2015].
    • The internal structure of clauses is difficult to compare, as the parser treats non-finite verbs (Gerunds and Infinitives) as separate clauses with their own arguments, while [MM2015] includes them as a part of a larger finite verb clause.

    The following table lists those terms which have been assigned the wrong Conjugation (Verb, Number, Person) or Declension (Case, Number, Gender) in the Gloss.

    Table 3: Defective assignment of Declension/ Conjugation/ Indeclinable Glosses to terms by the Parser
    # Stanza Clause Word ASSIGNMENT Type Comment #Defects
    Parser [KAL2015] [MM2015]
    1 3.7 A.2 akarmaNNaHa ABL-S GEN-S ABL-S *ad Not a defect 0
    2 3.16 A.1 pravartitam Neut. Neut. Masc. *ad Not a defect 0
    3 3.16 A.1 chakram Neut. Neut. Masc. *ad Not a defect 0
    4 3.19 A.1 tasmAt ABL-S:Masc. Ind. ABL-S:Neut. *ad Not a defect 0
    5 3.22 A.2 varta/varte varta varte varte *ad *Defect* 1
    6 3.36 B.1 kena Masc. Masc. Neut. *gd Not a defect 0
    7 3.38 B.1 malena Neut. Masc. Masc. *gd Not a defect 0
    TOTAL DEFECTS 1

    The following table lists those terms that are assigned to the wrong clause by the parser. Note that information on clauses can only be ascertained from [MM2015] ([KAL2015] does not provide such details).

    Table 4: Defective assignment of Clauses to terms by the Parser
    # Stanza Clause Word ASSIGNMENT Type Comment #Defects
    Parser [KAL2015] [MM2015]
    1 3.12 A.2 tEHa A.2 N.A. A.3 *cd *Defect* 1
    2 3.12 A.2 dattAn A.2 N.A. A.3 *cd *Defect* 1
    3 3.22 A.1 triSHu A.1 N.A. A.3 *cd Not a defect 0
    4 3.22 A.1 lokeSHu A.1 N.A. A.3 *cd Not a defect 0
    5 3.27 A.2 sarvashaHa A.2 N.A. A.3 *cd *Defect* 1
    6 3.28 A.1 guNNakarmavibhAgayoHa A.1 N.A. A.3 *cd *Defect* 1
    7 3.33 A.1 sadRusham ACC-S ACC-S Ind. *cd Not a defect 1
    8 3.36 B.2 pUruSHaHa B.2 N.A. B.1 *cd Not a defect 1
    9 3.40 A.2 jnyAnam A.2 N.A. A.3 *cd *Defect* 1
    10 3.40 A.3 dehinam A.3 N.A. A.2 *cd *Defect* 1
    11 3.42 A.4 yaHa A.4 N.A. A.2 *cd *Defect* 1
    TOTAL DEFECTS 9

    The following table lists those terms that can be classified as Hidden Clauses that the parser should have created, but did not detect. Terms shown in square brackets are elided terms (such as [asti] below) that should have been inserted by the parser in the Hidden Clause. Note that information on clauses can only be ascertained from [MM2015] ([KAL2015] does not provide such details).

    Note the terms marked 'False Positive [verb:asti]' shown in Stanza 3.37, where the parser assumed there were two Hidden Clauses and created clauses and elided verbs (i.e. the clauses 'this is desire' and 'this is anger'). These are not considered parsing defects because other commentators are in agreement with this treatment by the parser. The False negative [verb:Avriyate] shown in 3.38 below indicates a Hidden Clause that was not detected by the parser.

    Table 5: Defective identification of Hidden Clauses by the Parser
    # Stanza Clause Word ASSIGNMENT Type Comment #Defects
    Parser [KAL2015] [MM2015]
    1 3.37 B.4 kAmaHa B.4 N.A. B.2 *hd Not a defect 0
    2 3.37 B.4 eSHaHa B.4 N.A. B.2 *hd Not a defect 0
    3 3.37 B.4 False Positive [verb:asti] B.4 N.A. N.A. *hd Not a defect 0
    4 3.37 B.3 krodhaHa B.3 N.A. B.2 *hd Not a defect 0
    5 3.37 B.3 eSHaHa B.3 N.A. B.2 *hd Not a defect 0
    6 3.37 B.3 False Positive [verb:asti] B.3 N.A. N.A. *hd Not a defect 0
    7 3.38 A.3 AdarshaHa A.3 N.A. A.4. *hd *Defect* 1
    8 3.38 A.3 malena A.3 N.A. A.4. *hd *Defect* 1
    9 3.38 A.3 cha A.3 N.A. A.4. *hd *Defect* 1
    10 3.38 A.3 False Negative [Indclinable:yathA] A.3 N.A. A.4. *hd *Defect* 1
    11 3.38 A.3 False Negative [verb:Avriyate] A.3 N.A. A.4. *hd *Defect* 1
    TOTAL DEFECTS 5

    • 1. [KAL2015] frequently does not distinguish between Adjectives and Nouns, hence we will not make that distinction when assignments to either are made by the parser. Note that, for the parser, this is usually a question of the definition of the term in the lexicon.

    References

    1. [kal2015] Kalavade L., Kalavade P.. Gitavyakaranam Panniniyapraveshaya. Chinmaya International Foundation:Unspecified; 2015.
    2. [mm2015] Michika M. Grammatical Analysis of the Bhagavad Gita Chapters 1 to 6. Arsha Avinash Foundation:Coimbatore; 2015.