ambuda-org / vidyut

Infrastructure for Sanskrit software. For Python bindings, see `vidyut-py`.
53 stars 21 forks source link

Add support for capturing 'yati' positions in a metre. #97

Closed MSSRPRAD closed 11 months ago

MSSRPRAD commented 11 months ago

Currently we don't capture this information neither in our data, data structure nor in the code.

Either we can further break down the scheme from a Vec<Vec<>> to a Vec<Vec<Vec<>>> or we can store it as seperate offsets.

akprasad commented 11 months ago

I updated meters.tsv to store yati as the | character. But, it's true that yati is not modeled or used anywhere.

Storing it as an offset seems like the right approach (good insight!). Maybe instead of:

weights: Vec<Vec<PatternWeight>>

we can have:

padas: Vec<Pada>

struct Pada {
  weights: Vec<PatternWeight>,
  yati: Vec<usize>
}

(As an aside -- I know PatternWeight is clunky. I'm waiting for the program to mature more before deciding what to do with it.)