Skip to content

Commit

Permalink
[lipi] Add 4 schemes and better Vedic support
Browse files Browse the repository at this point in the history
Schemes:
- Add basic support for Assamese, Kharoshthi, Mon, and Soyombo.

Features:
- Add stronger support for upadhmaniya and jihvamuliya.
- Add limited support for Meetei Mayek.
- Add limited support for Samaveda svaras.

Bug fixes:
- Fix treatment of Malayalam au.
- Add experimental support for Malayalam chillus.
- Use NFC internally to avoid a bug with greedy ISO matching.
- Support ayogavahas used with svaras in Devanagari.
- Fix display for several schemes in the UI.

Code:
- Simplify and clean up `create_schemes.py`.
- Add benchmark test.
  • Loading branch information
akprasad committed Feb 10, 2024
1 parent 896ad35 commit aa32d22
Show file tree
Hide file tree
Showing 16 changed files with 1,820 additions and 540 deletions.
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,9 @@ For details, see the [vidyut-kosha README][vidyut-kosha].

### [`vidyut-lipi`][vidyut-lipi]

`vidyut-lipi` is an experimental Sanskrit transliteration library that also
`vidyut-lipi` is a transliteration library for Sanskrit and Pali that also
supports many of the scripts used within the Indosphere. Our goal is to provide
a standard transliterator for the Sanskrit ecosystem that is easy to bind to
other programming languages.
a standard transliterator that is easy to bind to other programming languages.

For details, see the [vidyut-lipi README][vidyut-lipi].

Expand Down Expand Up @@ -217,8 +216,6 @@ we are most excited about:

- dependency parsing and *anvaya* generation
- search indexing that accounts for sandhi and Sanskrit's complex morphology.
- transliteration, perhaps through a port of [Aksharamukha][aksharamukha]
- meter recognition
- support for Vedic Sanskrit
- implementations of non-Paninian grammars

Expand Down
5 changes: 5 additions & 0 deletions vidyut-lipi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@ debugger:

test:
cargo nextest run --no-fail-fast --status-level=fail && cargo test --doc

# Profiles the program's execution time on OSX. This command will probably not
# work on other operating systems.
profile-time-osx:
cargo instruments -t time --release --example sample > /dev/null
7 changes: 3 additions & 4 deletions vidyut-lipi/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<div align="center">
<h1><code>vidyut-lipi</code></h1>
<p><i>A fast Sanskrit transliterator</i></p>
<p><i>An Indic transliterator</i></p>
</div>

`vidyut-lipi` is an experimental Sanskrit transliteration library that also
`vidyut-lipi` is a transliteration library for Sanskrit and Pali that also
supports many of the scripts used within the Indosphere. Our goal is to provide
a standard transliterator for the Sanskrit ecosystem that is easy to bind to
other programming languages.
a standard transliterator that is easy to bind to other programming languages.

This [crate][crate] is under active development as part of the [Ambuda][ambuda]
project. If you enjoy our work and wish to contribute to it, we encourage you
Expand Down
15 changes: 15 additions & 0 deletions vidyut-lipi/examples/sample.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use vidyut_lipi::{Lipika, Scheme};

fn main() {
let mut input = String::new();
for _ in 0..1_000_000 {
input.push_str(concat!(
"nArAyaRaM namaskftya naraM cEva narottamam . ",
"devIM sarasvatIM cEva tato jayamudIrayet .. 1 .."
));
}

let mut lipika = Lipika::new();
let output = lipika.transliterate(input, Scheme::Slp1, Scheme::Tibetan);
println!("{output}");
}
Loading

0 comments on commit aa32d22

Please sign in to comment.