avinashvarna / audio_alignment

Align various Sanskrit texts and audio
MIT License
11 stars 7 forks source link

Document data.json format for interface #2

Closed avinashvarna closed 3 years ago

avinashvarna commented 3 years ago

Document the structure of the data.json or add a "How to add a new set of data" section to the README to make it easy to contribute new aligned audio + text data.

hrishikeshrt commented 3 years ago

Currently data.json is of the form,


{
    'data': [
        {
            'key': 'text-used-to-refer-to-the-file', 
            'name': 'name displayed in the corpus list',
            'audio_url': 'url that will be used as is (can still be relative',
            'word_alignment': 'path to the file containing word alignment',
            'sentence_alignment': 'path to the file containing sentence alignment, unused'
        }, ...

    ]
}

There's scope for adding corpus details such as name, description etc in the top-level, (currently the name is "deduced" in the flask file as the parent directory name of the data.json (which is a bit clumsy).

Adding new data is basically equivalent to adding a new directory at the top level (besides others such as ramayana, meghaduta, and a data.json file inside them.

I'll put this tentative information in a README later.

The entire process can be definitely made smoother, such as,

hrishikeshrt commented 3 years ago

PR #4 handles this for the most part

avinashvarna commented 3 years ago

Closed via PR #4