This page lists example Java programs, which demonstrate how to use the JQuranTree APIs to access and analyze the Holy Quran.
Orthography Model Examples
Shows how to use the Location class to access a verse.
Converts a token within the orthography model to simple encoding.
Converts a token to Buckwalter transliteration.
Scans the orthography model to find occurrences of bismillahi arahmāni rahīm. Two chapters do not start with bismillah, two chapters have an additional diacritic, and two chapters contain bismillah within their verses.
Demonstrates how to use an analysis table. The program tabulates the number of tokens in each verse, then sorts and groups the results.
CSV export example
Demonstrates how to export an analysis table to a CSV file. The program lists all chapter names in the Quran using Buckwalter transliteration, then saves these results to file.
Verse count example
Tabulates the number of verses in each chapter in the Quran.
Token count example
Tabulates the number of tokens in each chapter in the Quran.
Lists the 10 most frequent tokens in the Quran, with and without diacritics.
Shows a frequency table listing the number of occurrences for each letter.
Finds all chapters in the Quran that begin with special initials.
Constructs a frequency table showing how common different token lengths are. The program then displays the longest tokens in the Quran.
Uses the token search class to search for substrings within the Quran. The program finds 33 occurrences of the Sun, and 28 occurrences of the Moon.
Performs a search without diacritics. Finds 40 occurrences of "reward" in the Holy Quran.