An Oral Formulaic Study Of The Quran - warwickfoster/qurantools GitHub Wiki
app/word_associations.php
File:Purpose
The provided HTML code snippet is a web page that displays the results of a word association analysis. It allows users to explore the co-occurrence of words with a given root word.
Key Features
- Table Displays a table of results, showing the Arabic and transliterated versions of associated words, along with the number of times each word occurs in verses containing the root word.
- Chart Options Provides options to display the results as a bar chart, pie chart, or table.
- Sorting Allows users to sort the results by Arabic word, transliterated word, or the number of occurrences.
- Additional Information Includes links to pages for examining individual words and browsing verses.
- Pagination Paginates the table results if there are too many rows to display on a single page.
Technical Details
- Database The results are retrieved from a database using PHP's
db_
functions. - JavaScript JavaScript is used to dynamically change the display of the content based on user interactions.
- CSS CSS is used to style the HTML elements and create the layout.
Functionality
- The user selects a root word and can choose to sort the results.
- The page displays a table of results with associated words and their occurrence counts.
- The user can choose to display the results as a chart or table.
- Clicking on a word link takes the user to a page with more information about that word.
- Clicking on an information icon opens a pop-up with additional information about the associated word.
Benefits
- Enables users to discover new words related to a given root word.
- Provides insights into the linguistic relationships between words.
- Facilitates language learning and exploration.
Additional Notes
- The
MAX_ITEMS_FOR_CHART
constant determines the maximum number of items to display in the chart. - The
$user_preference_transliteration_style
variable can be used to set a specific style for the transliterated words.