File size: 2,297 Bytes
f2034cd
 
 
 
 
 
0bdc135
 
 
f2034cd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0bdc135
f2034cd
 
 
 
0bdc135
f2034cd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0bdc135
 
 
8900e79
 
 
 
 
0bdc135
 
 
 
 
f2034cd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
from modules.config.categories import ScriptureCategoryConstants
from modules.google_drive.google_drive_utils import convert_drive_url_to_direct

brahmandpuranam_config = {
    "name": "brahmandpuranam",
    "title": "Brahmanda Puranam",
    "banner_url": convert_drive_url_to_direct(
        "https://drive.google.com/file/d/1r0fV1AqASV0LsipTOPzJ7hmgswT5hNBZ/view?usp=drive_link"
    ),
    "category": ScriptureCategoryConstants.PURANAM,
    "output_dir": "./output/brahmandpuranam",
    "collection_name": "brahmandpuranam",
    "collection_embedding_fn": "openai",
    "unit": "sloka",
    "unit_field": "_global_index",
    "field_mapping": {
        "text": "lyrics_sa",
        "chapter_name": "chapter_name",
        "unit_index": "_global_index",
        "relative_path": lambda doc: (
            " | ".join(
                [
                    doc[key]
                    for key in sorted(
                        [k for k in doc.keys() if k.startswith("title_") and doc[k]],
                        key=lambda x: int(x.split("_")[1]),
                    )
                ]
            )
            + f" || {doc.get('_global_index', '')} ||"
        ),
    },
    "metadata_fields": [
        {
            "name": "_global_index",
            "datatype": "int",
            "label": "Verse Index",
            "description": "Absolute verse index",
            "show_as_filter": True,
            "is_unique": True,
        },
        {
            "name": "chapter_name",
            "datatype": "str",
            "label": "Chapter",
            "description": "Original chapter title",
            "show_as_filter": True,
        },
        {
            "name": "lyrics_sa",
            "datatype": "str",
            "label": "Sanskrit",
            "description": "Verse text in Sanskrit",
        },
    ],
    "pdf_path": "./data/brahmandpuranam.pdf",
    "source": "",
    "language": "san",
    "example_labels": [],
    "examples": [],
    "llm_hints": [],
    "credits": {
        "art": [],
        "data": [
            {
                "name": "Sanskritam",
                "url": "https://www.sanskritam.world/puranas",
                "role": "Data provider",
            },
        ],
        "audio": [],
        "video": [],
    },
    "audio_modes": {},
}