0Pricing
NLP Academy · درس

أساسيات تقسيم الجمل

اكتشف موضع انتهاء إحدى الجمل

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

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

A Different Kind of Split

Sometimes you need whole sentences, not words. Sentence segmentation finds where one sentence ends and the next begins. 📑

The Obvious Clue

The strongest signal is end punctuation: a period, a question mark, or an exclamation point usually closes a sentence.

A Naive First Try

You might just split on the period. For simple text it works, turning two clean sentences into a tidy list.

text = "I love cats. Dogs are fun."
print(text.split(". "))

The Period Problem

Here is the trap: not every period ends a sentence. Abbreviations like Dr. or U.S.A. use periods that fool a naive splitter.

Decimals Trip It Up

Numbers like 3.14 contain a period too. Split blindly and you slice a single number into two broken fragments.

Quotes and Endings

Dialogue makes it harder. A sentence can end inside quotation marks, so the closing quote may come after the period.

Context Is Key

To decide if a period ends a sentence, you must look at the context around it: the next character, capitalization, and known abbreviations.

Why Sentences Matter

Many tasks work sentence by sentence. Summarizers, translators, and sentiment tools all rely on clean boundaries to work well.

Let a Library Help

Because the rules are subtle, real code uses a trained tool. NLTK's sent_tokenize handles abbreviations and edge cases for you.

from nltk import sent_tokenize
sent_tokenize("Dr. Lee is here. Hi.")

Sentences Before Words

A common order is sentences first, then words. You segment into sentences, then tokenize each one into its own word list.

Languages Vary

Sentence rules differ by language. Some scripts use their own end marks, so a good tool is language-aware rather than hardcoded to English.

Quick Check

Why is splitting on every period risky?

Recap

Sentence segmentation finds sentence boundaries. Periods are clues but not proof, so abbreviations and decimals trip naive splits. Tools like sent_tokenize handle it.

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

هل درس «أساسيات تقسيم الجمل» مجاني؟

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

ماذا ستتعلم في «أساسيات تقسيم الجمل»؟

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

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

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

كم من الوقت يستغرق درس «أساسيات تقسيم الجمل»؟

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

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

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

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

  1. ما الرمز المميّز فعلًا؟
  2. التقسيم عند المسافات البيضاء وحدوده
  3. أساسيات تقسيم الجمل
  4. تقسيم النص إلى رموز باستخدام NLTK
← العودة إلى NLP Academy