File size: 299 Bytes
5ac8fa2
 
 
 
 
1
2
3
4
5
def generate_flashcards(text):
    """تحويل المحتوى إلى كروت دراسية"""
    sentences = text.split('. ')
    flashcards = [{"السؤال": f"ما هو معنى: {sent.strip()}؟", "الإجابة": sent.strip()} for sent in sentences if len(sent) > 10]
    return flashcards