GithubHelp home page GithubHelp logo

openpecha / toolkit Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 4.0 11.94 MB

🛠 Tools to create, edit and export texts and annotations

Home Page: https://toolkit.openpecha.org

License: Apache License 2.0

Python 59.00% HTML 41.00%
corpus-tools annotations layered-text

toolkit's Introduction


OpenPecha

OpenPecha Toolkit

DescriptionOwnerInstallDocs


Description

PyPI version Test Test Coverage Publish Code style: black

OpenPecha Toolkit allows state of the art solution for distributed standoff annotations on moving texts, in which Base layer can be edited without affecting annotations. This is made possible by our OpenPecha Native Format called opf (OpenPecha Format) and our collection of importers which can parse existing text into opf and exporters which can export opf text into any format (.epub, .docx, .pdf, etc)

Owner

💾 Install

Stable version:

pip install openpecha

Daily development version:

pip install git+https://github.com/OpenPecha/Openpecha-Toolkit

Docs

  • Documentation: docs
  • If you have any problems with openpecha-toolkit, please open issues

Developer Installation.

git clone https://github.com/OpenPecha-dev/openpecha-toolkit.git
cd openpecha-toolkit
pip install -r requirements-dev.txt
pip install -e .
pre-commit install

Testing

PYTHONPATH=.:$PYTHONPATH pytest tests

toolkit's People

Contributors

10zinten avatar 10zintopjor avatar actions-user avatar dependabot[bot] avatar eroux avatar evanyerburgh avatar kaldan007 avatar lguenier avatar ngawangtrinley avatar spsither avatar spsithertcrc avatar ta4tsering avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

toolkit's Issues

Annotation Update

  • Implement Tofu ids:
    • Create Tufu-ids manager class
    • Recovery method for lost tofu-id
  • Use Tofu-id to update the annotation

"update" description might be confusing for users

it reads: "Command to update the annotations, must be run making edits to base text."

when run, it reads: "Updating annotations to [Work ID]".

from a user perspective, i think this might be confusing. the user is making changes to the base text. and updating the base text. right? if i'm not mistaken, it is then the software that—based on changes to the base text—makes updates to the index in the annotation layers.

if i am a normal user, i think i don't actually care about this. i wouldn't know how it works. in my mind, i am updating the base layer (not the annotations). so an improvement could be:

"Command to update the base text with your edits."
"Updating [Work ID] base text".

JSON over YAML for index and layers

Comparison

YAML is human-friendly therefore, great for manual editing but it's slow.
JSON is not human-friendly but much faster than YAML for both loading and dumping.

Our use case

  • We are facing a very slow loading of index.yml for katen pechas at the moment.
  • There is no limit to the size of index.yml and layers.yml files. This will lead to very slow loading and dumping for large layers files.
  • Index and layers are not intended for manual editing therefore, I propose to use JSON over YAML for index and layers.

TODO:

  • convert all the index.yml and .yml to .json with cli
  • Load and dump json in formatters
  • Load json in serializer.

@eroux @ngawangtrinley @kaldan007

Major Revision from /buda

  • rename poti into pecha in function names, etc. in Lou's code
  • the modules in buda/ should be in the main directory
  • rename github_utils.py into git_utils.py and integrate some of the function from op_bare.py
  • integrate the functions from serialize.py into op.py
  • glossary of variable name conventions:
    • lname = local name = P0001
    • qname = qualified name = op:P0001 where op: is a namespace
    • fname = file name
  • merge rdf_setup.py into rdf.py in serializers/

add version in CLI

It should be possible to see the version in the CLI, it could be either:

  • adding the version number somewhere in the --help message
  • adding a --version option

HFML Formatter Fails test cases

Test cases where HFML Formatter fails
Test case 1

[68a.6]མཐོང་བས་ནི་ཤིན་(དུ་,ཏུ་)མཐོང་། །ཆོས་ཉིད་མཐོང་བ་མ་ཡིན་ནོ། །ཁོང་སྟོང་ཁྱོད་ཀྱི་སྐུ་ལ་མེད། །ཤ་དང་རུས་པ་ཁྲག་མེད་ཀྱང་#། །ནམ་མཁའི་དབང་པོའི་གཞུ་བཞིན་དུ། །ཁྱོད་ཀྱི་སྐུ་ནི་སྟོན་པར་མཛད། །སྐུ་ལ་བསྙུན་མེད་མི་གཙང་#མེད། །བཀྲེས་དང་སྐོམ་པ་འབྱུང་མེད་ཀྱང་། །ཁྱོད་ནི་

Error message

File "/home/tenzin/ML/project/Esukhia/openpecha-toolkit/openpecha/formatters/hfml.py", line 121, in search_before
    length_before = length_before + (len(s[0])-len(error_part))
NameError: name 's' is not defined

HFML Serializer

  • add TEI reference for HFML tag
  • Implement SerializerHFML
  • Implement mechanism to Add/Edit annotation
  • Create test suits

Make release names unique

any export should have a name unique so users can differentiate a) texts with the same name, and b) multiple exports of the same view on their machines.

སྨོན་ལམ།.epub can be very ambiguous.

We need something like:
<truncated title transliteration?><2 last digits of pecha><version?><incremental serial number?>

<truncated title transliteration?> github doesn't seem to like unicode in file names, so we could use wylie without (') or even better a phonetic transliteration.

Padmakara EN int. looks like the best one for our use case

MVP Todo

  • Local id support for HFML serializer

  • Test whole HFML workflow:

    • Add new annotation
    • Edit anntation
    • Delete annotation
  • CLI command for:

    • HFML formatter
    • HFML serializer
    • Ebook serializer
  • Github Action

    • HFML format and serialize
    • opf Export
  • Entry point:
    1. HFML -> opf -> HFML with local-id

  • Release and download

forcing the -bo option in Google OCR?

Here are some remarks from someone who uses OpenPecha on BUDA and is also uses Google OCR directly:

Oh, as I start to use the e-text facility of
https://library.bdrc.io/
I notice that occasionally google ocr has OCR'd Tibetan as Devanāgari!
I wonder if -bo option was used during OCR and google overroad it, or it was left in multilingual mode.
I have not seen this behavior in my own use of the -bo option.

Do we force the language to Tibetan when we run the OCR?

OCR: bug in certain layouts

This is something that we can live with and is probably very difficult to fix in an automatic way, but when a pecha has an illustration in the middle (like in this image), the OCR considers the left part of the image to be one paragraph, and the right part to be another one, while in fact this is one long paragraph where each line is split in two. Here's the result for this specific page:

/oM swa sti/_skyabs 'gro yan lag drug pa 'di la don bzhi las/_dang po
yan lag drug pa/_gnyis pa 'gyur gyi phyag dkon mchog gsum la phyag 'tshal
dang |_gzhung don dngos bshad pa'o/_/dang po ni/_skyabs 'gro yan lag drug pa bshad//
yul dus dgos pa dang /_/phan yon bslab bya blang ba rnams/_/rtsa ba sdom
dang dkon mchog gsum gyi yon tan dran pas skyabs su 'gro/_/gnas gsum bstan
mtshan gyi don/_rgya gar skad du/_Sha TAng+ga sha ra NaM/_bod skad du/_skyabs 'gro
lo/_/gsum pa gzhung gi don la gnyis/_brtsam par dam bca' ba bsdus don dang bcas pa
gnyis pa la gnyis/_mdor bstan pa dang /_rgyas par bshad pa'o/_/dang po ni/_cis 'gro
du bshad pa yin/_/gnyis pa rgyas par bshad pa la rim par/_'khor ba la/_'jigs
pa'i yul de la/_/'di nas byang chub thob bar ro/_/mu stegs spyod las log
rtsa ba'i chos sde 

CCTV fails if there are changes in the layer text.

CCTV fails at following cases:

srcbl = abefghijkl
dstbl = abcdefgkl
CCTV = [(0, 2, 0), (2, 5, 2), (8, 10, -1)]

Note: - is the annotation

Cases:

  1. Changes at beginning of layer text

    source destination
    layer_text ab-efg-hijkl abc-defg-kl
    anno (2,4) (3,6)

    get_updated_coord():
    - input = 2, cctv = 2, output = 2+2 = 4
    - input = 4, cctv = 2, output = 4+2 = 6

    Expected output should be (3, 6)

  2. Changes at end of layer text

    source destination
    layer_text ab-efghijk-l abcd-efg-kl
    anno (2,8) (4,6)

    get_updated_coord():
    - input = 2, cctv = 2, output = 2+2 = 4
    - input = 8, cctv = -1, output = 8-1 = 6

    Expected output should be (3, 6)

error in a pecha yaml format, crashing the toolkit

Unfortunately I can't really know which pecha does this, but I can't import the openpecha in BUDA anymore because of this error when I run the import (after pulling the latest version of the pechas):

Converting into rdf:  81%|########################################################################################################################1                            | 3455/4283 [37:29<01:30,  9.16it/s]
Traceback (most recent call last):
  File "/home/admin/.local/bin/openpecha", line 11, in <module>
    load_entry_point('openpecha', 'console_scripts', 'openpecha')()
  File "/home/admin/.local/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/admin/.local/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/admin/.local/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/admin/.local/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/admin/.local/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/admin/openpecha-sync/openpecha-toolkit/openpecha/cli.py", line 418, in cache_to_store
    opm.sync_cache_to_store(store_uri, ldspdi_uri, force, opids)
  File "/home/admin/openpecha-sync/openpecha-toolkit/openpecha/buda/openpecha_manager.py", line 209, in sync_cache_to_store
    if not op.is_ocr():
  File "/home/admin/openpecha-sync/openpecha-toolkit/openpecha/buda/op.py", line 44, in is_ocr
    meta = self.get_meta()
  File "/home/admin/openpecha-sync/openpecha-toolkit/openpecha/buda/op.py", line 40, in get_meta
    self.meta = self.read_meta()
  File "/home/admin/openpecha-sync/openpecha-toolkit/openpecha/buda/op.py", line 35, in read_meta
    return self.read_file_content_yml("meta.yml")
  File "/home/admin/openpecha-sync/openpecha-toolkit/openpecha/buda/op_bare.py", line 30, in read_file_content_yml
    return yaml.safe_load(ymlstr)
  File "/home/admin/.local/lib/python3.7/site-packages/yaml/__init__.py", line 162, in safe_load
    return load(stream, SafeLoader)
  File "/home/admin/.local/lib/python3.7/site-packages/yaml/__init__.py", line 114, in load
    return loader.get_single_data()
  File "/home/admin/.local/lib/python3.7/site-packages/yaml/constructor.py", line 41, in get_single_data
    node = self.get_single_node()
  File "/home/admin/.local/lib/python3.7/site-packages/yaml/composer.py", line 36, in get_single_node
    document = self.compose_document()
  File "/home/admin/.local/lib/python3.7/site-packages/yaml/composer.py", line 55, in compose_document
    node = self.compose_node(None, None)
  File "/home/admin/.local/lib/python3.7/site-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/home/admin/.local/lib/python3.7/site-packages/yaml/composer.py", line 133, in compose_mapping_node
    item_value = self.compose_node(node, item_key)
  File "/home/admin/.local/lib/python3.7/site-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/home/admin/.local/lib/python3.7/site-packages/yaml/composer.py", line 133, in compose_mapping_node
    item_value = self.compose_node(node, item_key)
  File "/home/admin/.local/lib/python3.7/site-packages/yaml/composer.py", line 64, in compose_node
    if self.check_event(AliasEvent):
  File "/home/admin/.local/lib/python3.7/site-packages/yaml/parser.py", line 98, in check_event
    self.current_event = self.state()
  File "/home/admin/.local/lib/python3.7/site-packages/yaml/parser.py", line 449, in parse_block_mapping_value
    if not self.check_token(KeyToken, ValueToken, BlockEndToken):
  File "/home/admin/.local/lib/python3.7/site-packages/yaml/scanner.py", line 116, in check_token
    self.fetch_more_tokens()
  File "/home/admin/.local/lib/python3.7/site-packages/yaml/scanner.py", line 260, in fetch_more_tokens
    self.get_mark())
yaml.scanner.ScannerError: while scanning for the next token
found character '\t' that cannot start any token
  in "<unicode string>", line 6, column 16:
      publication:      སྡེ་དགེ་པར་ཁང་།
                   ^

Pillow preprocessing guide line

Test the difference between OCR on web images and OCR on Archive images.

Tests should cover:

  • archive vs web images
  • modern printed text of 3 or 4 different quality
  • manuscript samples
  • blockprint samples
  • various scripts
  • color vs B&W

Unicode Error in Windows while using "download"

error when using command "openpoti download"

PS D:\GitHub\Esukhia\openpoti-toolkit> openpoti download -i W1OP000001 Traceback (most recent call last): File "C:\Users\user\AppData\Local\Programs\Python\Python36\Scripts\openpoti-script.py", line 11, in <module> load_entry_point('openpoti', 'console_scripts', 'openpoti')() File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\click\core.py", line 764, in __call__ return self.main(*args, **kwargs) File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\click\core.py", line 717, in main rv = self.invoke(ctx) File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\click\core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\click\core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\click\core.py", line 555, in invoke return callback(*args, **kwargs) File "d:\github\esukhia\openpoti-toolkit\openpoti\cli.py", line 147, in download potis = get_poti(kwargs['id'], kwargs['batch'], kwargs['filter']) File "d:\github\esukhia\openpoti-toolkit\openpoti\cli.py", line 71, in get_poti catalog_path.write_text(r.content.decode('utf-8')) File "c:\users\user\appdata\local\programs\python\python36\lib\pathlib.py", line 1194, in write_text return f.write(data) File "c:\users\user\appdata\local\programs\python\python36\lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode characters in position 45-47: character maps to <undefined>

[Refactor Required] Tsadra parser

Current Tsadra parser

  • Bad readibility
  • challenging to debug
  • hard to introduce new annotation
  • good to have tsadra template in a template directory

Google OCR Parser

  • OCR json parser
    • Page and Line span
    • Character coordinate --> image layer
  • Complete one unit of OCR

Tsadra workflow

  • TsadraFormatter
    • Build layer
    • Format layer
  • HFML serializer support for Tsadra annotations.
  • HFMLTextFormatter support for Tsadra annotations.
  • Test with HFML Formatter

OCR --> S3 --> OPF

OCR --> S3 : json.gzip + images
OCR --> opf: base text + page layer
OCR --> opf release: boundingPoly zipped

function to update the base layer

There should be a function to update the patches based on an update of the base layer, here it is decomposed:

  • BaseLayerUpdate is an object that can be initialized with either
    • a commit revision id
    • previous + current versions of the base layer
  • at initialization it computes a character coordinates translation vector (CCTV) for the difference between the versions, as a list of tuples (see example below)
  • it has a function update_patch(patch) that returns an updated version of a patch, by:
    • modifying the patch character coordinate with the CCTV
    • ask dmp to apply the patch with the updated character coordinate
    • ask dmp the new diff, which may update both character coordinate and context
  • get_patch_bsl_gitrev() is a function that gets the git revision of the base layer against which the patches of the repository have been built, which is recorded somewhere in the metadata (I don't know the format)
  • update_patches.py is a script that:
    • calls get_patch_bsl_gitrev()
    • compares it with latest commit rev of the base layer in
    • if different, creates a BaseLayerUpdate, reads all the patches in the repo and updates them using update_patch(patch)

CCTV example :

  • version 1 is : abdf
  • version 2 is : bcdef
  • vector is [(0,-1),(2,0),(3,1)], meaning
    • for characters above 0, add -1 to character coordinate
    • for characters above 2, add 0 to character coordinate
    • for characters above 3, add 1 to character coordinate
    • (each instruction supersedes the previous one)

annotation transfer in CLI

Given A and B, two different versions of the same text, users should be able to transfer annotations from A to B.

'openpecha transfer '
'openpecha transfer A.txt B.txt a'

OpenPecha Docs

  • setup mkdocs
  • add introduction of OpenPecha
  • what is base and layers
  • layer format
  • types of annotaions and format

GH-Page for pecha readme+releases

automate filling up the readme of pechas, including a link to releases:

<ID when available W###> <Title in Tibetan> <Author> <Topic>
- [ ] create readme: 
# Title
- author

## Source: 
From : <source url>
ID : 

## Downloads:
- epub, docx # for later
- base text

## Layers: # list of layers
- a : definitions # tag : name
- b : 
- dsds

## Log:
- date: activity

  • release 1- : clean base, base+anno in hfml # to be determined
  • something like this: txt epub

hfml build_layer revision

  • Parse Tofu-id
  • Create annotation dict inbuild_layer method itself. (Reduces the complexity of converting list of tuple annotation to dict annotation)

Change annotaion list in index to key-value pair (dictionary) annotations.

Currently annotations in index are list and also parts are list. For eg:

https://github.com/OpenPecha/P000001/blob/561c31601d9970549ff6dc41b61ae05b5d4357c8/P000001.opf/index.yml#L5-L21

annotations:
  - id: 51f58796058b461ab32f3c972ee5417c
    work: T1
    parts:
      - id: 3cbe647abf404688a79c24d14742826c
        work: T1-1
        span:
          - vol: base/v001
            span:
              start: 28
              end: 396711
      - id: 4993722a64084f1da94b10ce89482014
        work: T1-2
        span:
          - vol: base/v001
            span:
              start: 396712
              end: 67199

Since we have already adopted annotations as key-value pair (dictionary) for layers. Lets follow the same for index annotations. Like this

annotations:
  51f58796058b461ab32f3c972ee5417c:
    work: T1
    parts:
      3cbe647abf404688a79c24d14742826c:
        work: T1-1
        span:
          - vol: base/v001
            span:
              start: 28
              end: 396711
      4993722a64084f1da94b10ce89482014:
        work: T1-2
        span:
          - vol: base/v001
            span:
              start: 396712
              end: 67199

CCTV fails at following example

srcbl:

༄༅༅། །རྒྱ་གར་སྐད་དུ། ཨཥྚ་མ་ཧཱ་སྠཱ་ན་ཙཻ་ཏྱ་སྟོ་ཏྲ། བོད་སྐད་དུ། གནས་ཆེན་པོ་བརྒྱད་ཀྱི་མཆོད་རྟེན་ལ་བསྟོད་པ། འཇམ་དཔལ་གཞོན་ནུར་\nགྱུར་པ་ལ་ཕྱག་འཚལ་ལོ། །དང་པོ་བྱང་ཆུབ་མཆོག་ཏུ་ཐུགས་བསྐྱེད་ནས། །བསྐལ་པ་གྲངས་མེད་གསུམ་དུ་ཚོགས་བསགས་ཏེ། །བྱང་ཆུབ་སྙིང་པོར་སངས་རྒྱས་བདུད་ནི་བཏུལ། །བྱང་ཆུབ་ཆེན་པོའི་མཆོད་རྟེན་ཕྱག་འཚལ་ལོ། །ཆོས་ཀྱི་གཞིར་གྱུར་སེར་སྐྱའི་གྲོང་ཁྱེར་དུ། །སྒྱུ་མའི་\nཡུམ་ལས་ཟས་གཙང་ཤཱཀ་རིགས་འཁྲུངས། །སྐུ་བཞེངས་སྟ་ཟུར་གཡས་ལ་ཚངས་པ་བཞེས། །བཀྲ་ཤིས་འབྱུང་བའི་མཆོད་རྟེན་ཕྱག་འཚལ་ལོ། །བཱ་རཱ་ཎ་སཱི་ལ་སོགས་བསོད་སྙོམས་གཤེགས། །གཟུགས་ཅན་སྙིང་པོའི་གླང་ཆེན་སྨྱོན་པ་རྣམས། །ཕྱག་གི་སོར་མོའི་སྟོབས་ཀྱིས་\nབཏུལ་ནས་ཀྱང་། །གྲོང་ཁྱེར་འདུལ་མཛད་མཆོད་རྟེན་ཕྱག་འཚལ་ལོ། །ནེ་གསིང་དག་ཏུ་བསྙེལ་སོ་མཛད་པའི་ཚེ། །ཧ་ལུ་མཉྫུས་སྦྲང་རྩི་ཕུལ་ནས་ཀྱང་། །ཁྲོན་པར་དུས་བྱས་སུམ་ཅུ་རྩ་གསུམ་སྐྱེས། །ཐུགས་རྗེ་འབྱུང་བའི་མཆོད་རྟེན་ཕྱག་འཚལ་ལོ། །ཚངས་པས་འཁོར་ལོ་ཕུལ་\nནས་འཁོར་ལོ་བསྐོར། །མུ་སྟེགས་སྟོན་པ་དྲུག་ནི་སྟོབས་ཀྱིས་བཏུལ། །སྤྲུལ་པའི་གྲངས་ཀྱིས་ལྷ་མི་ཚིམ་མཛད་པའི། །ཆོ་འཕྲུལ་བསྟན་པའི་མཆོད་རྟེན་ཕྱག་འཚལ་ལོ། །དགའ་བོ་ལ་སོགས་ཀླུ་ཡི་ཚོགས་རྣམས་ཀྱིས། །བསྙེན་བཀུར་འབུལ་བའི་བུ་མོས་འོ་མ་དྲངས། །བཀའ་དང་\nའཇིག་རྟེན་མ་ལུས་ཚར་གཅོད་པ། །ཉེར་ཞི་རྒྱལ་བའི་མཆོད་རྟེན་ཕྱག་འཚལ་ལོ། །བྱང་ཆུབ་སེམས་དང་རང་སངས་རྒྱས་རྣམས་དང་། །ཉན་ཐོས་དགྲ་བཅོམ་ཚོགས་ཀྱིས་ཡོངས་བསྐོར་ཏེ། །སྡོམ་དང་ཚུལ་ཁྲིམས་ལ་ནི་རབ་བཀོད་པའི། །རྣམ་པར་དག་པའི་མཆོད་རྟེན་ཕྱག་འཚལ་ལོ། །སེམས་\nཅན་མི་རྟག་འདུལ་བའི་དགོངས་པ་དང་། །ལྷ་ལས་བབས་ནས་མཛད་པ་ཀུན་གྱི་མཐར། །ཙུན་དས་གསོལ་བཏབ་ཟླ་གསུམ་ནས་མཐར་ཕྱིན། །མྱ་ངན་འདས་མཛད་མཆོད་རྟེན་ཕྱག་འཚལ་ལོ། །གནས་ཆེན་པོ་བརྒྱད་ཀྱི་མཆོད་རྟེན་ལ་བསྟོད་པ། །སློབ་དཔོན་ཆེན་པོ་ཀླུ་སྒྲུབ་ཀྱིས་མཛད་པ་\nརྫོགས་སོ།།

dstbl:

༄༅༅། །རྒྱ་གར་སྐད་དུ། ཨཥྚ་མ་ཧཱ་སྠཱ་ན་ཙཻ་ཏྱ་སྟོ་ཏྲ། བོད་སྐད་དུ། གནས་ཆེན་པོ་བརྒྱད་ཀྱི་མཆོད་རྟེན་ལ་བསྟོད་པ། འཇམ་དཔལ་གཞོན་ནུར་གྱུར་པ་ལ་ཕྱག་འཚལ་ལོ། །འགྲོ་བའི་བླ་མ་གཅིག་པུ་ལུམྦཱིར་བལྟམས། །སེར་སྐྱའི་གྲོང་ཁྱེར་གཞི་རུ་གནས་པར་མཛད། །ཡོན་ཏན་\nརིན་ཆེན་བྱེ་བས་བརྒྱན་པ་ཡི། །བདེ་གཤེགས་མཆོད་རྟེན་རྣམས་ལ་ཕྱག་འཚལ་ལོ། །མ་ག་དྷཱ་ཡི་བྱང་ཆུབ་ཤིང་དྲུང་དུ། །ཆུ་བོ་ནཻ་རཉྫ་ན་ཞེས་བྱ་བའི། །འགྲམ་བཞུགས་མཆོད་རྟེན་ཡོན་ཏན་རྒྱ་ཆེ་བ། །བྱང་ཆུབ་རྟེན་དུ་གྱུར་ལ་ཕྱག་འཚལ་ལོ། །ཀ་ཤི་ཀ་ཡི་བཱ་རཱ་ཎ་སཱི་རུ། །ཆོས་ཀྱི་འཁོར་\nལོ་རྣམ་གྲོལ་རྨད་བྱུང་ནི། །ཉོན་མོངས་སྒྲིབ་པ་རྣམ་པར་གཅོད་མཛད་པ། །ཡེ་ཤེས་མཆོད་རྟེན་བཞི་ལ་ཕྱག་འཚལ་ལོ། །མཉན་དུ་ཡོད་པར་གཞན་སྟོབས་ཚར་བཅད་ནས། །ཛེ་ཏའི་ཚལ་དུ་ཆོ་འཕྲུལ་ཆེན་པོ་བསྟན། །ས་གསུམ་དགོངས་པ་མཆོག་ཏུ་བསྒྲུབ་མཛད་པ། །མུ་སྟེགས་\nཕམ་མཛད་མཆོད་རྟེན་ཕྱག་འཚལ་ལོ། །གྲོང་ཁྱེར་དམ་པ་མཆོག་ནི་གསལ་ལྡན་དུ། །ལྷ་རྣམས་གནས་གཤེགས་བླ་ན་མེད་པར་བབས། །ཞབས་ལ་ཚངས་དབང་ཅོད་པན་གྱིས་མཆོད་པ། །སུམ་ཅུའི་ལྷས་མཆོད་མཆོད་རྟེན་ཕྱག་འཚལ་ལོ། །དགེ་འདུན་དབྱེན་དུ་སྔར་གྱུར་ལས། །\nསྟོན་པའི་ཉན་ཐོས་རབ་མཐུན་པ། །རྒྱལ་པོའི་ཁབ་ཀྱི་འོད་མའི་ཚལ། །བྱམས་ངོས་མཆོད་རྟེན་ཕྱག་འཚལ་ལོ། །སྐུ་ཚེ་འདུ་བྱེད་བཏང་བ་ལས། །སླར་ཡང་སྐུ་ཚེ་བྱིན་བརླབས་པ། །རྣམ་གྲོལ་ཡངས་པ་ཅན་གྱི་ནི། །བྱིན་བརླབས་མཆོད་རྟེན་ཕྱག་འཚལ་ལོ། །ཀུ་ཤའི་གྲོང་དུ་འགྲོ་བ་\n\nརྣམས། །དགེ་བ་ལ་ནི་སྦྱོར་མཛད་ཅིང་། །འགྲན་མེད་གྱད་གནས་ཟུང་གི་ཚལ། །མཆོད་རྟེན་མྱ་ངན་འདས་ཕྱག་འཚལ། །ཤཱཀྱ་ཐུབ་མཆོད་རྟེན་བརྒྱད་པོ་དག །ཕྱོགས་བཅུ་གཞན་དང་གཞན་རྣམས་ན། །བཞུགས་པའི་ཆོས་སྐུ་ཀུན་ལ་འདུད། །ཞི་ལ་རྟག་ཏུ་སྤྱིས་ཕྱག་\nའཚལ། །འདི་ལྟར་སྤྲོས་པ་ཀུན་བྲལ་དཔེ་མེད་རྟག་ཅིང་དག་པའི་ངོ་བོ་ཉིད། །སངས་རྒྱས་ཆོས་སྐུ་མཁའ་ལྟར་འགྲོ་བ་ལ་ཁྱབ་ཡང་དག་ཕྱག་འཚལ་བས། །བསོད་ནམས་གངས་རིའི་ཁ་དོག་ལྟར་དཀར་བདག་གི་རྒྱུད་ལ་གང་བསགས་པ། །དེས་ནི་སེམས་ཅན་མ་ལུས་ཏིང་འཛིན་བདེ་རྟོགས་བྱང་ཆུབ་\nཐོབ་པར་ཤོག །གནས་ཆེན་པོ་བརྒྱད་ཀྱི་མཆོད་རྟེན་ལ་བསྟོད་པ། སློབ་དཔོན་ཆེན་པོ་འཕགས་པ་ཀླུ་སྒྲུབ་ཀྱིས་མཛད་པ་རྫོགས་སོ།། ༄

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.