https://github.com/alpancs/quranize
transform transliteration to Quran text
https://github.com/alpancs/quranize
dynamic-programming go indexing quran quranize suffix-tree transliteration
Last synced: 5 months ago
JSON representation
transform transliteration to Quran text
- Host: GitHub
- URL: https://github.com/alpancs/quranize
- Owner: alpancs
- License: mit
- Created: 2018-05-26T05:35:13.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-02-25T16:03:09.000Z (over 6 years ago)
- Last Synced: 2025-08-14T07:48:30.741Z (11 months ago)
- Topics: dynamic-programming, go, indexing, quran, quranize, suffix-tree, transliteration
- Language: Go
- Homepage: https://pkg.go.dev/github.com/alpancs/quranize
- Size: 1.5 MB
- Stars: 14
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-islamic-open-source-apps - quranize
README
[](https://godoc.org/github.com/alpancs/quranize)
[](https://travis-ci.org/alpancs/quranize)
[](https://codecov.io/gh/alpancs/quranize)
# Quranize
Quranize provides Alquran in Go representation.
Original source of Alquran is taken from http://tanzil.net in XML format.
Quranize can transform alphabet into arabic using fast and efficient algorithm:
suffix-tree for indexing and dynamic programming for parsing.
## Documentation
https://godoc.org/github.com/alpancs/quranize
## Example
Here is a minimal example.
```go
package main
import (
"fmt"
"github.com/alpancs/quranize"
)
func main() {
q := quranize.NewDefaultQuranize()
quran := quranize.NewQuranSimpleEnhanced()
encodeds := q.Encode("alhamdulillah hirobbil 'alamin")
fmt.Println(encodeds)
// Output: [الحمد لله رب العالمين]
locations := q.Locate(encodeds[0])
fmt.Println(locations)
// Output: [{1 2 0} {10 10 10} {39 75 13} {40 65 10}]
suraName, _ := quran.GetSuraName(locations[0].GetSura())
fmt.Println(suraName)
// Output: الفاتحة
aya, _ := quran.GetAya(locations[0].GetSura(), locations[0].GetAya())
fmt.Println(aya)
// Output: الْحَمْدُ لِلَّهِ رَبِّ الْعَالَمِينَ
}
```
## Related Project
https://github.com/alpancs/quranize-service