Comments (3)
When I print the length of the
hadiths
array, it contains different number of hadiths for the Urdu version.print(len(data['ara']['hadiths'])) print(len(data['ara1']['hadiths'])) print(len(data['eng']['hadiths'])) print(len(data['urd']['hadiths']))would result in
7589 7589 7589 7586
for bukhari shareef.
Why is there a discrepancy, and how can this be resolved? I'm parsing the main
json
files:Thanks.
All arrays in Bukhari should have the same length now. I found the issue and will fix inshaaAllah also the other books one by one.
from hadith-api.
Why is there a discrepancy
The reason for difference in length of array is because there are few hadiths missing or few extra hadiths.
You should use hadithnumber
( and not array index), when populating data. For example
{
"hadithnumber": 1,
"arabicnumber": 1,
"text": "کو حمیدی نے یہ حدیث بیان کی، انہوں نے کہا کہ ہم کو سفیان نے یہ حدیث بیان کی، وہ کہتے ہیں ہم کو یحییٰ بن سعید انصاری نے یہ حدیث بیان کی، انہوں نے کہا کہ مجھے یہ حدیث محمد بن ابراہیم تیمی سے حاصل ہوئی۔ انہوں نے اس حدیث کو علقمہ بن وقاص لیثی سے سنا، ان کا بیان ہے کہ میں نے مسجد نبوی میں منبر رسول صلی اللہ علیہ وسلم پر عمر بن خطاب رضی اللہ عنہ کی زبان سے سنا، وہ فرما رہے تھے کہ میں نے جناب رسول اللہ صلی اللہ علیہ وسلم سے سنا آپ صلی اللہ علیہ وسلم فرما رہے تھے کہ تمام اعمال کا دارومدار نیت پر ہے اور ہر عمل کا نتیجہ ہر انسان کو اس کی نیت کے مطابق ہی ملے گا۔ پس جس کی ہجرت ( ترک وطن ) دولت دنیا حاصل کرنے کے لیے ہو یا کسی عورت سے شادی کی غرض ہو۔ پس اس کی ہجرت ان ہی چیزوں کے لیے ہو گی جن کے حاصل کرنے کی نیت سے اس نے ہجرت کی ہے۔",
"grades": [],
"reference": {
"book": 1,
"hadith": 1
}
}
{
"hadithnumber": 1,
"arabicnumber": 1,
"text": "Narrated 'Umar bin Al-Khattab: I heard Allah's Messenger (ﷺ) saying, \"The reward of deeds depends upon the intentions and every person will get the reward according to what he has intended. So whoever emigrated for worldly benefits or for a woman to marry, his emigration was for what he emigrated for",
"grades": [],
"reference": {
"book": 1,
"hadith": 1
}
}
{
"hadithnumber": 1,
"arabicnumber": 1,
"text": "حَدَّثَنَا الْحُمَيْدِيُّ عَبْدُ اللَّهِ بْنُ الزُّبَيْرِ ، قَالَ : حَدَّثَنَا سُفْيَانُ ، قَالَ : حَدَّثَنَا يَحْيَى بْنُ سَعِيدٍ الْأَنْصَارِيُّ ، قَالَ : أَخْبَرَنِي مُحَمَّدُ بْنُ إِبْرَاهِيمَ التَّيْمِيُّ ، أَنَّهُ سَمِعَ عَلْقَمَةَ بْنَ وَقَّاصٍ اللَّيْثِيَّ ، يَقُولُ : سَمِعْتُ عُمَرَ بْنَ الْخَطَّابِ رَضِيَ اللَّهُ عَنْهُ عَلَى الْمِنْبَرِ، قَالَ : سَمِعْتُ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ، يَقُولُ : \" إِنَّمَا الْأَعْمَالُ بِالنِّيَّاتِ، وَإِنَّمَا لِكُلِّ امْرِئٍ مَا نَوَى، فَمَنْ كَانَتْ هِجْرَتُهُ إِلَى دُنْيَا يُصِيبُهَا أَوْ إِلَى امْرَأَةٍ يَنْكِحُهَا، فَهِجْرَتُهُ إِلَى مَا هَاجَرَ إِلَيْهِ",
"grades": [],
"reference": {
"book": 1,
"hadith": 1
}
}
All the above are hadithnumber 1 and points to exact same hadith.
from hadith-api.
Some Urdu hadiths are missing:
And here's the same hadiths but in English:
This is the case in most of the files. The last few hadiths in the urdu versions have empty text.
from hadith-api.
Related Issues (20)
- Incomplete hadith text in Google Sheet cell.
- Possible issue in gradings by Bashar Awaad Marouf in Jami At Tirmidhi HOT 2
- Alternate translations of hadith. HOT 2
- Russian translation HOT 7
- Get random hadith of a language doesnt exist here is a function in node please add it or a equivalent
- eng-bukhari has problem
- map secondary book hadiths to primary book hadiths for grades
- Hadith empty HOT 1
- make fallback api HOT 2
- Possible documentation website for various APIs. HOT 1
- Sahih Muslim HOT 4
- Curious HOT 1
- add jami kamil
- musnad ahmad with grades
- Add Muslim with arabic numberings in api
- Thanks fawazahmed0
- ara-edition1 should regenerate on changing ara-edition
- Correct zubairalizai gradings using darusalam pdf
- add single update-all command
- fix hash scrolling issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hadith-api.