File size: 584 Bytes
3a1020a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from zemberek import TurkishMorphology

# Create the TurkishMorphology object with default resources
morphology = TurkishMorphology.create_with_defaults()

# Word to analyze
word = "katıldılar"
print(f"Word = {word}")

# Analyze the word
results = morphology.analyze(word)

# Iterate through the results and print various formats
for result in results:
    # Print the result in a detailed string format
    print(f"Lexical and Surface: {result.format_string()}")
    print(f"Stems: {result.get_stem()}")
    #print(f"Lemmas: {result.get_lemma()}")
    print()