0Pricing
NLP Academy · درس

نمذجة اللغة المقنّعة

كيف يتعلم BERT من النص الخام

نمذجة اللغة المقنّعة درس مجاني في NLP Academy على CoddyKit. هذا هو الدرس 2 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في NLP Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة NLP Academy 4 دروس في المجموع.

بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.

Learning Without Labels

BERT trains on plain text with no human labels at all. This clever trick is called self-supervised learning.

The Fill-in-the-Blank Game

BERT learns by hiding some words and guessing them back. That game is masked language modeling, or MLM for short.

Hiding a Word

A random word gets swapped for a special placeholder. Here the model must recover what the mask is covering up.

text = "the cat sat on the [MASK]"
# model should predict: mat

Predict the Missing Word

BERT reads everything around the blank and ranks likely fills. Strong guesses come from using the full context.

Why Hiding Helps

To fill a blank well, the model must learn grammar, facts, and word relationships. The blank forces real understanding.

The Famous 15 Percent

BERT masks about 15 percent of the words in each sentence during training. That ratio balances signal and difficulty.

Both Sides at Once

Unlike left-to-right models, BERT sees words before and after the blank. This bidirectional view makes its guesses far richer.

A Second Task

Original BERT also guessed if one sentence follows another. That extra job is next sentence prediction, teaching it about flow.

Pre-training, Then Reuse

This slow, expensive MLM phase is the pre-training step. You download the result and reuse it without redoing the work.

Try It in Code

A fill-mask pipeline lets you watch MLM in action and see BERT rank its top predictions for any blank.

from transformers import pipeline
fm = pipeline("fill-mask", model="bert-base-uncased")
fm("Paris is the [MASK] of France.")

Knowledge for Free

After MLM, BERT holds a huge store of language knowledge ready to power your tasks. All of it came from raw text.

Quick Check

What does masked language modeling ask BERT to do?

Recap

BERT learns by filling masked blanks using both sides of a sentence. This self-supervised MLM builds deep language knowledge. ✅

الأسئلة الشائعة

هل درس «نمذجة اللغة المقنّعة» مجاني؟

نعم — نص درس «نمذجة اللغة المقنّعة» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة NLP Academy، انتقل إلى CoddyKit PRO. تتضمن دورة NLP Academy 4 دروس في المجموع.

ماذا ستتعلم في «نمذجة اللغة المقنّعة»؟

كيف يتعلم BERT من النص الخام تتمرن على NLP Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.

هل أحتاج إلى خبرة سابقة لأبدأ NLP Academy؟

لا تُشترط خبرة سابقة. NLP Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 2 من أصل 4.

كم من الوقت يستغرق درس «نمذجة اللغة المقنّعة»؟

معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.

هل يمكنني كتابة وتشغيل أكواد في درس NLP Academy هذا؟

نعم. كل درس في NLP Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.

جميع الدروس في هذه الدورة

  1. لماذا يغيّر السياق معنى الكلمة
  2. نمذجة اللغة المقنّعة
  3. تضمين الجمل باستخدام BERT
  4. اختيار النموذج المدرّب مسبقًا المناسب
← العودة إلى NLP Academy