Python


This sections consists of 2 tests with Python script which are assisted with AI tools ChatGBT and Cursor. Selected AI tools have proven themselves in curating code to speed up and simplify code writing, making the work of today’s programmers easier. We will therefore test them in this work to learn more about their benefits and specificities.

1. Personal names with Python and ChatGBT

The principle of this task is the simple separation of names in the text in their most usual nominative form in both Latin and Estonian. For this task I used the list of names mentioned in the Richard Kleis’s version of the book, which is found on the pages 275-281. Due to the large amount of names, I also made some minor restrictions to reduce the number of results. To do this, I took away the place names behind the personal names, so that the names of persons with the same first name could be counted under the same name, including the personal number behind the name, e.g. Otto IV becomes simply Otto. I also left out names where it is mentioned that it is a family name e.g. the Bekeshov family, therefore only counting peoples first names in purpose of this test.

To create the Python code I made a prompt for the first AI tool ChatGBT which I then corrected until I got the fished result:

Latin:

Absolon: 0Carolus: 0Gerceslawe: 1Kulewene: 1Nogardie: 15Thalibaldus: 1Viewaldus: 1
Adolphus: 0Caupo: 13Gerhardus: 0Kyrianus: 0Ostradus: 0Theodericus: 20Wigboldus: 1
Ako: 2Coelestinus: 0Gerweder: 1Kyriawanus: 1Otto: 3Uldenago: 1Viliendi: 1
Alabrandus: 2Cono: 1Gerwinus: 1Lambertus: 0Paike: 2Uldewene: 2Wolter: 0
Albertus: 22Conradus: 3Geverhardus: 0Layanus: 1Petrus: 6Unnepewe: 1Vissewalde: 2
Alderus: 1Constatinus: 0Godescalus: 0Lembewalde: 1Philippus: 7Wade: 1Wizzlaus: 1
Alexander: 2Dabrelus: 3Godfridus: 3Lembitu: 2Rabodo: 1Wane: 1Volchardus: 0
Alo: 0Danielus: 0Gregorius: 0Ludolfus: 0Rameko: 5Wardeke: 1Woldemarus: 10
Andreas: 2Daugeruthe: 1Harbertus: 0Ludovicus: 0Robertus: 0Waremarus: 0Wolterus: 1
Anno: 55David: 3Hartwicus: 2Made: 1Roboam: 2Waribule: 1Volquinus: 12
Arnoldus: 5Dote: 2Hebbus: 0Maniwalde: 1Rodolfus: 9Waridote: 3Wottele: 1
Asso: 1Drivinalde: 1Helmoldus: 2Marquardus: 2Rothmarus: 1Warigribbe: 2Vytamas: 1
Augustinus: 0Drunwaldis: 0Helyas: 1Martinus: 1Russinus: 10Veko: 2Ylo: 1
Berengaria: 0Engelbertus: 1Heinricus: 2Mauritius: 1Salomo: 0Wenno: 0Ymaut: 1
Bernardus: 8Everhardus: 1Henricus: 5Meluke: 2Segehardus: 1Wescelinus: 0Yso: 2
Bertoldus: 19Eylardus: 1Hermannus: 4Meme: 1Segehardus: 1Vesike: 5
Birger: 0Florencius: 0Herodes: 0Meynardus: 10Siffridus: 1Vesthardus: 4
Bodo: 2Fredehelmus: 1Honorius: 0Mislawe: 1Stecse: 3Wichmannus: 1
Borchardus: 1Fredericus: 1Innocentius: 0Misteslawe: 2Stephanus: 0Wickbertus: 1
Burcgravius: 0Gayle: 1Ioahnnes: 0Nicolaus: 2Suelgate: 1Viesceka: 3
Canutus: 0Gedeon: 0Isfridus: 1Ninnus: 2Tabelinus: 0Vietzo: 1

The count of words:

Count 0: 35 namesCount 8: 1 names
Count 1: 47 namesCount 9: 1 names
Count 2: 22 namesCount 10: 3 names
Count 3: 7 namesCount 12: 1 names
Count 4: 1 namesCount 15: 1 names
Count 5: 3 namesCount 19: 1 names
Count 6: 2 namesCount 22: 1 names
Count 7: 1 namesCount 55: 1 names

Estonian:

Absalon: 0Cono: 1Godescale: 1Knud: 0Ninnus: 2Suelgate: 2Wichmann: 1
Adolf: 1Conrad: 3Godfrid: 3Kulewene: 1Olaus: 0Taavet: 0Wickbert: 0
Ako: 3Constatin: 0Gregorius: 0Kyrian: 1Ostrad: 0Tabellinus: 0Viesthard: 2
Albert: 22Dabrel: 3Harbert: 0Kyriawan: 1Otto: 4Thalibald: 1Viewald: 1
Albrecht: 0Daniel: 2Hardeknud: 0Lambert: 0Bernard: 7Theoderic: 22Vietzo: 1
Alder: 1Daugeruthe: 0Hartwic: 2Layan: 1Paike: 2Heinrich: 0Viliendi: 1
Alebrand: 9David: 0Hartwig: 0Lembevalde: 0Petrus: 6Uldenago: 1Vissewalde: 2
Alexander: 2Dote: 2Hebb: 0Lembitu: 7Philippus: 0Uldewene: 2Wizzlaus: 1
Alo: 1Drivinalde: 1Heinric: 5Ludolf: 0Pribislav: 0Unnepewe: 1Vjatško: 0
Andras: 0Drunwald: 0Helmold: 2Ludovic: 0Rabodo: 1Augustin: 0Vladimir: 0
Andreas: 2Eggelbert: 2Helyas: 1Made: 1Rainald: 0Wade: 1Woldemar: 10
Anno: 2Engelbert: 1Henric: 6Maniwalde: 1Rameko: 5Waldeko: 1Volchard: 0
Arnold: 5Everhard: 1Henrik: 0Maria: 0Roger: 0Valdemar: 0Volquin: 12
Asso: 1Eylard: 1Hermann: 3Marquard: 2Robert: 0Wane: 1wolter: 1
Augustinus: 0Florencius: 0Hildebrand: 0Martin: 1Roboam: 1Wardeke: 1Wottele: 1
Berengaria: 0Fredehelmus: 0Honorius: 0Mauritius: 1Rodolf: 9Waremar: 0Wulfstan: 0
Bernhard: 0Frederic: 1Innocentius: 2Meluke: 2Rothmar: 1Waribule: 1Ylo: 1
Bertold: 19Friedrich: 0Isaakios: 0Meme: 1Russin: 12Waridote: 3Ymant: 0
Birger: 0Gandulfinus: 0Isfrid: 1Meynard: 10Salomon: 1Warigribbe: 2Ymaut: 1
Bodo: 2Gayle: 1johann: 0Misteslawe: 2Segehard: 1Veko: 2Yso: 2
Borchard: 1Gerceslawe: 1Johannes: 13Modena: 0Siegfried: 0Wenno: 1
Burchard: 1Gerhard: 0Jordan: 3Mysteslawe: 1Sifrid: 1Vercingetorix: 0
Caupo: 22Gerwin: 1Karl: 0Namesis: 0Stecse: 3Wescelin: 0
Coelestinus: 0Geverhard: 0Kiideon: 0Nicolaus: 2Stephanus: 1Vesike: 5

The count of words:

Count 0: 35 namesCount 7: 2 names
Count 1: 39 namesCount 9: 2 names
Count 2: 22 namesCount 10: 2 names
Count 3: 6 namesCount 12: 2 names
Count 4: 1 namesCount 13: 1 names
Count 5: 5 namesCount 19: 1 names
Count 6: 2 namesCount 22: 3 names

The combined count of both languages:

Count 0: 35 namesCount 0: 35 names
Count 1: 39 namesCount 1: 47 names
Count 2: 22 namesCount 2: 22 names
Count 3: 6 namesCount 3: 7 names
Count 4: 1 namesCount 4: 1 names
Count 5: 5 namesCount 5: 3 names
Count 6: 2 namesCount 6: 2 names
Count 7: 2 namesCount 7: 1 names
Count 9: 2 namesCount 8: 1 names
Count 10: 2 namesCount 9: 1 names
Count 12: 2 namesCount 10: 3 names
Count 13: 1 namesCount 12: 1 names
Count 19: 1 namesCount 15: 1 names
Count 22: 3 namesCount 19: 1 names
Count 22: 1 names
Count 55: 1 names

2. Latin place names frequency with Python and Cursor

In this part, I use Cursor AI to compile Python code to read the frequency of place names in the Latin text of a given work, in order to use the data later to create a heat map with Kepler. As previously the place names are found from the end of the Richard Kleis book from the pages 288-290. The purpose of this code is to to sort out 30 most frequently named places in the book which could be use for mapping:

Lyvonia: 189Ugaunia: 51Ymera: 27Dunemunde: 19Beverin: 16Pala: 12
Riga: 138Dacia: 34Ykescola: 26Plescekowe: 18Gothlandia: 16Rotalia: 11
Duna: 77Saccala: 33Semigallia: 25Revele: 17Ydumea: 16Saxonia: 11
Estonia: 70Osilia: 28Holme: 24Thoreyda: 17Kukenoys: 14Sontagana: 10
Wenden: 55Vironia: 27Gerwa: 22Viliende: 17Gercike: 12Ploceke: 9