Deprecated in favour of Akshara
Kaṭapayādi system is a character to number encoding scheme, which was developed and used by mathematicians of India to encode large numbers into meaningful, and easy-to-remember verses. Read more about it at blog. Its demo is available here
This decoder depends on Kannada Tokenizer. Therefore it is possible to decode the text only in Kannada script. However, it is possible to use a transliteration service, such as Aksharamukha to first convert any script into Kannada, and then apply the decoding operation.
The decoder is written as a ES6 Module, which you need to import
in your code. This can be done as follows.
<script type="module">
import { katapayadi_decode } from "https://cdn.jsdelivr.net/gh/vinayakakv/katapayadi_decoder@1.0.0/katapayadi_decoder.js"
.
.
.
</script>
katapayadi_decode(String) -> String
- Input is a string in Kannada Script
- Output is a string of numbers decoded according to Kaṭapayādi scheme
You can see a demo webpage at project site, whose source code is available at index.html.
You can contribute to this repository by two means
- Source code improvements -- Improving the decoder and companion webpage
- Adding more examples to
examples.json
examples.json
is a list of example
objects consisting of 3 fields
verse
- A string consiting of Kaṭapayādi-encoded value. Each number has to be seperated by a comma(,
). The lines of the verse should be seperated by newline(\n
).description
- A string containing description about the verse. This string can include valid HTML tags to support formatting. For links (<a>
), remember to use (target="_blank"
) in order to prevent them opening in same tab.reverse
- A boolean (eithertrue
orfalse
) indicating whether or not to apply reversing to the numbers after decoding.