Table of contents

Glossary


Word Meaning
CELL a packet of information
INDENT 4 spaces at the beginning of a line
LINE A new line on the editor

Cells

Cells are blocks of information, inspired by the Turing Machine. But unlike the TM, cells start from 0 and move only forward.

Cells are the basic building blocks of the Prasa language. They are used to store information and perform operations on them.

Prasa uses INDENT to move forward between cells.


Example

no indent here -> [cell 0]
  with an indent, you move forward -> [cell 1]
    and again -> [cell 2]
            as far as you'd like -> [cell 6]
    and come back any time -> [cell 1]
      number of indents is the number of cell you're on -> [cell 3]

INDENT can added using the TAB key


Cell Values

All cells start with a base value of 0 and can be assigned values based on the number of syllables on that particular cell.


Example

no indent here -> [cell 0 = 4]
  with an indent, you move forward -> [cell 1 = 8]
    and again -> [cell 2  = 2]
            as far as you'd like -> [cell 6 = 5]
    and come back any time -> [cell 2 = 8 (6 + 2)]
      number of indents is the number of cell you're on -> [cell 3 = 13]

Summing

A cell’s value can be carried on by creating a new line with the same indentation level at any point in the code.

For Example

this is cell zero
    this is cell one
        now onto the second
this is cell zero again

In such cases, cell values on all the lines of that cell are summed.

In above example, 5 syllables from line 1 and 7 syllables from line 4 are both added, and thus the value of cell 0 is now 12.

Scaling

Cell values can also be multiplied using the BRACKET tokens. Number of syllables between an opening ( and closing ) parenthesis are multiplied to the cell’s existing value.

river flows to the right
    and further apart
    (before breaking)
        into the ocean

In CELL 2 on the above example, an initial value of 4 from LINE 2 is then multiplied with the value of 4 from LINE 3, leaving the final value of 16.

Opening ( and closing ) brackets need to be on the same line.

Any text cannot be followed after the closing bracket on a line.

In that case, syllable sequences, except the first syllable, are accounted for, but not their value counts. (see Syllables)

Example

        eyes of
that dragon
(i lay before) her eyes

Grammar

Grammatics in Prasa are built upon poetic grammars from Telugu language.


  • U is primary stress syllable
  • I is no stress syllable

Each word in the program is broken down into number of syllables, as well as by syllable stress (U & I)

Example

no indent here -> [cell 0 = 4, seq = UUUU]
  with an indent, you move forward-> [cell 1 = 8, seq = UUUUUUI]
    and again -> [cell 2  = 2, seq = IIU]
            as far as you'd like -> [cell 6 = 5, seq = UUUUU]
    and come back any time -> [cell 2 = 8, seq = IUUUIU]
      number of indents is the number of cell you're on -> [cell 3 = NaN, seq = UIUUIUIUUUU]

Syllable sequences

Syllables are then concactanated into a U-I pattern for each cell (inclusive of summing and scaling syllables)

The pattern must match with one of the following Telugu grammatic pattern


Utpalamāla

UII UIU III UII UII UIU IU

Length: 20

Campakamāla

III IUI UII IUI IUI IUI UIU

Length: 21

Mattēbham

IIU UII UIU III UUU IUU IU

Length: 20

Śārdūlam

UUU IIU IUI IIU UUI UUI U

Length: 19



Each cell’s concactanated syllable pattern must match with the same category from above.


Syllable derivates are calculated based on the cmu-en.json file implementation.


Dictionary structure

RIVER: 
{
  "sc": 2,
  "sp": "UI",
  "seg": [
    {
      "syllable": "RI",
      "position": 1,
      "pattern": "U"
    },
    {
      "syllable": "VER",
      "position": 2,
      "pattern": "I"
    }
  ]
}
key desc
sc syllable count
sp syllable pattern
seg syllable-based segments
seg.syllable syllable part
seg.position position of the syllable in the word
seg.pattern U / I pattern for the syllable segment