Qur'an | Word by Word | Audio | Prayer Times | Android | New : beta.quran.com
__ Sign In

Java API Examples


This page lists example Java programs, which demonstrate how to use the JQuranTree APIs to access and analyze the Holy Quran.

Orthography Model Examples

Location example
Shows how to use the Location class to access a verse.

Simple encoding example
Converts a token within the orthography model to simple encoding.

Buckwalter example
Converts a token to Buckwalter transliteration.

Bismillah example
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.

Analysis Examples

Analysis table example
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.

Token frequency example
Lists the 10 most frequent tokens in the Quran, with and without diacritics.

Character frequency example
Shows a frequency table listing the number of occurrences for each letter.

Chapter initials example
Finds all chapters in the Quran that begin with special initials.

Longest token example
Constructs a frequency table showing how common different token lengths are. The program then displays the longest tokens in the Quran.

Search Examples

Token search example
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.

Letter search example
Performs a search without diacritics. Finds 40 occurrences of "reward" in the Holy Quran.

Language Research Group
University of Leeds