Kelime ve Karakterleri Sayma
Temel uzunluk ve sıklık ölçümleri
Kelime ve Karakterleri Sayma, CoddyKit'te ücretsiz bir NLP Academy dersidir. Bu, 4 dersinin 3. dersidir. Aşağıdan dersin tamamını ücretsiz okuyabilir, sonra tarayıcıda yerleşik kod editörü ve 7/24 yapay zeka koçu ile uygulamalı olarak pratik yapabilirsin. Bu, NLP Academy öğrenme yolunun bir parçasıdır ve ilerlemeniz web ve CoddyKit uygulaması arasında senkronize olur. NLP Academy kursu toplamda 4 dersten oluşur.
Bu dersin bazı bölümleri henüz çevrilmemiş olup İngilizce olarak gösterilmektedir.
Measuring Text First
Before any fancy analysis, you measure text. Simple counts of characters and words already tell you a lot about a document. 📏
Count Characters With len
The len function returns how many characters a string holds, including spaces and punctuation.
text = "NLP is fun"
print(len(text)) # 10Spaces Count Too
Remember that whitespace like spaces and newlines are real characters, so they are included in any character count.
Split Into Words
The split method breaks a string on whitespace and returns a list of words, your simplest path to word counting.
words = "one two three".split()
print(words) # ['one','two','three']Count the Words
Apply len to the list from split and you get the word count of the whole document.
words = text.split()
print(len(words)) # number of wordsSplit Is Naive
Plain split treats hello! as one word because punctuation sticks to letters. Good enough to start, but not perfect.
Count Sentences Roughly
A quick sentence estimate is to count periods, question marks, and exclamation points. It is rough but instantly useful.
n = text.count(".") + text.count("?") + text.count("!")Average Word Length
Divide total letters by word count to get average word length, a small signal about how dense the writing is.
avg = len(text.replace(" ", "")) / len(words)Counting Specific Substrings
The count method tells you how many times a substring appears, handy for tallying a single target word.
print(text.lower().count("the"))Unique Words With a Set
Put the word list into a set and its length is the number of unique words, a measure of vocabulary richness.
unique = set(words)
print(len(unique))Why Counts Matter
These statistics drive real decisions: spam filters flag odd lengths, and readability tools lean on word counts.
Quick Check
Test your grasp of basic Python text counting.
Recap: Counting Text
You can now count characters with len, words with split, unique words with a set, and rough sentences by punctuation. 🔢
Sıkça Sorulan Sorular
“Kelime ve Karakterleri Sayma” dersi ücretsiz mi?
Evet — “Kelime ve Karakterleri Sayma” dersin tüm metni burada web'de ücretsiz olarak okunabilir. Etkileşimli olarak pratik yapmak (yerleşik kod editörü ve 7/24 yapay zeka koçu) ve NLP Academy kursunun geri kalanını açmak için CoddyKit PRO'ya yükselt. NLP Academy kursu toplamda 4 dersten oluşur.
“Kelime ve Karakterleri Sayma” dersinde ne öğreneceğim?
Temel uzunluk ve sıklık ölçümleri NLP Academy ile uygulamalı kodu tarayıcıda doğrudan çalıştırarak pratik yaparsın ve 7/24 yapay zeka koçu dersi çalışırken sorularını yanıtlar.
NLP Academy öğrenmeye başlamak için deneyim gerekli mi?
Önceden deneyim gerekmez. CoddyKit'te NLP Academy, başlangıçtan ileri seviyeye kadar yapılandırıldığı için buradan başlayabilir veya başından başlayıp kendi hızında ilerleme yapabilirsin. Bu, 4 dersinin 3. dersidir.
“Kelime ve Karakterleri Sayma” dersi ne kadar sürer?
Çoğu CoddyKit dersi yaklaşık 5–10 dakika sürer. Her biri kısa ve etkileşimli olduğu için sabit ilerleme yaparsın ve web ile uygulama arasında tam olarak bıraktığın yerden devam edebilirsin.
Bu NLP Academy dersinde kod yazıp çalıştırabilir miyim?
Evet. Her NLP Academy dersi yerleşik bir kod editörü içerir, bu sayede tarayıcıda gerçek kod yazıp çalıştırabilir ve anlık yapay zeka geri bildirimi alırsın — yerel kurulum gerekli değildir.
Bu kursun tüm dersleri
- Dizeler, Karakterler ve Kodlamalar
- Metin Dosyalarını Python'a Okuma
- Kelime ve Karakterleri Sayma
- İlk Kelime Sıklığı Tablonuzu Oluşturma