Wolfram Student Podcast S2 Ep 4: Analyzing Ancient Greek Syntax

Danai built a Wolfram Language project that analyzes Ancient Greek syntax by classifying verb endings, noun forms, and articles, then applies rules to identify sentence subjects. The prototype handles three core cases and outputs structured data, with plans to expand to objects and adjectives.
Questions this video answers
Junior year (high school).
Greece.
Sam and Roshan.
checkBoolean, checkElements, and a top-level Module (Wolfram language functions mentioned in the transcript).
October 11, 2023.
Chapters
Hello, everyone, and welcome to episode three, season four of the Wolfram Student Podcast. I'm Sam.
And I'm Roshan.
And we're your host.
This is the Wolfram Student Podcast, where every fortnight we dive into a new innovative project done by high schoolers using the Wolfram language.
For this episode, let's welcome Danai, who will be discussing her project on analyzing ancient Greek syntax. Hello, Danai.
Hello.
Yeah, so it's amazing to have you on the podcast. Can you first give us, like, a quick introduction about, you know, your name, grade, where you come from, that kind of stuff?
Yeah, of course. So my name is Tanay. I'm from Greece, and I'm attending now my junior year. I'm really excited to be here and talk to you about this project.
Yeah. So I guess, like, what's been your history with Wolfram so far? Like, presumably you attended camp, but have you done anything before after that kind of stuff?
Yeah, so some years ago, I attended the middle school summer camp once, and I also mentored in it later. Also, I've attended the high school one twice, and I'll be talking about my second time in the high school.
Yeah. Awesome. So you have, like, a lot of. I don't know, I can't remember the word off the top of my head. It's.
It's been an ongoing relationship with Wolfram. Yeah.
Yeah, that's really cool. And I guess just, like, a fun question we like to ask everyone comes on. What's your favorite Wolfram function?
Okay, I'm gonna, like, say what was my favorite, like, more for this project. And I think part was, like, extremely useful for this one. It's, like, really common, but it makes so much sense sometimes.
Like, the most common ones are also just, like, the most useful ones that just do everything for you, so. Yeah, no, I totally get it.
Exactly.
Anyway, sounds really cool, and I'm excited to get into your project, so why don't you first give us a quick summary about what this is.
So this is a look into ancient Greek syntax. In English, you would say, like, the grammar of a sentence, but for me, syntax is a bit different. And my goals for this project were to look into syntax from an algorithmic perspective, share my knowledge for ancient Greek, and then also develop an algorithm that is going to give the syntax of an ancient Greek sentence.
Yeah, that sounds really cool. And you, like, explained that syntax, or at least you find syntax a little bit differently. Can you explain how you define syntax?
Yeah. So syntax basically doesn't only say what grammatical, what grammar type is a word. It compares the words to find the relation between them. So you need to compare the words in a sentence to find the syntax. It's a bit different. And yeah, I figured that in America you don't really use that word. So, yeah, I just wanted to clear that up.
Yep. I don't know actually for certain how often we use the word syntax, but your explanation was good. Okay, cool. So let's dive right in.
Okay, great. So for now, I'm just gonna talk over my thinking process. So. So the first part was approaching it from a grammatical perspective. So to do that, I needed some data, right? So that I would be able to characterize each part of speech. So I needed, and I have it right here, just in general, I needed data for verb and verb form endings, for verb stems and also other parts of speech, like articles that I have. This is all the manipulation for the verb data. I'm not going to go over it because it's not that important. But for example, for articles and linkers, I needed the whole words so that I could identify them. This has a list and also the endings for nouns. So let's see how I went on to finding the parts of speech. So we have about four functions, I think, that helped me analyze the data I had and determine the parts of speech based on that. So for, let's say a verb, I needed to find the largest ending that it had in my databases and then also check if it has a stem of a verb. And that would also go for different verb forms like participle and infinitive. So for that, I had the Czech largest ending that you see here and the Czech stem verbs. Now for the rest, you know, to classify the ending that I found, I had check Boolean, that basically said which one of those lists it is. And finally, to put that all together, I had check elements which also.
Said.
If the word was linker or an article. And for that, it didn't check some kind of ending, but the whole word. Okay, I hope that's like roughly clear. Now I can go on to the actual syntax approach. So comparing those parts of speech that I found to see the relation between them, that would reveal my subject. I had as much time that only let me find the subject and not more things about a sentence. So that's as far as this project went. So, yeah, for that I needed from my data to be able to see the noun categories. So we have category A, B and C in ancient Greek. I needed to be able to see whether my nouns and verbs, and there's only one verb if they were in singular or plural. And also for nouns, I had to be able to check whether they're nominative, which basically means first person. Okay. So then I made a bunch of, like, classifiers, kind of to check that. So I'm not really gonna. I'm just gonna explain, like, my. My thought process here. So I needed for the noun to see. Check whether it's a nominative of its grammatical category. So I can find whether it's in the first category. And then it also needs to be in the first person that. That category of the. Of the endings of that category, if that makes sense. And also the number, like, it can be in singular or plural. And then I also needed to know the number of the verb. So now after I knew all that stuff, I had three different cases. And you can see those right here. Those are really important functions. So the first case was if I have one noun in my sentence and one verb in singular. So the requirements for that would be that the noun is in nominative singular of the nouns category, and in that case it would be considered the subject of the sentence. The second case was if I had one noun and a verb in plural in that case, then the nominative of the noun would be. Would have to be in plural, because you cannot say, for example, the cat are doing something. It doesn't make sense. So it wouldn't be a subject. And the final category was if I had two nouns that were in nominative and one verb in plural. And in that case the nominative, it wouldn't matter if it is in singular or plural, because you can say the cat and the dog are running. So they can be in. But you can also say the cats and the dogs are running. It doesn't matter. Okay, that being said, then I just transferred all that knowledge for every part of speech into a really big function where.
Yeah, that looks. Could you take me through kind of like every step of logic of this function? Because I'm just curious, like, how this one.
Yes, of course. Okay, so this is a module. And a module lets you have, like, variables that only exist inside of module. So. Oh, my God, this is gonna take some time. These are all the, like, variables. And then. Well, it's kind of difficult to go through this because it has all the functions that I had above, more or less all of them are included, but roughly. So we have, like, all the parts of speech, right, that take as associations the words that are considered like clinker and fidative. And so on. So this is the first part, and it's basically the check elements. It is using check elements. So you can see that here. Only this line does that. And it's really cool. Should I explain check elements?
Yeah, I guess that'd be kind of cool.
Okay.
You know, just for the viewers who.
Don'T, of course, because check elements was, I'd say, the second most important function in this thing. It was the first part of doing this. So. Check boolean has the lists of the endings and it outputs true or false if one of the largest ending of a word corresponds to one of those endings. So if we go to check Boolean, if it's in verbs, you would put true and then like false false, for example. So for words, I'm checking the first part, and if it is true, and if the word has a stem of a verb, it is considered a verb. And this is more or less the way of thinking for participle and infinitive, then as I said for linker and article, it checks the whole word. And then for noun, you just need the ending to match. That's why I put it last one. So you can go through all the other tests before. And if it's none of those, then it's like an unknown part of speech. Okay, so now that we have that, we can go back to this huge module. And so what this does, what this whole thing does, is that it puts the part of speech, the parts of speech that have been given, like an attribute, by check elements. It puts that in an association. And then the which part is for the subject. So it is the cases that I told you about. And here in the which you have the cases and the requirements are the three functions above. So I wouldn't have to write more code in this already huge module. So this is the which statement, and those are the three cases. And the fourth one is if there is no word that is matching, so the subject is implied, because that can happen in a sentence.
Can you give like an example of how the subject might be implied in like a sentence?
Okay, let's see. Okay, I have to say a thing. Before that, I have to talk about what a sentence in Ancient Greek means. Because a sentence in English, as we view it can have, for example, multiple verbs, right? And it begins after a full stop and ends when you see another full stop. But in Ancient Greek, when you separate sentences, it's a whole other thing. And there can only be one verb in each sentence, for example. Yeah, so. Yeah, so a lot of times, like if you See a comma. Or if you. Well, if you see another verb, for example, it means that there has to be another sentence. And there are also sentences that do not, that are not stable on their own. So. Those usually have like, implied subjects. It's been a long time since I've done ancient Greek, but I swear that type of syntax exists.
No worries. No worries. That's. Whoa. That's. That's kind of cool to think about. Like, that's only having one verb.
Yeah. And like, what I said in like the goals of this project, like sharing my knowledge and kind of like a mind opening view of languages and the way we communicate was big goal for this project. I have it explained in my Wolfram community post. I think all that stuff. And I also have a link if any of the listeners are interested. Not sort of scrolling up like here. That site explains it all. And it's in English. It's perfect.
Okay, I'm definitely gonna go check that out. Cool.
Okay. And this is the. This is the result. I didn't show that. So. Yeah. Oh, and the last part of this function is to give the output. So yeah, this just puts it all in a association. Then it does this formatting thing where it puts every part together.
Like an example. I think it's really cool how the verb is at the end, not like in the middle, as I would kind of expect. But I'm assuming this structure is kind of like the ambassador the Spartan leaders sent.
Yeah, yeah.
Which is really cool.
So.
Yeah, I mean, like, you know in Star wars how Yoda sometimes like switches around the order of his sentences is kind of what this reminds me, like. Yeah.
Yeah. Oh my God. You should have seen like. Like when we do syntax of like the text that we have to like translate and work around in classes, there are some things in syntax that are unimaginable. Like, even for me, I get shocked. And that is, that's what led to like this whole thing. Because I was so shocked and I wanted to kind of put it in order in my head as well, I think in my, my thought process.
Yeah, stop. That's super cool. Thank you for sharing that.
Any other, like, questions regarding this project? I hope I explained it well.
No, you explained it really well. I was just curious, like on your conclusion or future work, what were you thinking about this project? Like, anything you want to continue with it?
Yeah, I really hope I get the motivation to continue this project because. Because there's a lot of things to be done for this and I'm really, I'm still Interested in this topic, but I know that my schedule is, like, pretty full these days.
Yeah, no worries.
It's unfortunate, but I. But I know there are a lot of things to be done, and I know that if I get the motivation, no matter how many things I have to do, do, Like, I could sit down and do it. It would be fun for sure.
Yeah.
Like, okay, let me give you. Let me give you an example. Like, here I have the subject. I could be able to find, like, the object or, like, adjectives and other stuff that don't exist in English.
No, that'd be really cool. If you ever do do that, I'd love to see it again. Definitely. Send it to me. I was just asking about, like, the project general. What was, like, your favorite part of the project here?
So favorite part of the project. I think a really, like, yay moment was when I was able to find a verb, Like, I had written, roughly the function that would check the endings. This was at the very beginning, and it would just check the endings of the verbs. And I saw the list of true, false, and I saw, like, one true. And I was so happy. I was like, it's working. But also, overall, the harder the task was, the most reward I got out of completing it. So.
Yeah, yeah, I totally get that. And I guess this kind of ties in. But I guess what was the most difficult part to code and presumably the most rewarding part?
Yeah, you would think it's the algorithm because it looks so huge and. Okay, it was kind of. But I think the most frustrating thing was the data. Like, finding it and downloading it and classifying it was just an ongoing process throughout camp. And, well, I learned a lot about.
It, but data is always frustrating to work with. Yeah.
But I learned a lot, like web scraping and stuff, because you do not find this kind of data anywhere except for websites. You do not find that stuff. There's not a database. Right.
Yeah. Cool.
Data was just so unorganized. Like, what is that?
Okay. Anyway, so super cool the likes of your project, everything you're doing with it. And I guess just curious, like, after doing this project, having done, like, the middle school camp, been a mentor there, and having done the high school camp for, like, a year before this, what are your, like, ultimate thoughts on the Wolfram language? Like, is it something you enjoy more than other coding languages? If you've done it, is there something that just, like, sticks with this language that makes you keep using it?
I feel like this year I really got to understand the Wolfram language because I worked so intensely on it. It is really user friendly, kind of slow, not gonna lie. But I think that at this time in my coding experience, I could have done this project only using Wolfram because it's so easy to use. And I know, like, Stephen Wolfram said that any additions they do to the language at this point, it's gotten really automated the way they add to the language. So I think that's really cool.
Yeah, no, that sounds super cool. I guess. Just last question. I know you said, like, you'd like to continue this project, but I mean, if something either like continuing this project or maybe something else entirely, is there anything you'd like to, like, try again with Wolfram? Like maybe a different project entirely or come back to another year of the camp?
Yeah, I'm probably going to mentor again because that was really fun and those kids gave me so much joy. Yeah.
Yeah.
And probably. Probably going back to the high school one. I have no idea about what project I'm gonna do, but I'm probably coming back to the high school just again to see the people that were there as well, because it's so cool to have people around you that are interested in coding. That doesn't happen so often.
Yeah. The camp's always, like, a really amazing environment to hang out in.
Yeah.
Yeah. And it being, like, in person this year was also really fun to go to.
That was so much better.
Yeah. Yeah. Okay. Yeah. Thank you so much for coming on and sharing your project with us. It was super cool.
Thank you as well.
Appreciate it. Yeah. Have a great day. Carry on doing cool stuff with Wolfram, and if you do, we'd love to see it.
Okay, bye.
Thanks for listening to this episode of the Wolfram Student Podcast. We hope you learned something new and took away insights from today's discussion. If you want to be featured in a future episode, fill out the form@tinymrl.com WSP S2 interest and be sure to.
Tune back in two weeks time to hear our next episode. Once again, thank you for listening to this episode of the Wolfram Student Podcast.
More from Guy

Cheryl Strauss Einhorn | The Human Edge: Smarter Decisions in the Age of AI | Talks at Google

Rachel Glennerster | Innovation and the Center for Global Development | Talks at Google

Rebecca Winthrop | Rethinking the Purpose of Education in the Age of AI | Talks at Google

Dr. Robert Wachter | A Giant Leap: How AI Is Transforming Healthcare... | Talks at Google






