Skip to content

Commit

Permalink
Add testing for API part #9
Browse files Browse the repository at this point in the history
  • Loading branch information
JetamZ committed Oct 29, 2024
1 parent 9ecd13f commit 681897f
Show file tree
Hide file tree
Showing 47 changed files with 1,068 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[{'affiliation.person_id': 'VeraJourova.1964', 'average_named_entity_references': 50.0}, {'affiliation.person_id': 'AndrejBabis.1954', 'average_named_entity_references': 47.0}, {'affiliation.person_id': 'PatrikNacher.1974', 'average_named_entity_references': 42.0}, {'affiliation.person_id': 'JaroslavFaltynek.1962', 'average_named_entity_references': 16.666666666666668}, {'affiliation.person_id': 'JosefHajek.1956', 'average_named_entity_references': 14.5}, {'affiliation.person_id': 'MonikaOborna.1989', 'average_named_entity_references': 14.5}, {'affiliation.person_id': 'BronislavSchwarz.1966', 'average_named_entity_references': 12.5}, {'affiliation.person_id': 'AlenaSchillerova.1964', 'average_named_entity_references': 10.0}, {'affiliation.person_id': 'RadimHolis.1975', 'average_named_entity_references': 9.0}, {'affiliation.person_id': 'HelenaValkova.1951', 'average_named_entity_references': 8.75}, {'affiliation.person_id': 'JosefKott.1970', 'average_named_entity_references': 7.833333333333333}, {'affiliation.person_id': 'MiloslavJanulik.1962', 'average_named_entity_references': 7.666666666666667}, {'affiliation.person_id': 'KristynaZelienkova.1974', 'average_named_entity_references': 6.0}, {'affiliation.person_id': 'KlaraDostalova.1971', 'average_named_entity_references': 5.538461538461538}, {'affiliation.person_id': 'TatanaMala.1981', 'average_named_entity_references': 4.666666666666667}, {'affiliation.person_id': 'MilanHnilicka.1973', 'average_named_entity_references': 4.0}, {'affiliation.person_id': 'JanaMrackovaVildumetzova.1973', 'average_named_entity_references': 4.0}, {'affiliation.person_id': 'JiriHlavaty.1948', 'average_named_entity_references': 4.0}, {'affiliation.person_id': 'IvanPilny.1944', 'average_named_entity_references': 4.0}, {'affiliation.person_id': 'RomanKubicek.1963', 'average_named_entity_references': 3.0}, {'affiliation.person_id': 'PetrSadovsky.1969', 'average_named_entity_references': 3.0}, {'affiliation.person_id': 'JaroslavaPokornaJermanova.1970', 'average_named_entity_references': 2.0}, {'affiliation.person_id': 'RadekVondracek.1973', 'average_named_entity_references': 1.5}, {'affiliation.person_id': 'BerenikaPestova.1971', 'average_named_entity_references': 1.5}, {'affiliation.person_id': 'DanTok.1959', 'average_named_entity_references': 1.0}, {'affiliation.person_id': 'MilanBrazdil.1962', 'average_named_entity_references': 1.0}, {'affiliation.person_id': 'RadkaMaxova.1968', 'average_named_entity_references': 0.0}, {'affiliation.person_id': 'VeraAdamkova.1954', 'average_named_entity_references': 0.0}]

+--------------------------------+---------------------------------+
| affiliation.person_id | average_named_entity_references |
+--------------------------------+---------------------------------+
| VeraJourova.1964 | 50.0 |
| AndrejBabis.1954 | 47.0 |
| PatrikNacher.1974 | 42.0 |
| JaroslavFaltynek.1962 | 16.666666666666668 |
| JosefHajek.1956 | 14.5 |
| MonikaOborna.1989 | 14.5 |
| BronislavSchwarz.1966 | 12.5 |
| AlenaSchillerova.1964 | 10.0 |
| RadimHolis.1975 | 9.0 |
| HelenaValkova.1951 | 8.75 |
| JosefKott.1970 | 7.833333333333333 |
| MiloslavJanulik.1962 | 7.666666666666667 |
| KristynaZelienkova.1974 | 6.0 |
| KlaraDostalova.1971 | 5.538461538461538 |
| TatanaMala.1981 | 4.666666666666667 |
| MilanHnilicka.1973 | 4.0 |
| JanaMrackovaVildumetzova.1973 | 4.0 |
| JiriHlavaty.1948 | 4.0 |
| IvanPilny.1944 | 4.0 |
| RomanKubicek.1963 | 3.0 |
| PetrSadovsky.1969 | 3.0 |
| JaroslavaPokornaJermanova.1970 | 2.0 |
| RadekVondracek.1973 | 1.5 |
| BerenikaPestova.1971 | 1.5 |
| DanTok.1959 | 1.0 |
| MilanBrazdil.1962 | 1.0 |
| RadkaMaxova.1968 | 0.0 |
| VeraAdamkova.1954 | 0.0 |
+--------------------------------+---------------------------------+
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[{'affiliation.role': 'deputyHead', 'average_sentence_count': 6.246553140472014}, {'affiliation.role': 'member', 'average_sentence_count': 6.239004233762873}, {'affiliation.role': 'representative', 'average_sentence_count': 6.265916590036242}, {'affiliation.role': 'verifier', 'average_sentence_count': 6.243060334939206}, {'affiliation.role': 'head', 'average_sentence_count': 6.244799432019879}]

+------------------+------------------------+
| affiliation.role | average_sentence_count |
+------------------+------------------------+
| deputyHead | 6.246553140472014 |
| member | 6.239004233762873 |
| representative | 6.265916590036242 |
| verifier | 6.243060334939206 |
| head | 6.244799432019879 |
+------------------+------------------------+
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[{'speech.role': 'guest', 'average_tokens': 447.41302235179785}, {'speech.role': 'regular', 'average_tokens': 262.9682086742366}, {'speech.role': 'chair', 'average_tokens': 54.36446967652388}]

+-------------+--------------------+
| speech.role | average_tokens |
+-------------+--------------------+
| guest | 447.41302235179785 |
| regular | 262.9682086742366 |
| chair | 54.36446967652388 |
+-------------+--------------------+
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[{'speech.earliest_timestamp': '09:58:00', 'average_wpm': 141.0}, {'speech.earliest_timestamp': '10:28:00', 'average_wpm': 245.0}, {'speech.earliest_timestamp': '11:48:00', 'average_wpm': 268.0}, {'speech.earliest_timestamp': '19:58:00', 'average_wpm': 209.0}, {'speech.earliest_timestamp': '21:38:00', 'average_wpm': 317.0}]

+---------------------------+-------------+
| speech.earliest_timestamp | average_wpm |
+---------------------------+-------------+
| 09:58:00 | 141.0 |
| 10:28:00 | 245.0 |
| 11:48:00 | 268.0 |
| 19:58:00 | 209.0 |
| 21:38:00 | 317.0 |
+---------------------------+-------------+
16 changes: 16 additions & 0 deletions test/API/examples/actual/fastest_speaking_speakers_result.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[{'speech.person_id': 'LukasVlcek.1982', 'average_wpm': 236.0}, {'speech.person_id': 'JiriHlavaty.1948', 'average_wpm': 233.0}, {'speech.person_id': 'PetrBratsky.1955', 'average_wpm': 232.0}, {'speech.person_id': 'JanPosvar.1985', 'average_wpm': 231.30769230769232}, {'speech.person_id': 'StanislavMackovik.1967', 'average_wpm': 224.91176470588235}, {'speech.person_id': 'MartinMajor.1979', 'average_wpm': 224.0}, {'speech.person_id': 'MartinDvorak.1956', 'average_wpm': 218.33333333333334}, {'speech.person_id': 'RadimHolis.1975', 'average_wpm': 217.0}, {'speech.person_id': 'MiladaVoborska.1972', 'average_wpm': 216.25}, {'speech.person_id': 'MichalKortys', 'average_wpm': 214.0}]

+------------------------+--------------------+
| speech.person_id | average_wpm |
+------------------------+--------------------+
| LukasVlcek.1982 | 236.0 |
| JiriHlavaty.1948 | 233.0 |
| PetrBratsky.1955 | 232.0 |
| JanPosvar.1985 | 231.30769230769232 |
| StanislavMackovik.1967 | 224.91176470588235 |
| MartinMajor.1979 | 224.0 |
| MartinDvorak.1956 | 218.33333333333334 |
| RadimHolis.1975 | 217.0 |
| MiladaVoborska.1972 | 216.25 |
| MichalKortys | 214.0 |
+------------------------+--------------------+
9 changes: 9 additions & 0 deletions test/API/examples/actual/gender_average_tokens_result.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[{'person.sex': '', 'average_tokens': 479.80645161290323}, {'person.sex': 'M', 'average_tokens': 153.0463362811891}, {'person.sex': 'F', 'average_tokens': 168.76321723135348}]

+------------+--------------------+
| person.sex | average_tokens |
+------------+--------------------+
| | 479.80645161290323 |
| M | 153.0463362811891 |
| F | 168.76321723135348 |
+------------+--------------------+
9 changes: 9 additions & 0 deletions test/API/examples/actual/gender_total_speeches_result.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[{'person.sex': '', 'total_speeches': 93}, {'person.sex': 'M', 'total_speeches': 159551}, {'person.sex': 'F', 'total_speeches': 33706}]

+------------+----------------+
| person.sex | total_speeches |
+------------+----------------+
| | 93 |
| M | 159551 |
| F | 33706 |
+------------+----------------+
16 changes: 16 additions & 0 deletions test/API/examples/actual/most_speeches_male_result.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[{'person.person_id': 'VojtechFilip.1955', 'total_speeches': 18487}, {'person.person_id': 'JanBartosek.1971', 'total_speeches': 11528}, {'person.person_id': 'PetrGazdik.1974', 'total_speeches': 10009}, {'person.person_id': 'RadekVondracek.1973', 'total_speeches': 9250}, {'person.person_id': 'TomioOkamura.1972', 'total_speeches': 8501}, {'person.person_id': 'PetrFiala.1964', 'total_speeches': 7871}, {'person.person_id': 'JanHamacek.1978', 'total_speeches': 7792}, {'person.person_id': 'VojtechPikal.1987', 'total_speeches': 7677}, {'person.person_id': 'TomasHanzel.1975', 'total_speeches': 5071}, {'person.person_id': 'ZbynekStanjura.1964', 'total_speeches': 3815}]

+---------------------+----------------+
| person.person_id | total_speeches |
+---------------------+----------------+
| VojtechFilip.1955 | 18487 |
| JanBartosek.1971 | 11528 |
| PetrGazdik.1974 | 10009 |
| RadekVondracek.1973 | 9250 |
| TomioOkamura.1972 | 8501 |
| PetrFiala.1964 | 7871 |
| JanHamacek.1978 | 7792 |
| VojtechPikal.1987 | 7677 |
| TomasHanzel.1975 | 5071 |
| ZbynekStanjura.1964 | 3815 |
+---------------------+----------------+
16 changes: 16 additions & 0 deletions test/API/examples/actual/most_talkative_regulars_result.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[{'persName.forename': 'Adam', 'persName.surname': 'Kalous', 'total_tokens': 15444}, {'persName.forename': 'Adam', 'persName.surname': 'Rykala', 'total_tokens': 3494}, {'persName.forename': 'Adam', 'persName.surname': 'Vojtěch', 'total_tokens': 178391}, {'persName.forename': 'Adolf', 'persName.surname': 'Beznoska', 'total_tokens': 41522}, {'persName.forename': 'Alena', 'persName.surname': 'Gajdůšková', 'total_tokens': 73099}, {'persName.forename': 'Alena', 'persName.surname': 'Nohavová', 'total_tokens': 17614}, {'persName.forename': 'Alena', 'persName.surname': 'Schillerová', 'total_tokens': 395970}, {'persName.forename': 'Aleš', 'persName.surname': 'Dufek', 'total_tokens': 4498}, {'persName.forename': 'Aleš', 'persName.surname': 'Juchelka', 'total_tokens': 129300}, {'persName.forename': 'Alexander', 'persName.surname': 'Černý', 'total_tokens': 20376}]

+-------------------+------------------+--------------+
| persName.forename | persName.surname | total_tokens |
+-------------------+------------------+--------------+
| Adam | Kalous | 15444 |
| Adam | Rykala | 3494 |
| Adam | Vojtěch | 178391 |
| Adolf | Beznoska | 41522 |
| Alena | Gajdůšková | 73099 |
| Alena | Nohavová | 17614 |
| Alena | Schillerová | 395970 |
| Aleš | Dufek | 4498 |
| Aleš | Juchelka | 129300 |
| Alexander | Černý | 20376 |
+-------------------+------------------+--------------+
8 changes: 8 additions & 0 deletions test/API/examples/actual/politician_comparisonCS_result.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[{'person.person_id': 'AdamKalous.1979', 'persName.forename': 'Adam', 'persName.surname': 'Kalous', 'total_speeches': 78}, {'person.person_id': 'AdamRykala.1986', 'persName.forename': 'Adam', 'persName.surname': 'Rykala', 'total_speeches': 29}]

+------------------+-------------------+------------------+----------------+
| person.person_id | persName.forename | persName.surname | total_speeches |
+------------------+-------------------+------------------+----------------+
| AdamKalous.1979 | Adam | Kalous | 78 |
| AdamRykala.1986 | Adam | Rykala | 29 |
+------------------+-------------------+------------------+----------------+
27 changes: 27 additions & 0 deletions test/API/examples/actual/speech_count_parties_result.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[{'organisation.name': 'Poslanecký klub ANO 2011', 'total_speeches': 35787}, {'organisation.name': 'Poslanecký klub České pirátské strany', 'total_speeches': 14820}, {'organisation.name': 'Poslanecký klub České strany sociálně demokratické', 'total_speeches': 32808}, {'organisation.name': 'Poslanecký klub KDU-ČSL', 'total_speeches': 15887}, {'organisation.name': 'Poslanecký klub Komunistické strany Čech a Moravy', 'total_speeches': 27072}, {'organisation.name': 'Poslanecký klub Občanské demokratické strany', 'total_speeches': 26193}, {'organisation.name': 'Poslanecký klub Starostové a nezávislí', 'total_speeches': 4092}, {'organisation.name': 'Poslanecký klub Svoboda a přímá demokracie', 'total_speeches': 9600}, {'organisation.name': 'Poslanecký klub TOP 09', 'total_speeches': 3859}, {'organisation.name': 'Poslanecký klub TOP 09 a Starostové', 'total_speeches': 18965}, {'organisation.name': 'Poslanecký klub Úsvit - Národní Koalice', 'total_speeches': 2756}, {'organisation.name': 'ANO2011', 'total_speeches': 5185}, {'organisation.name': 'Česká pirátská strana', 'total_speeches': 12860}, {'organisation.name': 'Česká strana sociálně demokratická', 'total_speeches': 22732}, {'organisation.name': 'Komunistická strana Čech a Moravy', 'total_speeches': 25301}, {'organisation.name': 'Křesťanská a demokratická unie - Československá strana lidová', 'total_speeches': 14085}, {'organisation.name': 'Občanská demokratická strana', 'total_speeches': 19617}, {'organisation.name': 'Starostove a nezavisli', 'total_speeches': 1422}, {'organisation.name': 'Svoboda a prima demokracie - Tomio Okamura', 'total_speeches': 1088}, {'organisation.name': 'TOP 09', 'total_speeches': 18409}, {'organisation.name': 'Úsvit přímé demokracie Tomia Okamury', 'total_speeches': 2526}]

+---------------------------------------------------------------+----------------+
| organisation.name | total_speeches |
+---------------------------------------------------------------+----------------+
| Poslanecký klub ANO 2011 | 35787 |
| Poslanecký klub České pirátské strany | 14820 |
| Poslanecký klub České strany sociálně demokratické | 32808 |
| Poslanecký klub KDU-ČSL | 15887 |
| Poslanecký klub Komunistické strany Čech a Moravy | 27072 |
| Poslanecký klub Občanské demokratické strany | 26193 |
| Poslanecký klub Starostové a nezávislí | 4092 |
| Poslanecký klub Svoboda a přímá demokracie | 9600 |
| Poslanecký klub TOP 09 | 3859 |
| Poslanecký klub TOP 09 a Starostové | 18965 |
| Poslanecký klub Úsvit - Národní Koalice | 2756 |
| ANO2011 | 5185 |
| Česká pirátská strana | 12860 |
| Česká strana sociálně demokratická | 22732 |
| Komunistická strana Čech a Moravy | 25301 |
| Křesťanská a demokratická unie - Československá strana lidová | 14085 |
| Občanská demokratická strana | 19617 |
| Starostove a nezavisli | 1422 |
| Svoboda a prima demokracie - Tomio Okamura | 1088 |
| TOP 09 | 18409 |
| Úsvit přímé demokracie Tomia Okamury | 2526 |
+---------------------------------------------------------------+----------------+
Loading

0 comments on commit 681897f

Please sign in to comment.