KWT-2024/lab/lab_04-05.ipynb

593 lines
567 KiB
Plaintext
Raw Normal View History

2024-04-13 08:20:53 +02:00
{
"cells": [
{
"cell_type": "markdown",
"id": "going-morocco",
"metadata": {},
"source": [
"![Logo 1](https://git.wmi.amu.edu.pl/AITech/Szablon/raw/branch/master/Logotyp_AITech1.jpg)\n",
"<div class=\"alert alert-block alert-info\">\n",
"<h1> Komputerowe wspomaganie tłumaczenia </h1>\n",
"<h2> 4,5. <i>Klasyfikacja tematyczna (terminologii ciąg dalszy)</i> [laboratoria]</h2> \n",
"<h3>Rafał Jaworski (2021)</h3>\n",
"</div>\n",
"\n",
"![Logo 2](https://git.wmi.amu.edu.pl/AITech/Szablon/raw/branch/master/Logotyp_AITech2.jpg)"
]
},
{
"cell_type": "markdown",
"id": "expanded-entrance",
"metadata": {},
"source": [
"# Komputerowe wspomaganie tłumaczenia"
]
},
{
"cell_type": "markdown",
"id": "atlantic-greenhouse",
"metadata": {},
"source": [
"# Zajęcia 4 i 5 - klasyfikacja tematyczna (terminologii ciąg dalszy)"
]
},
{
"cell_type": "markdown",
"id": "colored-nothing",
"metadata": {},
"source": [
"Na poprzednich zajęciach opracowaliśmy nasz własny ekstraktor terminologii. Mówiliśmy również, jak ważna jest ekstrakcja terminów specjalistycznych. Dziś zajmiemy się zagadnieniem, w jaki sposób wyciągnąć z tekstu terminy, które naprawdę są specjalistyczne."
]
},
{
"cell_type": "markdown",
"id": "economic-pontiac",
"metadata": {},
"source": [
"Dlaczego nasze dotychczasowe rozwiązanie mogło nie spełniać tego warunku? Wykonajmy następujące ćwiczenie:"
]
},
{
"cell_type": "markdown",
"id": "sealed-november",
"metadata": {},
"source": [
"### Ćwiczenie 1: Zgromadź korpus w języku angielskim składający się z co najmniej 100 dokumentów, z których każdy zawiera co najmniej 100 zdań. Wykorzystaj stronę https://opus.nlpl.eu/. Dobrze, aby dokumenty pochodziły z różnych dziedzin (np. prawo Unii Europejskiej, manuale programistyczne, medycyna). Ściągnięty korpus zapisz na swoim dysku lokalnym, nie załączaj go do niniejszego notatnika."
]
},
{
"cell_type": "markdown",
"id": "closed-steel",
"metadata": {},
"source": [
"Taki korpus pozwoli nam zaobserwować, co się stanie, jeśli do ekstrakcji terminologii będziemy stosowali wyłącznie kryterium częstościowe. Aby wykonać odpowiedni eksperyment musimy uruchomić ekstraktor z poprzednich zajęć."
]
},
{
"cell_type": "markdown",
"id": "environmental-thread",
"metadata": {},
"source": [
2024-04-23 19:49:47 +02:00
"import nltk\n",
"nltk.download('punkt') # Pobierz tokenizator zdania, jeśli jeszcze go nie masz\n",
"\n",
"def podziel_na_zdania(nazwa_pliku):\n",
" with open(nazwa_pliku, 'r') as plik:\n",
" tekst = plik.read()\n",
" zdania = nltk.sent_tokenize(tekst)\n",
" return zdania\n",
"\n",
"nazwa_pliku = 'tekst.txt' # Zmień na nazwę swojego pliku\n",
"zdania = podziel_na_zdania(nazwa_pliku)\n",
"\n",
"for zdanie in zdania:\n",
" print(zdanie)### Ćwiczenie 2: Uruchom ekstraktor terminologii (wykrywacz rzeczowników) z poprzednich zajęć na każdym dokumencie z osobna. Jako wynik ekstraktora w każdym przypadku wypisz 5 najczęściej występujących rzeczowników. Wyniki działania komendy umieść w notatniku."
2024-04-13 08:20:53 +02:00
]
},
2024-04-23 19:49:47 +02:00
{
"cell_type": "code",
"execution_count": null,
"id": "79fd91c4-c22e-43a0-9842-83a33bd65fa9",
"metadata": {},
"outputs": [],
"source": []
},
2024-04-13 08:20:53 +02:00
{
"cell_type": "code",
2024-04-21 12:34:30 +02:00
"execution_count": 17,
2024-04-13 08:20:53 +02:00
"id": "honest-assessment",
"metadata": {},
"outputs": [],
2024-04-21 12:34:30 +02:00
"source": [
"from collections import Counter\n",
"import spacy\n",
"import pprint\n",
"\n",
"def extract_terms(path,returnTop5=True):\n",
" f = open(path)\n",
" text = f.read()\n",
" f.close()\n",
" nlp = spacy.load(\"en_core_web_sm\")\n",
" doc = nlp(text)\n",
" nouns = [token.lemma_ for token in doc if token.pos_ == \"NOUN\"]\n",
" nouns_counts = Counter(nouns)\n",
" if returnTop5:\n",
" top_5 = nouns_counts.most_common(5)\n",
" answer = {word: count for word, count in top_5}\n",
" else:\n",
" answer = nouns_counts\n",
" \n",
" \n",
" return answer"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "1e624495-7b93-4644-9cae-a7851c1a96cc",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'day': 84, 'man': 215, 'moor': 148, 'night': 89, 'time': 89}\n"
]
}
],
"source": [
"books = extract_terms(\"./books/Books.en-pl.en\")\n",
"pprint.pprint(books)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "03c2114b-2a8f-43f4-81ab-ea51ff8c7d5a",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'food': 189, 'fruit': 174, 'product': 325, 'production': 154, 'quality': 146}\n"
]
}
],
"source": [
"food = extract_terms(\"./food/ELRC-479-Polish_Food_2.en-pl.en\")\n",
"pprint.pprint(food)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "6010d52a-d234-42f5-893f-567f44103ccc",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'benefit': 272, 'employer': 270, 'eures': 305, 'period': 229, 'person': 328}\n"
]
}
],
"source": [
"employment = extract_terms(\"./emplo/ELRC-888-Employment_Services_.en-pl.en\")\n",
"pprint.pprint(employment)"
]
},
{
"cell_type": "markdown",
"id": "6d1370a3-8ad8-4559-b8bc-c2959ebb82ef",
"metadata": {},
"source": [
"```python\n",
"books = {'day': 84, 'man': 215, 'moor': 148, 'night': 89, 'time': 89}\n",
"food = {'food': 189, 'fruit': 174, 'product': 325, 'production': 154, 'quality': 146}\n",
"employment = {'benefit': 272, 'employer': 270, 'eures': 305, 'period': 229, 'person': 328}\n",
"```"
]
2024-04-13 08:20:53 +02:00
},
{
"cell_type": "markdown",
"id": "desirable-appeal",
"metadata": {},
"source": [
"Czy wyniki uzyskane w ten sposób to zawsze terminy specjalistyczne? Niestety może zdarzyć się, że w wynikach pojawią się rzeczowniki, które są po prostu częste w języku, a niekoniecznie charakterystyczne dla przetwarzanych przez nas tekstów. Aby wyniki ekstrakcji były lepsze, konieczne jest zastosowanie bardziej wyrafinowanych metod."
]
},
{
"cell_type": "markdown",
"id": "accomplished-interview",
"metadata": {},
"source": [
"Jedną z tych metod jest znana z dyscypliny Information Retrieval technika zwana TF-IDF. Jej nazwa wywodzi się od **T**erm **F**requency **I**nverted **D**ocument **F**requency. Według tej metody, dla każdego odnalezionego przez nas termu powinniśmy obliczyć czynnik TF-IDF, a następnie wyniki posortować malejąco po wartości tego czynnika."
]
},
{
"cell_type": "markdown",
"id": "green-september",
"metadata": {},
"source": [
"Jak obliczyć czynnik TF-IDF? Czym jest TF, a czym jest IDF?"
]
},
{
"cell_type": "markdown",
"id": "several-gardening",
"metadata": {},
"source": [
"Zacznijmy od TF, bo ten czynnik już znamy. Jest to nic innego jak częstość wystąpienia terminu w tekście, który przetwarzamy. Idea TF-IDF skupia się na drugim czynniku - IDF. Słowo *inverted* oznacza, że czynnik ten będzie odwrócony, czyli trafi do mianownika. W związku z tym TF-IDF to w istocie:\n",
"$\\frac{TF}{DF}$"
]
},
{
"cell_type": "markdown",
"id": "collect-brooklyn",
"metadata": {},
"source": [
"Czym zatem jest document frequency? Jest to liczba dokumentów, w których wystąpił dany termin. Dokumenty w tym przypadku są rozumiane jako jednostki, na które podzielony jest korpus, nad którym pracujemy (dokładnie taki, jak korpus z ćwiczenia pierwszego)."
]
},
{
"cell_type": "markdown",
"id": "urban-spray",
"metadata": {},
"source": [
"Zastanówmy się nad sensem tego czynnika. Pamiętajmy, że naszym zadaniem jest ekstracja terminów z tylko jednego dokumentu na raz. Mamy jednak do dyspozycji wiele innych dokumentów, zawierających wiele innych słów i termów. Wartość TF-IDF jest tym większa, im częściej termin występuje w dokumencie, na którym dokonujemy ekstrakcji. Czynnik ten jednak zmniejsza się, jeśli słowo występuje w wielu różnych dokumentach. Zatem, popularne słowa będą miały wysoki czynnik DF i niski TF-IDF. Natomiast najwyższą wartość TF-IDF będą miały terminy, które są częste w przetwarzanym przez nas dokumencie, ale nie występują nigdzie indziej."
]
},
{
"cell_type": "markdown",
"id": "worse-throat",
"metadata": {},
"source": [
"### Ćwiczenie 3: Zaimplementuj czynnik TF-IDF i dokonaj ekstrakcji terminologii za jego pomocą, używając korpusu z ćwiczenia nr 1. Czy wyniki różnią się od tych uzyskanych tylko za pomocą TF?"
]
},
{
"cell_type": "code",
2024-04-21 12:34:30 +02:00
"execution_count": 56,
"id": "b87015d0-6121-41dc-897b-76570fa5154b",
2024-04-13 08:20:53 +02:00
"metadata": {},
"outputs": [],
"source": [
2024-04-21 12:51:11 +02:00
"books = extract_terms(\"./books/Books.en-pl.en\",False)\n",
"food = extract_terms(\"./food/ELRC-479-Polish_Food_2.en-pl.en\",False)\n",
"employment = extract_terms(\"./emplo/ELRC-888-Employment_Services_.en-pl.en\",False)"
2024-04-21 12:34:30 +02:00
]
},
{
"cell_type": "code",
"execution_count": 95,
"id": "published-speaking",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[('moor', 148.0),\n",
" ('hound', 62.0),\n",
" ('sir', 61.0),\n",
" ('baronet', 48.0),\n",
" ('window', 45.0)]\n"
]
}
],
"source": [
"def get_idf(SETS):\n",
" idf = {}\n",
" for SET in SETS:\n",
" for word,count in SET.items():\n",
" idf[word] = idf.get(word, 0) + 1\n",
" return idf\n",
"\n",
"def tfidf_extract(SET):\n",
" idf = get_idf([books,food,employment])\n",
" for word,count in SET.items():\n",
" if word in idf:\n",
" SET[word] = count/idf.get(word)\n",
" most = SET.most_common(5)\n",
" return most\n",
"\n",
"pprint.pprint(tfidf_extract(books))"
]
},
{
"cell_type": "code",
"execution_count": 96,
"id": "6776d9cd-0e1b-4868-8974-63ce2b1de75f",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[('product', 325.0),\n",
" ('apple', 127.0),\n",
" ('vegetable', 99.0),\n",
" ('honey', 92.0),\n",
" ('cheese', 71.0)]\n"
]
}
],
"source": [
"pprint.pprint(tfidf_extract(food))"
]
},
{
"cell_type": "code",
"execution_count": 97,
"id": "61c0131e-c01e-4ad5-b500-6ada77b25128",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[('eures', 305.0),\n",
" ('worker', 228.0),\n",
" ('insurance', 150.0),\n",
" ('benefit', 136.0),\n",
" ('employer', 135.0)]\n"
]
}
],
"source": [
"pprint.pprint(tfidf_extract(employment))"
]
},
{
"cell_type": "markdown",
"id": "411ab1c5-30bd-4c25-8514-27bbaf32e494",
"metadata": {},
"source": [
"```python\n",
"books = {'day': 84, 'man': 215, 'moor': 148, 'night': 89, 'time': 89}\n",
"vs = [('moor', 148.0),('hound', 62.0),('sir', 61.0),('baronet', 48.0),('window', 45.0)]\n",
"\n",
"food = {'food': 189, 'fruit': 174, 'product': 325, 'production': 154, 'quality': 146}\n",
"vs = [('product', 325.0),('apple', 127.0),('vegetable', 99.0),('honey', 92.0),('cheese', 71.0)]\n",
"\n",
"employment = {'benefit': 272, 'employer': 270, 'eures': 305, 'period': 229, 'person': 328}\n",
"vs = [('eures', 305.0),('worker', 228.0),('insurance', 150.0),('benefit', 136.0),('employer', 135.0)]\n",
"```"
2024-04-13 08:20:53 +02:00
]
},
{
"cell_type": "markdown",
"id": "handmade-square",
"metadata": {},
"source": [
"Teraz potrafimy już w lepszy sposób wyciągać terminy z dokumentów. Spróbujmy jeszcze czegoś widowiskowego - wygenerujmy tzw. chmurę słów z tekstu przy użyciu biblioteki WordCloud dla artykułu z BBC News (https://www.bbc.com/news/world-europe-56530714):"
]
},
{
"cell_type": "markdown",
"id": "solar-particular",
"metadata": {},
"source": [
2024-04-21 12:34:30 +02:00
"sudo pip install wordcloud"
2024-04-13 08:20:53 +02:00
]
},
2024-04-21 12:34:30 +02:00
{
"cell_type": "code",
"execution_count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L502yunpVrUIMeM6ISdlzUNXpccqGXgkhyVq3r1hxfmvfgXlCMlNx6tCBZZaKpo9ImvD0UoQQKJFElgYh/1xqIxUsWRMHpRBAtOvZ+R2KIYShfhP3w9U8p39LxI4e1TG69ufpvAE+PDYqwSYfclUnIzc0OQFeYX4qoF/ZNLMH8re3t3cMDEp5dPjB/897+zhmtggfsaaqrI1VeXnDCtAMpR+Wko68IM6MuRKnKTIJQUjL1y90k/GEYPh4vZ5+2jnuXnD56QFhPUNxeNe2bejrEs7OSmVsE+SyCCq2qzmvW2NmXIV4DSpcmdrXVRUWtj6eWyl2VUfNssf5dvbfv+YmMcV/Hy3z7Sp8SIAKkEhiGtMP0xLeG8c/zmX1wBp5fHZdrXeMSb2KRjFIOO2NV89PeljCbe7xl4CS2ez7W1smp+TbXI61SJRs9EYI5ZY3S5og8Avze/WY6kGtdZ1/vXDXkyf1Ze3YJKFx+fGpcWMmpF/7m3zNYm9PgZti37lq7/DwFtb0mS3OsHh0ydX4aRYAfi17V1wIJjB0pNSA28Pvd6qo/W/f7r1xK4KbavB4/bI1dLYZNXI6fnzL52SkB5DpwwLG7XmB5e9WneyKasw5fmf7y1QZ4YlO1NIvbV7yAap0QdPPqfXkw2lDCutCBn
"text/plain": [
"<PIL.Image.Image image mode=RGB size=400x200>"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
2024-04-13 08:20:53 +02:00
}
],
"source": [
"from wordcloud import WordCloud\n",
2024-04-21 12:34:30 +02:00
"\n",
2024-04-13 08:20:53 +02:00
"text = \"\"\"\"This is where it happened,\" says Felipe Luis Codesal, opening the gate to a three-hectare field on his farm in Zamora, north-west Spain.\n",
"\n",
"One night last November, a pack of wolves got through the fence surrounding the field and attacked Mr Codesal's sheep, many of which were pregnant. When he arrived the next morning, he found 11 animals had been killed. Over the following days, he says, another 36 sheep died from injuries sustained in that attack and miscarriages it triggered.\n",
"\n",
"Mr Codesal fears that such attacks will become even more commonplace if a proposed change to laws protecting the Iberian wolf comes into force.\n",
"\n",
"The leftist coalition government plans to prevent the Iberian wolf from being hunted anywhere by categorising it as an endangered species. The reform is yet to be implemented and could see changes.\n",
"\n",
"Iberian wolves from the Iberian Wolf Centre in Robledo de Sanabria on February 21, 2020 in Zamora, Spain\n",
"image captionSpain has Europe's biggest wolf population: These Iberian wolves are kept at Zamora's Iberian wolf centre\n",
"\"It's like in a nightclub when there's a fire,\" says Mr Codesal of the wolf attack. \"There's a stampede and people get trodden on and hurt. This is the same.\"\n",
"\n",
"He was not entitled to any compensation and estimates that the financial losses he suffered from this incident totalled around €12-14,000\n",
"\n",
"\"It's not even about the money,\" he says. \"It's emotional, because the animals are part of my family.\"\n",
"\n",
"A 'historic' change?\n",
"The region of Castilla y León is the habitat for most of Spain's wolves. Figures gathered by the local government showed that they killed 3,774 sheep and cows in the region in 2019.\n",
"\n",
"Felipe Luis Codesal's farm is just north of the Duero river, which marks a natural border between north-west Spain and the rest of the country. Until now, it has been legal to hunt wolves north of the Duero, under a strict quota system, because that is where they are most prevalent.\n",
"\n",
"South of the river they have been protected.\n",
"\n",
"Conservationist groups have welcomed the government plan. When it was unveiled in February, the Ecologistas en Acción organisation hailed it as a \"historic day\".\n",
"\n",
"But Mr Codesal, who is a member of the UPA association of smallholder farmers, warns the reform will ruin livestock owners by allowing the wolf population to spiral out of control and roam uncontrolled. The UPA is unconvinced by measures included in the plan to subsidise the installation of fences and the use of guard dogs in livestock farming areas.\n",
"\n",
"Biggest wolf numbers in Europe\n",
"The Iberian wolf was close to being wiped out in the middle of the 20th Century. But it enjoyed a resurgence on the back of new hunting regulations introduced in the 1970s and the migration of Spaniards away from rural areas also encouraged its spread down from the north-western corner of the country.\n",
"\n",
"In recent years, wolves have moved into areas such as the Guadarrama mountains north of Madrid and near the city of Ávila, to the west of the capital.\n",
"\n",
"There are now some 2,500 Iberian wolves: around 2,000 are in Spain - the largest wolf population in western Europe - and the rest in Portugal.\n",
"\"\"\"\n",
"\n",
"wordcloud = WordCloud(background_color=\"white\", max_words=5000, contour_width=3, contour_color='steelblue')\n",
"wordcloud.generate(text)\n",
"wordcloud.to_image()"
]
},
{
"cell_type": "markdown",
"id": "third-eagle",
"metadata": {},
"source": [
"### Ćwiczenie 4: Wykonaj chmurę słów dla całego korpusu z ćwiczenia nr 1."
]
},
{
"cell_type": "code",
2024-04-21 12:51:11 +02:00
"execution_count": 19,
2024-04-13 08:20:53 +02:00
"id": "electrical-disposition",
"metadata": {},
"outputs": [],
"source": [
2024-04-21 12:34:30 +02:00
"from wordcloud import WordCloud\n",
"from collections import Counter\n",
"import spacy\n",
"def my_word_cloud(path):\n",
" \n",
2024-04-21 12:51:11 +02:00
" f = open(path,'r', encoding='utf-8')\n",
2024-04-21 12:34:30 +02:00
" text = f.read()\n",
" f.close()\n",
" nlp = spacy.load(\"en_core_web_sm\")\n",
" doc = nlp(text)\n",
" tally = {}\n",
" nouns = [token.lemma_ for token in doc if token.pos_ == \"NOUN\"]\n",
" nouns_counts = Counter(nouns)\n",
" \n",
" top_4000 = nouns_counts.most_common(4000)\n",
" \n",
" tally = {word: count for word, count in top_4000}\n",
" \n",
2024-04-21 12:51:11 +02:00
" wordcloud = WordCloud(background_color=\"white\", max_words=4000, contour_width=3, contour_color='steelblue')\n",
2024-04-21 12:34:30 +02:00
" wordcloud.generate_from_frequencies(tally)\n",
2024-04-21 12:51:11 +02:00
" return wordcloud"
2024-04-21 12:34:30 +02:00
]
},
{
"cell_type": "code",
2024-04-21 12:51:11 +02:00
"execution_count": 18,
2024-04-21 12:34:30 +02:00
"id": "3ba1ab71-4c87-48d2-b554-9b0723b18c20",
"metadata": {},
"outputs": [
{
2024-04-21 12:51:11 +02:00
"data": {
"image/jpeg": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIy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WgyjKyc1LKyojo2jf6Yp3ccKaltxMP0zK+HbYUWLy+b6u8s+WrTog/3X5jxnx/xzfdysPlm82IjI7XCWjUu/NlfjwIPD9Sup9dRrTCQsNu1sevfKz0poaGCHe3w+/O1hI3RI368Go8ZKArYGB0Z6CDRoa1KZI3FskY9GzKILLW08vV9pykWfOi+unthmFvvgHr5qLD14yPv374XE1tssXDKbD17jR7EMNLL5cNVcx2shYR4ZVR4XEHpIzsOaFQQ5zMN08KYqIKzDA8Akc8GfB1sN4wfMTvcH1E/7FoKAwV6Kavwj5jEqzlF2migaB799eBvW1Zpi+HQxkjH/ws7nJhemltYDQdWXlFNYWkdn8dBcMPMicH0bmuDqSFhUW3jy7tPsjUPbhTi7CYHeQ/zcHK1sWY
"text/plain": [
"<PIL.Image.Image image mode=RGB size=400x200>"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
2024-04-21 12:34:30 +02:00
}
],
"source": [
2024-04-21 12:51:11 +02:00
"img = my_word_cloud(\"./books/Books.en-pl.en\")\n",
"img.to_image() "
2024-04-21 12:34:30 +02:00
]
},
{
"cell_type": "code",
2024-04-21 12:51:11 +02:00
"execution_count": 21,
2024-04-21 12:34:30 +02:00
"id": "aa899917-3f98-4912-9954-9bbfe4879081",
"metadata": {},
"outputs": [
{
2024-04-21 12:51:11 +02:00
"data": {
"image/jpeg": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCADIAZADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFD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Y2sda4HyPNGOlECu9wW2oMeyGXIToJpVegm9ZhYgBI0TRZWr6v+/W1kf+EwPqxfqPD3duTzw2f8nbZF5BfrbaODEWyV4bngVy08dMqQ6fZ6TjZ3vDGmX3gsGPJ7XGyoEaTfsWWL7psFiGXd/ryBwlnjJJeOrX756qzyNKIpSsShj00YhqVW2fUrdz61ZmOpgiJ4u8jp10Sl0FKwQCS+dwbT86foRAJ/7N1j5DH/cfc6bPSkh7/ddvW4rLEYPULS+elhPR+TR0m88/5hbvKKktbO0x2u0woyAgLWTVm5Nz
"text/plain": [
"<PIL.Image.Image image mode=RGB size=400x200>"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
2024-04-21 12:34:30 +02:00
}
],
"source": [
2024-04-21 12:51:11 +02:00
"img = my_word_cloud(\"./food/ELRC-479-Polish_Food_2.en-pl.en\")\n",
"img.to_image()"
2024-04-21 12:34:30 +02:00
]
},
{
"cell_type": "code",
2024-04-21 12:51:11 +02:00
"execution_count": 22,
2024-04-21 12:34:30 +02:00
"id": "38d1be90-0eb9-4e10-9309-3dc82f5ff9e8",
"metadata": {},
"outputs": [
{
2024-04-21 12:51:11 +02:00
"data": {
"image/jpeg": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCADIAZADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1d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wuraWts7YqN8IkK9cwrbnBzEdU1dkaEeASJ3Eoqmp0dhXgeTl8qtRfxRiUG2lr8d645a6aWmVkNkfrPfy2VyVQnThTQK8A
"text/plain": [
"<PIL.Image.Image image mode=RGB size=400x200>"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
2024-04-21 12:34:30 +02:00
}
],
"source": [
2024-04-21 12:51:11 +02:00
"img = my_word_cloud(\"./emplo/ELRC-888-Employment_Services_.en-pl.en\")\n",
"img.to_image()"
2024-04-13 08:20:53 +02:00
]
},
{
"cell_type": "markdown",
"id": "objective-possession",
"metadata": {},
"source": [
"Zastanówmy się nad jeszcze jednym zagadnieniem - jak pogrupować te terminy ze względu na dziedzinę? Zagadnienie to nosi nazwę klasyfikacji tematycznej. A dzięki pewnemu XIX-wiecznemu niemieckiemu matematykowi możliwe jest przeprowadzenie tego procesu automatycznie. Matematyk ten nosił nazwisko Peter Gustav Lejeune Dirichlet, a metoda klasyfikacji nazywa się LDA (**L**atent **D**irichlet **A**llocation)."
]
},
{
"cell_type": "markdown",
"id": "intellectual-gothic",
"metadata": {},
"source": [
"### Ćwiczenie 5: Wykonaj tutorial dostępny pod https://towardsdatascience.com/end-to-end-topic-modeling-in-python-latent-dirichlet-allocation-lda-35ce4ed6b3e0. Wklej do notatnika wyniki."
]
}
],
"metadata": {
"author": "Rafał Jaworski",
"email": "rjawor@amu.edu.pl",
"kernelspec": {
2024-04-21 12:34:30 +02:00
"display_name": "Python 3 (ipykernel)",
2024-04-13 08:20:53 +02:00
"language": "python",
"name": "python3"
},
"lang": "pl",
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
2024-04-23 19:49:47 +02:00
"version": "3.9.2"
2024-04-13 08:20:53 +02:00
},
"subtitle": "4,5. Klasyfikacja tematyczna (terminologii ciąg dalszy)",
"title": "Komputerowe wspomaganie tłumaczenia",
"year": "2021"
},
"nbformat": 4,
"nbformat_minor": 5
}