Shatr

class aruudy.poetry.prosody.Shatr(text)

Bases: object

Shatr (Hemistich) object.

In Arabic, a verse is composed of two hemistiches (shatr). This object will contain all information about a given text.

Parameters:text (str) – The text to be analysed.
orig

the original input text.

Type:str
norm

the text after normalization.

Type:str
prosody

prosody form of a text.

Type:str
ameter

the Arabic meter using “w” as watad (peg) and “s” as sabab (cord).

Type:str
emeter

the English meter using “-” for long syllables and “u” for short ones.

Type:str
bahr

The bahr (meter) of the input text.

Type:Bahr
parts

The text split into different parts. Each part is a dict with these components:

  • emeter: the english meter of that part
  • type: the type of that part: is it regular or else
  • part: the text of that part
  • mnemonic: the mnemonic text of that part
Type:list(Part)

Methods Summary

to_dict([bahr, parts]) Generates a dict object of the Bahr.

Methods Documentation

to_dict(bahr=False, parts=False)

Generates a dict object of the Bahr.

Parameters:
  • bahr (bool) – if true: the bahr object will be dictionarized too. By default, it is False. Hence, the “bahr” is an object of type Bahr
  • parts (bool) – if true: the list of parts will be dictionarized too. By default, it is False. Hence, the parts in the list are objects of type Part
Returns:

A dictionary object describing the Shatr.

  • norm (str): normalized text
  • prosody (str): prosody form of the text
  • ameter (str): Arabic meter of the text
  • emeter (str): English meter of the text
  • bahr (Bahr or dict): the bahr of the text
  • parts (list(Part or dict)): the parts of the text

Return type:

dict