another interpretation :
================
if (prayer == sobh) then
(&) 2 rakaa jahr + soura
end
if (prayer == maghreb) then
(&&) make & and tachahoud and add 1 rakaa sir
end
if (prayer == icha) then
make (&&) and add 1 rakaa sir
end
if (prayer == nafila in dohr time) then
($) 2 rakaa sirr + soura
end
if (prayer == dohr) or (prayer == asr) then
make ($) and tachahoud and add 2 rakaa sirr
end
Tout ce qui figure sur ce blog est une interprétation personnelle qui peut comporter des erreurs de compréhension de ma part. Everything that appears on this blog is a personal interpretation which may include misunderstanding by my fault. Last contribution : https://sites.google.com/site/islamiclifealgorithm/
Friday, December 14, 2012
Wednesday, December 12, 2012
From english natural language text to java code
It seems that the easiest way to convert/transform/translate an english natural language text to java code is as it is said, i.e. we do not need to use uml, xml, xmi or what ever.
We have to create a java program that parses the natural language text (using opennlp for example), extract subject-verb-object sentences and transform text into java code lines, for example :
Franck goes to the mosk every day five time.
Class Person {
///bla bla :)
}
void public main() {
Person Franck;
int day;
int time;
for day in 1..7 {
for time in 1 .. 5 {
Franck.go(mosk);
}
}
}
of course, there are many errors, but it just to gives an idea of how we could create a Natural Langage Translator to Java.
We have to create a java program that parses the natural language text (using opennlp for example), extract subject-verb-object sentences and transform text into java code lines, for example :
Franck goes to the mosk every day five time.
Class Person {
///bla bla :)
}
void public main() {
Person Franck;
int day;
int time;
for day in 1..7 {
for time in 1 .. 5 {
Franck.go(mosk);
}
}
}
of course, there are many errors, but it just to gives an idea of how we could create a Natural Langage Translator to Java.
Monday, December 3, 2012
from text to java
- choose a encyclopedic text.
- modelize using a UML modeling tool (like StarUML, or EA)
- Export to XML, or XMI file.
- Analyse the XML or XMI file to understand different tags.
- parse this file, and save into a .txt file &.
- use a natural langage parser (Like opennlp, or stanfordnlp).
- parse the english text &.
- store information in an XML, or XMI, or XSD file as in the chosen uml tool.
- use the & uml tool chosen before.
- open the xml, xmi, or xsd file.
- obtain the uml diagrams.
- generate the java files.
an interpreted algorithm for rows constructing for salat
search for soutra
If (number of muslims == 1)
pray
if (number of muslims == 2)
stand side-by-side;
and pray
if (number of muslims > 2)
choose one of the muslims as an imam.
the imam stand in front of the other muslims .
if (number of muslims > N : number of places that a row in a mosk can handle)
the N+1 muslims moves to row 2
and so on.
If (number of muslims == 1)
pray
if (number of muslims == 2)
stand side-by-side;
and pray
if (number of muslims > 2)
choose one of the muslims as an imam.
the imam stand in front of the other muslims .
if (number of muslims > N : number of places that a row in a mosk can handle)
the N+1 muslims moves to row 2
and so on.
mathematical expression/equation of salat
((7+l)*m)*bool + ((7)*p*(the contrary of bool) = perfect :)
7 : is for number of verses in fatiha
l and n : integer representing number of verses from zero to more
(zero is when rakaa is in sirr).
m and p : integer from 1 to maximum 2 (1 is for witr)
bool : is a boolean for sirr or jahr
+when number of rakaa is more than 2
and it is optional
7 : is for number of verses in fatiha
l and n : integer representing number of verses from zero to more
(zero is when rakaa is in sirr).
m and p : integer from 1 to maximum 2 (1 is for witr)
bool : is a boolean for sirr or jahr
+when number of rakaa is more than 2
and it is optional
Saturday, December 1, 2012
pseudo-algorithm of islamic prayer salat
My interpretation may contain errors, please comment :
switch (prayer) {
=> case sobh :
2 rakaa jahr + soura
=> case dohr :
2 rakaa sir + soura and tachahoud and 2 rakaa sir
=> case asr :
2 rakaa sir + soura and tachahoud and 2 rakaa sir
=> case maghreb :
2 rakaa jahr + soura and tachahoud and 1 rakaa sir
=> case icha :
2 rakaa jahr + soura and tachahoud and 2 rakaa sir
}
switch (prayer) {
=> case sobh :
2 rakaa jahr + soura
=> case dohr :
2 rakaa sir + soura and tachahoud and 2 rakaa sir
=> case asr :
2 rakaa sir + soura and tachahoud and 2 rakaa sir
=> case maghreb :
2 rakaa jahr + soura and tachahoud and 1 rakaa sir
=> case icha :
2 rakaa jahr + soura and tachahoud and 2 rakaa sir
}
How to analyse islamic process and history
In order to automatically analyse and extract processes and patterns from islamic history and bibliography, it is possible to imagine the following method :
1) developp a java program that parses and analyses natural language to extract "subject-verb-object" phrases and sentences from english natural language text.
2) store information in XML or XMI file.
3) create a translator for : XMI ==> Java. for example. (or to UML)
4) generate the java file and execute it to see the result.
1) developp a java program that parses and analyses natural language to extract "subject-verb-object" phrases and sentences from english natural language text.
2) store information in XML or XMI file.
3) create a translator for : XMI ==> Java. for example. (or to UML)
4) generate the java file and execute it to see the result.
Tuesday, November 13, 2012
Sunday, October 14, 2012
Allah is beautiful, he loves beauty
Allah est beau, il aime la beauté.
The works of Dr. kais dukes, Dr. Said ghazzawi, and Dr. abdeldaeem kaheel inspired me to propose my own contribution to the scientific islamic community, here are some humble ideas:
Analyzing, modelling, designing and developing Islamic knowledge
Using Unified Modelling Language, Model Driven Engineering, and Object
Oriented Programming
Dear brothers and sisters, welcome in Islam.
The works of Dr. kais dukes, Dr. Said ghazzawi, and Dr. abdeldaeem kaheel inspired me to propose my own contribution to the scientific islamic community, here are some humble ideas:
As far as
we are concerned in this paper, we propose to classify Islamic Knowledge into
three categories:
1. Holy Quran,
2. Hadith,
3. Saying of renowned
Muslims.
In this
paper, we will focus, only on the prophet Muhammad (pbuh) sayings (hadiths), as
they provide us with important source of information, regarding our
methodology.
In the following section, we present a
new methodology for modeling hadiths, using what is called UML activity
diagram.
A. Activity Modelling for an activity hadith
In our
methodology, we present several basic rules:
1.
We decompose an activity (such as Salat), to
many different sub-activities (such as rakâa). For example :
2.
We decompose a sub-activity (such as rakâa), to
many different actions (such as takbir, reading, rokôo, soujoud, joulouss, etc...).
For example :
3.
We decompose an action, or activity, or
sub-activity into three components :
a. Condition (IF)
b. Result of the
condition (Then),
c.
Alternative Result (Else).
First, we
consider that a hadith that explains actions and activities of the prophet
Muhammad (pbuh). The following hadith is the perfect illustration of the
principle:
أنَّ فَهْدًا حَدَّثَنَا ، قَالَ : حَدَّثَنَا أَبُو غَسَّانَ ، قَالَ : حَدَّثَنَا زُهَيْرٌ ، قَالَ : حَدَّثَنَا أَبُو إِسْحَاقَ ، قَالَ : أَتَيْتُ الأَسْوَدَ بْنَ
يَزِيدَ ، وَكَانَ لِي أَخًا وَصَدِيقًا ، فَقُلْتُ يَا أَبَا عَمْرٍو ،
حَدِّثْنِي مَا حَدَّثَتْكَ عَائِشَةُ رَضِيَ اللَّهُ عَنْهَا أُمُّ
الْمُؤْمِنِينَ ، عَنْ صَلاةِ رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ
، فَقَالَ : قَالَتْ : " كَانَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ
وَسَلَّمَ يَنَامُ أَوَّلَ اللَّيْلِ وَيُحْيِي آخِرَهُ
، ثُمَّ إِنْ كَانَتْ لَهُ حَاجَةٌ قَضَى حَاجَتَهُ ، ثُمَّ يَنَامُ قَبْلَ أَنْ
يَمَسَّ مَاءً ، فَإِذَا كَانَ عِنْدَ النِّدَاءِ الأَوَّلِ ، وَثَبَ وَمَا
قَالَتْ قَامَ فَأَفَاضَ عَلَيْهِ الْمَاءَ ، وَمَا قَالَتْ : اغْتَسَلَ وَأَنَا
أَعْلَمُ مَا تُرِيدُ وَإِنْ كَانَ جُنُبًا تَوَضَّأَ وُضُوءَ الرَّجُلِ
لِلصَّلاةِ "
From:
First, we
have to separate the activity statements from the rest of the Islamic text:
كَانَ رَسُولُ اللَّهِ صَلَّى
اللَّهُ عَلَيْهِ وَسَلَّمَ يَنَامُ أَوَّلَ اللَّيْلِ وَيُحْيِي آخِرَهُ ، ثُمَّ
إِنْ كَانَتْ لَهُ حَاجَةٌ قَضَى حَاجَتَهُ ، ثُمَّ يَنَامُ قَبْلَ أَنْ يَمَسَّ
مَاءً ، فَإِذَا كَانَ عِنْدَ النِّدَاءِ الأَوَّلِ ، وَثَبَ وَمَا قَالَتْ
قَامَ فَأَفَاضَ عَلَيْهِ الْمَاءَ ، وَمَا قَالَتْ : اغْتَسَلَ وَأَنَا أَعْلَمُ
مَا تُرِيدُ وَإِنْ كَانَ جُنُبًا تَوَضَّأَ وُضُوءَ الرَّجُلِ لِلصَّلاةِ "
The highlighted
text represents a judgment of the narrator, and could help understand the
structure of the activities.
وَمَا قَالَتْ قَامَ فَأَفَاضَ عَلَيْهِ الْمَاءَ،
وَمَا قَالَتْ: اغْتَسَلَ وَأَنَا أَعْلَمُ مَا تُرِيدُ
In this
step, we try to differentiate between activity, sub-activities, and actions. For
ease of comprehension, we give the letter (A) for activities, the acronym (Sub)
for sub-activities, and the letter (a) for actions.
يَنَامُ أَوَّلَ اللَّيْلِ
|
Action
|
وَيُحْيِي آخِرَهُ
|
Activity
|
ثُمَّ إِنْ كَانَتْ لَهُ حَاجَةٌ
|
If condition
|
قَضَى حَاجَتَهُ
|
Then action
|
ثُمَّ يَنَام
|
Action
|
قَبْلَ أَنْ يَمَسَّ مَاءً
|
Condition (and action)
|
فَإِذَا كَانَ عِنْدَ النِّدَاءِ
الأَوَّلِ
|
If condition
|
وَثَبَ
|
Then action
|
وَإِنْ كَانَ جُنُبًا
|
If condition
|
تَوَضَّأَ وُضُوءَ الرَّجُلِ لِلصَّلاةِ
|
Then Activity
|
For
computer scientist, this structure is very likely an algorithm, which could be
encoded in computer understandable language, please refer to discussions at the
end of the paper.
B. UML Activity Modelling for an activity hadith
Since the
previous hadith focused on actions and activities, we choose to call it
“activity hadith”. In consequence it should be modelled by a tool providing
such possibilities; we present hereafter an example of hadith’s modelling using
UML activity diagram.
Dear brothers and sisters, welcome in Islam.
Subscribe to:
Posts (Atom)
Popular Posts
-
package islamPillars.salat.SalatUnits.SalatSubUnits; import Diplay.Generic; public class AlTaslim { public static void AlTaslim...
-
Comment apprendre le coran ? tableau pour apprendre le Coran. How to learn the quran ? table to learn the Quran. جدول لتسهيل حفظ القران . ...
-
Allah est beau, il aime la beauté. The works of Dr. kais dukes, Dr. Said ghazzawi, and Dr. abdeldaeem kaheel inspired me to propose ...
-
Parmi les bienfaits de la prosternation (soujoud), l'on peut constater: une position détendue des muscles du cou et les muscles cou...
-
The Holy Quran could be analysed in many levels and perspectives, for example: -occurrence of specific names and words, -analysis of thes...
-
Qui n'a jamais commis de pêché qu'il regrette, qui n'est jamais passé par des épreuves à couper le souffle, qui n'a jamais ...
-
Research project : information science serving islamic studies This project could implement different studies : -extracting pattern, pro...
-
The works of Dr. kais dukes, Dr. Said ghazzawi, and Dr. abdeldaeem kaheel inspired me to propose my own...
-
The works of Dr. kais dukes, Dr. Said ghazzawi, and Dr. abdeldaeem kaheel inspired me to propose my own contribution to the scientific isl...
-
Analyzing, modelling, designing and developing Islamic knowledge Using Unified Modelling Language, Model Driven Engineering, and Object O...