تحليل النص باستخدام خوارزمية استخراج الجمل المهمة - كتاب الذكاء الإصطناعي - الصف 12 - الفصل 1 - المملكة العربية السعودية

الكتاب: كتاب الذكاء الإصطناعي - الصف 12 - الفصل 1 | المادة: الذكاء الإصطناعي | المرحلة: الصف 12 | الفصل الدراسي: 1

الدولة: المملكة العربية السعودية | المنهج: المنهج السعودي - وزارة التعليم

الدرس: تطبيق خوارزمية استخراج الجمل المهمة من نص باستخدام Word2Vec

📚 معلومات الصفحة

الكتاب: كتاب الذكاء الإصطناعي - الصف 12 - الفصل 1 | المادة: الذكاء الإصطناعي | المرحلة: الصف 12 | الفصل الدراسي: 1

الدولة: المملكة العربية السعودية | المنهج: المنهج السعودي - وزارة التعليم

نوع المحتوى: example

مستوى الصعوبة: متوسط

📝 ملخص الصفحة

تقدم هذه الصفحة شرحاً عملياً لخوارزمية استخراج الجمل المهمة من نص باستخدام نموذج Word2Vec وتقنيات تحليل المجتمعات. يبدأ النص بشرح مقطع برمجي يقوم بتقييم الجمل بناءً على كلماتها ومجتمعاتها، حيث يتم حساب درجة لكل جملة عن طريق جمع درجات المجتمعات المرتبطة بكلماتها.

يتم بعد ذلك ترتيب الجمل بناءً على درجاتها التنازلية لتحديد الأكثر أهمية. يوضح النص تطبيقاً عملياً لهذه الخوارزمية على نص يتكون من 61 جملة، حيث يتم استخراج الجمل الثلاث الأكثر أهمية بناءً على أعلى الدرجات.

تتضمن الأمثلة المقدمة جملاً تتعلق بكرة القدم، مثل إنجازات ليونيل ميسي وكيليان مبابي في كأس العالم، مما يوضح كيفية تطبيق الخوارزمية على نصوص واقعية. يُظهر هذا التطبيق كيفية استخدام تقنيات معالجة اللغة الطبيعية لتحليل النصوص واستخراج المعلومات الرئيسية منها بكفاءة.

📋 المحتوى المنظم

📖 محتوى تعليمي مفصّل

نوع: محتوى تعليمي

word in model_wv] # ignores words that are not in the Word2Vec model sentence_score=0 # the score of the sentence for word in sentence_words: # for each word in the sentence word_comm=word_to_community[word] # get the community of this word sentence_score+= community_scores[word_comm] # add the score of this community to the sentence score. scored_sentences.append((sentence_score, raw_sent)) # stores this sentence and its total score # scores the sentences by their score, in descending order scored_sentences=sorted(scored_sentences,key=lambda x:x[0],reverse=True) return scored_sentences scored_sentences=evaluate_sentences(text,word_to_community,community_ scores,model_wv) len(scored_sentences)

نوع: METADATA

61

نوع: محتوى تعليمي

يتضمن المستند الأصلي إجمالي 61 جملة، ويُستخدم المقطع البرمجي التالي للعثور على الجمل الثلاثة الأكثر أهمية من بين هذه الجمل:

نوع: محتوى تعليمي

for i in range(3): print(scored_sentences[i],'\n')

نوع: محتوى تعليمي

(3368, 'Lionel Messi not only emulated the deity of Argentinian football, Diego Maradona, by leading the nation to World Cup glory; he finally plugged the burning gap on his CV, winning the one title that has eluded him - at the fifth time of asking, surely the last time.')

نوع: محتوى تعليمي

(2880, 'He scored twice in 97 seconds to force extra-time; the first a penalty, the second a sublime side-on volley and there was a point towards the end of regulation time when he appeared hell-bent on making sure that the additional period would not be needed.')

نوع: محتوى تعليمي

(2528, 'It will go down as surely the finest World Cup final of all time, the most pulsating, one of the greatest games in history because of how Kylian Mbappé hauled France up off the canvas towards the end of normal time.')

نوع: METADATA

وزارة التعليم Ministry of Education 181 2025 - 1447

🔍 عناصر مرئية

وزارة التعليم

Logo of the Ministry of Education with text '181' and years '2025 - 1447' below it.

📄 النص الكامل للصفحة

word in model_wv] # ignores words that are not in the Word2Vec model sentence_score=0 # the score of the sentence for word in sentence_words: # for each word in the sentence word_comm=word_to_community[word] # get the community of this word sentence_score+= community_scores[word_comm] # add the score of this community to the sentence score.scored_sentences.append((sentence_score, raw_sent)) # stores this sentence and its total score# scores the sentences by their score, in descending order scored_sentences=sorted(scored_sentences,key=lambda x:x[0],reverse=True)return scored_sentences scored_sentences=evaluate_sentences(text,word_to_community,community_ scores,model_wv) len(scored_sentences)يتضمن المستند الأصلي إجمالي 61 جملة، ويُستخدم المقطع البرمجي التالي للعثور على الجمل الثلاثة الأكثر أهمية من بين هذه الجمل:for i in range(3): print(scored_sentences[i],'\n')(3368, 'Lionel Messi not only emulated the deity of Argentinian football, Diego Maradona, by leading the nation to World Cup glory; he finally plugged the burning gap on his CV, winning the one title that has eluded him - at the fifth time of asking, surely the last time.')(2880, 'He scored twice in 97 seconds to force extra-time; the first a penalty, the second a sublime side-on volley and there was a point towards the end of regulation time when he appeared hell-bent on making sure that the additional period would not be needed.')(2528, 'It will go down as surely the finest World Cup final of all time, the most pulsating, one of the greatest games in history because of how Kylian Mbappé hauled France up off the canvas towards the end of normal time.')2025 - 1447--- VISUAL CONTEXT ---Context: Page metadata/publisher information.