From 0d2647621493b35241576d1042fc674e15a9dcad Mon Sep 17 00:00:00 2001 From: "localizeflow[bot]" Date: Sat, 28 Feb 2026 09:09:20 +0000 Subject: [PATCH] chore(i18n): sync translations with latest source changes (chunk 1/1, 9 changes) --- translations/da/.co-op-translator.json | 10 +- translations/da/README.md | 217 ++-- .../lessons/2-Symbolic/MSConceptGraph.ipynb | 1065 ++++++++--------- translations/sv/.co-op-translator.json | 10 +- translations/sv/README.md | 227 ++-- .../lessons/2-Symbolic/MSConceptGraph.ipynb | 1065 ++++++++--------- translations/th/.co-op-translator.json | 10 +- translations/th/README.md | 268 +++-- .../lessons/2-Symbolic/MSConceptGraph.ipynb | 1065 ++++++++--------- 9 files changed, 1978 insertions(+), 1959 deletions(-) diff --git a/translations/da/.co-op-translator.json b/translations/da/.co-op-translator.json index 80ab37a2..998f267f 100644 --- a/translations/da/.co-op-translator.json +++ b/translations/da/.co-op-translator.json @@ -6,8 +6,8 @@ "language_code": "da" }, "README.md": { - "original_hash": "75fe3383afc51eaa84b82ace619ffea7", - "translation_date": "2026-02-06T08:24:01+00:00", + "original_hash": "9eaca839b0b3f6d7f0a195fd33cebd30", + "translation_date": "2026-02-28T09:09:11+00:00", "source_file": "README.md", "language_code": "da" }, @@ -89,6 +89,12 @@ "source_file": "lessons/1-Intro/assignment.md", "language_code": "da" }, + "lessons/2-Symbolic/MSConceptGraph.ipynb": { + "original_hash": "e5690bbc6e5119a96a8172ec7261db67", + "translation_date": "2026-02-28T09:04:12+00:00", + "source_file": "lessons/2-Symbolic/MSConceptGraph.ipynb", + "language_code": "da" + }, "lessons/2-Symbolic/README.md": { "original_hash": "f9f06b266b8b2bfc6b8792ff2bb1bea4", "translation_date": "2026-01-16T02:28:23+00:00", diff --git a/translations/da/README.md b/translations/da/README.md index 6a897466..46ee34af 100644 --- a/translations/da/README.md +++ b/translations/da/README.md @@ -12,16 +12,16 @@ [![Microsoft Foundry Discord](https://dcbadge.limes.pink/api/server/nTYy5BXMWG)](https://discord.gg/nTYy5BXMWG) -# Kunstig intelligens for begyndere - Et pensum +# Kunstig Intelligens for Begyndere - Et Curriculum -|![Sketchnote af @girlie_mac https://twitter.com/girlie_mac](https://github.com/microsoft/AI-For-Beginners/raw/main/lessons/sketchnotes/ai-overview.png)| +|![Sketchnote by @girlie_mac https://twitter.com/girlie_mac](https://github.com/microsoft/AI-For-Beginners/raw/main/lessons/sketchnotes/ai-overview.png)| |:---:| | AI For Beginners - _Sketchnote af [@girlie_mac](https://twitter.com/girlie_mac)_ | -Udforsk verden af **kunstig intelligens** (AI) med vores 12-ugers, 24-lektioners pensum! Det inkluderer praktiske lektioner, quizzer og laboratorieøvelser. Pensum er begynder-venligt og dækker værktøjer som TensorFlow og PyTorch samt etik i AI. +Udforsk verdenen af **kunstig intelligens** (AI) med vores 12-ugers, 24-lektioners curriculum! Det inkluderer praktiske lektioner, quizzer og laboratorier. Curriculumet er begynder-venligt og dækker værktøjer som TensorFlow og PyTorch, samt etik i AI. -### 🌐 Multisprogunderstøttelse +### 🌐 Support for flere sprog #### Understøttet via GitHub Action (Automatiseret & Altid Opdateret) @@ -29,67 +29,77 @@ Udforsk verden af **kunstig intelligens** (AI) med vores 12-ugers, 24-lektioners [Arabic](../ar/README.md) | [Bengali](../bn/README.md) | [Bulgarian](../bg/README.md) | [Burmese (Myanmar)](../my/README.md) | [Chinese (Simplified)](../zh-CN/README.md) | [Chinese (Traditional, Hong Kong)](../zh-HK/README.md) | [Chinese (Traditional, Macau)](../zh-MO/README.md) | [Chinese (Traditional, Taiwan)](../zh-TW/README.md) | [Croatian](../hr/README.md) | [Czech](../cs/README.md) | [Danish](./README.md) | [Dutch](../nl/README.md) | [Estonian](../et/README.md) | [Finnish](../fi/README.md) | [French](../fr/README.md) | [German](../de/README.md) | [Greek](../el/README.md) | [Hebrew](../he/README.md) | [Hindi](../hi/README.md) | [Hungarian](../hu/README.md) | [Indonesian](../id/README.md) | [Italian](../it/README.md) | [Japanese](../ja/README.md) | [Kannada](../kn/README.md) | [Korean](../ko/README.md) | [Lithuanian](../lt/README.md) | [Malay](../ms/README.md) | [Malayalam](../ml/README.md) | [Marathi](../mr/README.md) | [Nepali](../ne/README.md) | [Nigerian Pidgin](../pcm/README.md) | [Norwegian](../no/README.md) | [Persian (Farsi)](../fa/README.md) | [Polish](../pl/README.md) | [Portuguese (Brazil)](../pt-BR/README.md) | [Portuguese (Portugal)](../pt-PT/README.md) | [Punjabi (Gurmukhi)](../pa/README.md) | [Romanian](../ro/README.md) | [Russian](../ru/README.md) | [Serbian (Cyrillic)](../sr/README.md) | [Slovak](../sk/README.md) | [Slovenian](../sl/README.md) | [Spanish](../es/README.md) | [Swahili](../sw/README.md) | [Swedish](../sv/README.md) | [Tagalog (Filipino)](../tl/README.md) | [Tamil](../ta/README.md) | [Telugu](../te/README.md) | [Thai](../th/README.md) | [Turkish](../tr/README.md) | [Ukrainian](../uk/README.md) | [Urdu](../ur/README.md) | [Vietnamese](../vi/README.md) > **Foretrækker du at klone lokalt?** - -> Dette repository inkluderer over 50 sprogoversættelser, hvilket væsentligt øger downloadstørrelsen. For at klone uden oversættelser, brug sparse checkout: +> +> Dette repository inkluderer 50+ sprogoversættelser, hvilket væsentligt øger downloadstørrelsen. For at klone uden oversættelser, brug sparse checkout: +> +> **Bash / macOS / Linux:** > ```bash > git clone --filter=blob:none --sparse https://github.com/microsoft/AI-For-Beginners.git > cd AI-For-Beginners > git sparse-checkout set --no-cone '/*' '!translations' '!translated_images' > ``` -> Dette giver dig alt, hvad du behøver for at gennemføre kurset med en meget hurtigere download. +> +> **CMD (Windows):** +> ```cmd +> git clone --filter=blob:none --sparse https://github.com/microsoft/AI-For-Beginners.git +> cd AI-For-Beginners +> git sparse-checkout set --no-cone "/*" "!translations" "!translated_images" +> ``` +> +> Dette giver dig alt hvad du behøver for at gennemføre kurset med en meget hurtigere download. -**Hvis du ønsker yderligere oversættelser, findes understøttede sprog [her](https://github.com/Azure/co-op-translator/blob/main/getting_started/supported-languages.md)** +**Hvis du ønsker at få flere oversættelsessprog understøttet, er de listet [her](https://github.com/Azure/co-op-translator/blob/main/getting_started/supported-languages.md)** ## Deltag i fællesskabet [![Microsoft Foundry Discord](https://dcbadge.limes.pink/api/server/nTYy5BXMWG)](https://discord.gg/nTYy5BXMWG) ## Hvad du vil lære -**[Kursusets tankekort](http://soshnikov.com/courses/ai-for-beginners/mindmap.html)** +**[Mindmap over kurset](http://soshnikov.com/courses/ai-for-beginners/mindmap.html)** -I dette pensum vil du lære: +I dette curriculum vil du lære: -* Forskellige tilgange til kunstig intelligens, herunder den "gode gamle" symbolske tilgang med **vidensrepræsentation** og ræsonnering ([GOFAI](https://en.wikipedia.org/wiki/Symbolic_artificial_intelligence)). -* **Neurale netværk** og **dyb læring**, som er kernen i moderne AI. Vi vil illustrere koncepterne bag disse vigtige emner med kode i to af de mest populære frameworks - [TensorFlow](http://Tensorflow.org) og [PyTorch](http://pytorch.org). -* **Neurale arkitekturer** til arbejde med billeder og tekst. Vi vil dække nyere modeller, men det kan være lidt mangelfuldt ift. state-of-the-art. -* Mindre populære AI-tilgange, såsom **genetiske algoritmer** og **multi-agent systemer**. +* Forskellige tilgange til kunstig intelligens, inklusiv den "gode gamle" symbolske tilgang med **vidensrepræsentation** og ræsonnering ([GOFAI](https://en.wikipedia.org/wiki/Symbolic_artificial_intelligence)). +* **Neurale netværk** og **dyb læring**, som er kernen i moderne AI. Vi vil illustrere koncepterne bag disse vigtige emner ved hjælp af kode i to af de mest populære frameworks - [TensorFlow](http://Tensorflow.org) og [PyTorch](http://pytorch.org). +* **Neurale arkitekturer** til arbejde med billeder og tekst. Vi vil gennemgå nyere modeller, men kan mangle lidt af state-of-the-art. +* Mindre populære AI-tilgange såsom **genetiske algoritmer** og **multi-agent systemer**. -Hvad vi ikke vil dække i dette pensum: +Hvad vi ikke vil dække i dette curriculum: -> [Find alle yderligere ressourcer til dette kursus i vores Microsoft Learn-samling](https://learn.microsoft.com/en-us/collections/7w28iy2xrqzdj0?WT.mc_id=academic-77998-bethanycheum) +> [Find alle yderligere ressourcer til dette kursus i vores Microsoft Learn samling](https://learn.microsoft.com/en-us/collections/7w28iy2xrqzdj0?WT.mc_id=academic-77998-bethanycheum) -* Forretningssager for brug af **AI i erhvervslivet**. Overvej at tage [Introduktion til AI for erhvervsbrugere](https://docs.microsoft.com/learn/paths/introduction-ai-for-business-users/?WT.mc_id=academic-77998-bethanycheum) læringssti på Microsoft Learn eller [AI Business School](https://www.microsoft.com/ai/ai-business-school/?WT.mc_id=academic-77998-bethanycheum), udviklet i samarbejde med [INSEAD](https://www.insead.edu/). +* Forretningsanvendelser af **AI i erhvervslivet**. Overvej at tage [Introduktion til AI for forretningsbrugere](https://docs.microsoft.com/learn/paths/introduction-ai-for-business-users/?WT.mc_id=academic-77998-bethanycheum) læringssti på Microsoft Learn eller [AI Business School](https://www.microsoft.com/ai/ai-business-school/?WT.mc_id=academic-77998-bethanycheum), udviklet i samarbejde med [INSEAD](https://www.insead.edu/). * **Klassisk maskinlæring**, som er godt beskrevet i vores [Machine Learning for Beginners Curriculum](http://github.com/Microsoft/ML-for-Beginners). -* Praktiske AI-applikationer bygget ved hjælp af **[Cognitive Services](https://azure.microsoft.com/services/cognitive-services/?WT.mc_id=academic-77998-bethanycheum)**. Til dette anbefaler vi at starte med Microsoft Learn moduler for [vision](https://docs.microsoft.com/learn/paths/create-computer-vision-solutions-azure-cognitive-services/?WT.mc_id=academic-77998-bethanycheum), [naturlig sprogbehandling](https://docs.microsoft.com/learn/paths/explore-natural-language-processing/?WT.mc_id=academic-77998-bethanycheum), **[Generativ AI med Azure OpenAI Service](https://learn.microsoft.com/en-us/training/paths/develop-ai-solutions-azure-openai/?WT.mc_id=academic-77998-bethanycheum)** og andre. -* Specifikke ML **Cloud Frameworks**, såsom [Azure Machine Learning](https://azure.microsoft.com/services/machine-learning/?WT.mc_id=academic-77998-bethanycheum), [Microsoft Fabric](https://learn.microsoft.com/en-us/training/paths/get-started-fabric/?WT.mc_id=academic-77998-bethanycheum), eller [Azure Databricks](https://docs.microsoft.com/learn/paths/data-engineer-azure-databricks?WT.mc_id=academic-77998-bethanycheum). Overvej at bruge [Build and operate machine learning solutions with Azure Machine Learning](https://docs.microsoft.com/learn/paths/build-ai-solutions-with-azure-ml-service/?WT.mc_id=academic-77998-bethanycheum) og [Build and Operate Machine Learning Solutions with Azure Databricks](https://docs.microsoft.com/learn/paths/build-operate-machine-learning-solutions-azure-databricks/?WT.mc_id=academic-77998-bethanycheum) læringsstier. -* **Konversationel AI** og **chatbots**. Der findes en separat [Create conversational AI solutions](https://docs.microsoft.com/learn/paths/create-conversational-ai-solutions/?WT.mc_id=academic-77998-bethanycheum) læringssti, og du kan også henvise til [dette blogindlæg](https://soshnikov.com/azure/hello-bot-conversational-ai-on-microsoft-platform/) for mere detaljeret information. +* Praktiske AI-applikationer bygget ved hjælp af **[Cognitive Services](https://azure.microsoft.com/services/cognitive-services/?WT.mc_id=academic-77998-bethanycheum)**. Til dette anbefaler vi, at du starter med moduler på Microsoft Learn for [vision](https://docs.microsoft.com/learn/paths/create-computer-vision-solutions-azure-cognitive-services/?WT.mc_id=academic-77998-bethanycheum), [natural language processing](https://docs.microsoft.com/learn/paths/explore-natural-language-processing/?WT.mc_id=academic-77998-bethanycheum), **[Generativ AI med Azure OpenAI Service](https://learn.microsoft.com/en-us/training/paths/develop-ai-solutions-azure-openai/?WT.mc_id=academic-77998-bethanycheum)** og andre. +* Specifikke ML **Cloud Frameworks**, såsom [Azure Machine Learning](https://azure.microsoft.com/services/machine-learning/?WT.mc_id=academic-77998-bethanycheum), [Microsoft Fabric](https://learn.microsoft.com/en-us/training/paths/get-started-fabric/?WT.mc_id=academic-77998-bethanycheum), eller [Azure Databricks](https://docs.microsoft.com/learn/paths/data-engineer-azure-databricks?WT.mc_id=academic-77998-bethanycheum). Overvej at bruge læringsstierne [Build and operate machine learning solutions with Azure Machine Learning](https://docs.microsoft.com/learn/paths/build-ai-solutions-with-azure-ml-service/?WT.mc_id=academic-77998-bethanycheum) og [Build and Operate Machine Learning Solutions with Azure Databricks](https://docs.microsoft.com/learn/paths/build-operate-machine-learning-solutions-azure-databricks/?WT.mc_id=academic-77998-bethanycheum). +* **Samtalebaseret AI** og **Chatbots**. Der findes en separat læringssti [Create conversational AI solutions](https://docs.microsoft.com/learn/paths/create-conversational-ai-solutions/?WT.mc_id=academic-77998-bethanycheum), og du kan også se [dette blogindlæg](https://soshnikov.com/azure/hello-bot-conversational-ai-on-microsoft-platform/) for flere detaljer. * **Dyb matematik** bag dyb læring. Til dette anbefaler vi [Deep Learning](https://www.amazon.com/Deep-Learning-Adaptive-Computation-Machine/dp/0262035618) af Ian Goodfellow, Yoshua Bengio og Aaron Courville, som også er tilgængelig online på [https://www.deeplearningbook.org/](https://www.deeplearningbook.org/). -For en blid introduktion til _AI i skyen_-emner kan du overveje at tage [Get started with artificial intelligence on Azure](https://docs.microsoft.com/learn/paths/get-started-with-artificial-intelligence-on-azure/?WT.mc_id=academic-77998-bethanycheum) læringssti. +For en blid introduktion til _AI i skyen_ emner kan du overveje at tage læringsstien [Kom godt i gang med kunstig intelligens på Azure](https://docs.microsoft.com/learn/paths/get-started-with-artificial-intelligence-on-azure/?WT.mc_id=academic-77998-bethanycheum). # Indhold -| | Lektion Link | PyTorch/Keras/TensorFlow | Laboratorium | +| | Lektion Link | PyTorch/Keras/TensorFlow | Lab | | :-: | :------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------: | ------------------------------------------------------------------------------ | | 0 | [Kursusopsætning](./lessons/0-course-setup/setup.md) | [Opsæt dit udviklingsmiljø](./lessons/0-course-setup/how-to-run.md) | | | I | [**Introduktion til AI**](./lessons/1-Intro/README.md) | | | -| 01 | [Introduktion og AI's historie](./lessons/1-Intro/README.md) | - | - | +| 01 | [Introduktion og AI’s historie](./lessons/1-Intro/README.md) | - | - | | II | **Symbolsk AI** | -| 02 | [Vidensrepræsentation og ekspert-systemer](./lessons/2-Symbolic/README.md) | [Ekspertsystemer](./lessons/2-Symbolic/Animals.ipynb) / [Ontologi](./lessons/2-Symbolic/FamilyOntology.ipynb) /[Konceptgraf](./lessons/2-Symbolic/MSConceptGraph.ipynb) | | +| 02 | [Videnrepræsentation og Ekspertsystemer](./lessons/2-Symbolic/README.md) | [Ekspertsystemer](./lessons/2-Symbolic/Animals.ipynb) / [Ontologi](./lessons/2-Symbolic/FamilyOntology.ipynb) /[Konceptgraf](./lessons/2-Symbolic/MSConceptGraph.ipynb) | | | III | [**Introduktion til Neurale Netværk**](./lessons/3-NeuralNetworks/README.md) ||| | 03 | [Perceptron](./lessons/3-NeuralNetworks/03-Perceptron/README.md) | [Notebook](./lessons/3-NeuralNetworks/03-Perceptron/Perceptron.ipynb) | [Lab](./lessons/3-NeuralNetworks/03-Perceptron/lab/README.md) | -| 04 | [Multi-Laget Perceptron og Oprettelse af vores eget Framework](./lessons/3-NeuralNetworks/04-OwnFramework/README.md) | [Notebook](./lessons/3-NeuralNetworks/04-OwnFramework/OwnFramework.ipynb) | [Lab](./lessons/3-NeuralNetworks/04-OwnFramework/lab/README.md) | +| 04 | [Multi-laget Perceptron og Oprettelse af vores eget Framework](./lessons/3-NeuralNetworks/04-OwnFramework/README.md) | [Notebook](./lessons/3-NeuralNetworks/04-OwnFramework/OwnFramework.ipynb) | [Lab](./lessons/3-NeuralNetworks/04-OwnFramework/lab/README.md) | | 05 | [Introduktion til Frameworks (PyTorch/TensorFlow) og Overfitting](./lessons/3-NeuralNetworks/05-Frameworks/README.md) | [PyTorch](./lessons/3-NeuralNetworks/05-Frameworks/IntroPyTorch.ipynb) / [Keras](./lessons/3-NeuralNetworks/05-Frameworks/IntroKeras.ipynb) / [TensorFlow](./lessons/3-NeuralNetworks/05-Frameworks/IntroKerasTF.ipynb) | [Lab](./lessons/3-NeuralNetworks/05-Frameworks/lab/README.md) | | IV | [**Computersyn**](./lessons/4-ComputerVision/README.md) | [PyTorch](https://docs.microsoft.com/learn/modules/intro-computer-vision-pytorch/?WT.mc_id=academic-77998-cacaste) / [TensorFlow](https://docs.microsoft.com/learn/modules/intro-computer-vision-TensorFlow/?WT.mc_id=academic-77998-cacaste)| [Udforsk Computersyn på Microsoft Azure](https://learn.microsoft.com/en-us/collections/7w28iy2xrqzdj0?WT.mc_id=academic-77998-bethanycheum) | | 06 | [Introduktion til Computersyn. OpenCV](./lessons/4-ComputerVision/06-IntroCV/README.md) | [Notebook](./lessons/4-ComputerVision/06-IntroCV/OpenCV.ipynb) | [Lab](./lessons/4-ComputerVision/06-IntroCV/lab/README.md) | | 07 | [Konvolutionelle Neurale Netværk](./lessons/4-ComputerVision/07-ConvNets/README.md) & [CNN Arkitekturer](./lessons/4-ComputerVision/07-ConvNets/CNN_Architectures.md) | [PyTorch](./lessons/4-ComputerVision/07-ConvNets/ConvNetsPyTorch.ipynb) /[TensorFlow](./lessons/4-ComputerVision/07-ConvNets/ConvNetsTF.ipynb) | [Lab](./lessons/4-ComputerVision/07-ConvNets/lab/README.md) | | 08 | [Fortrænede Netværk og Transfer Learning](./lessons/4-ComputerVision/08-TransferLearning/README.md) og [Træningstricks](./lessons/4-ComputerVision/08-TransferLearning/TrainingTricks.md) | [PyTorch](./lessons/4-ComputerVision/08-TransferLearning/TransferLearningPyTorch.ipynb) / [TensorFlow](./lessons/3-NeuralNetworks/05-Frameworks/IntroKerasTF.ipynb) | [Lab](./lessons/4-ComputerVision/08-TransferLearning/lab/README.md) | -| 09 | [Autoenkodere og VAEs](./lessons/4-ComputerVision/09-Autoencoders/README.md) | [PyTorch](./lessons/4-ComputerVision/09-Autoencoders/AutoEncodersPyTorch.ipynb) / [TensorFlow](./lessons/4-ComputerVision/09-Autoencoders/AutoencodersTF.ipynb) | | -| 10 | [Generative Adversarielle Netværk & Kunstnerisk Stil Transfer](./lessons/4-ComputerVision/10-GANs/README.md) | [PyTorch](./lessons/4-ComputerVision/10-GANs/GANPyTorch.ipynb) / [TensorFlow](./lessons/4-ComputerVision/10-GANs/GANTF.ipynb) | | +| 09 | [Autoenkodere og VAE'er](./lessons/4-ComputerVision/09-Autoencoders/README.md) | [PyTorch](./lessons/4-ComputerVision/09-Autoencoders/AutoEncodersPyTorch.ipynb) / [TensorFlow](./lessons/4-ComputerVision/09-Autoencoders/AutoencodersTF.ipynb) | | +| 10 | [Generative Adversariale Netværk & Kunstnerisk Stiloverførsel](./lessons/4-ComputerVision/10-GANs/README.md) | [PyTorch](./lessons/4-ComputerVision/10-GANs/GANPyTorch.ipynb) / [TensorFlow](./lessons/4-ComputerVision/10-GANs/GANTF.ipynb) | | | 11 | [Objektdetektion](./lessons/4-ComputerVision/11-ObjectDetection/README.md) | [TensorFlow](./lessons/4-ComputerVision/11-ObjectDetection/ObjectDetection.ipynb) | [Lab](./lessons/4-ComputerVision/11-ObjectDetection/lab/README.md) | | 12 | [Semantisk Segmentering. U-Net](./lessons/4-ComputerVision/12-Segmentation/README.md) | [PyTorch](./lessons/4-ComputerVision/12-Segmentation/SemanticSegmentationPytorch.ipynb) / [TensorFlow](./lessons/4-ComputerVision/12-Segmentation/SemanticSegmentationTF.ipynb) | | -| V | [**Naturlig Sprogbearbejdning**](./lessons/5-NLP/README.md) | [PyTorch](https://docs.microsoft.com/learn/modules/intro-natural-language-processing-pytorch/?WT.mc_id=academic-77998-cacaste) /[TensorFlow](https://docs.microsoft.com/learn/modules/intro-natural-language-processing-TensorFlow/?WT.mc_id=academic-77998-cacaste) | [Udforsk Naturlig Sprogbearbejdning på Microsoft Azure](https://learn.microsoft.com/en-us/collections/7w28iy2xrqzdj0?WT.mc_id=academic-77998-bethanycheum)| +| V | [**Naturlig Sprogbehandling**](./lessons/5-NLP/README.md) | [PyTorch](https://docs.microsoft.com/learn/modules/intro-natural-language-processing-pytorch/?WT.mc_id=academic-77998-cacaste) /[TensorFlow](https://docs.microsoft.com/learn/modules/intro-natural-language-processing-TensorFlow/?WT.mc_id=academic-77998-cacaste) | [Udforsk Naturlig Sprogbehandling på Microsoft Azure](https://learn.microsoft.com/en-us/collections/7w28iy2xrqzdj0?WT.mc_id=academic-77998-bethanycheum)| | 13 | [Tekstrepræsentation. Bow/TF-IDF](./lessons/5-NLP/13-TextRep/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/13-TextRep/TextRepresentationPyTorch.ipynb) / [TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/13-TextRep/TextRepresentationTF.ipynb) | | | 14 | [Semantiske ordindlejringer. Word2Vec og GloVe](./lessons/5-NLP/14-Embeddings/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/14-Embeddings/EmbeddingsPyTorch.ipynb) / [TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/14-Embeddings/EmbeddingsTF.ipynb) | | | 15 | [Sprogmodellering. Træn dine egne indlejringer](./lessons/5-NLP/15-LanguageModeling/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/15-LanguageModeling/CBoW-PyTorch.ipynb) / [TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/15-LanguageModeling/CBoW-TF.ipynb) | [Lab](./lessons/5-NLP/15-LanguageModeling/lab/README.md) | @@ -97,128 +107,127 @@ For en blid introduktion til _AI i skyen_-emner kan du overveje at tage [Get sta | 17 | [Generative Rekurrente Netværk](./lessons/5-NLP/17-GenerativeNetworks/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/17-GenerativeNetworks/GenerativePyTorch.ipynb) / [TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/17-GenerativeNetworks/GenerativeTF.ipynb) | [Lab](./lessons/5-NLP/17-GenerativeNetworks/lab/README.md) | | 18 | [Transformers. BERT.](./lessons/5-NLP/18-Transformers/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/18-Transformers/TransformersPyTorch.ipynb) /[TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/18-Transformers/TransformersTF.ipynb) | | | 19 | [Navngiven Entitetsgenkendelse](./lessons/5-NLP/19-NER/README.md) | [TensorFlow](https://microsoft.github.io/AI-For-Beginners/lessons/5-NLP/19-NER/NER-TF.ipynb) | [Lab](./lessons/5-NLP/19-NER/lab/README.md) | -| 20 | [Store Sprogmodeller, Prompt-programmering og Få-skuds-opgaver](./lessons/5-NLP/20-LangModels/README.md) | [PyTorch](https://microsoft.github.io/AI-For-Beginners/lessons/5-NLP/20-LangModels/GPT-PyTorch.ipynb) | | +| 20 | [Store Sprogmodeller, Prompt Programmering og Few-Shot Opgaver](./lessons/5-NLP/20-LangModels/README.md) | [PyTorch](https://microsoft.github.io/AI-For-Beginners/lessons/5-NLP/20-LangModels/GPT-PyTorch.ipynb) | | | VI | **Andre AI-teknikker** || | | 21 | [Genetiske Algoritmer](./lessons/6-Other/21-GeneticAlgorithms/README.md) | [Notebook](./lessons/6-Other/21-GeneticAlgorithms/Genetic.ipynb) | | | 22 | [Dyb Forstærkningslæring](./lessons/6-Other/22-DeepRL/README.md) | [PyTorch](./lessons/6-Other/22-DeepRL/CartPole-RL-PyTorch.ipynb) /[TensorFlow](./lessons/6-Other/22-DeepRL/CartPole-RL-TF.ipynb) | [Lab](./lessons/6-Other/22-DeepRL/lab/README.md) | | 23 | [Multi-Agent Systemer](./lessons/6-Other/23-MultiagentSystems/README.md) | | | | VII | **AI-etik** | | | -| 24 | [AI-etik og Ansvarlig AI](./lessons/7-Ethics/README.md) | [Microsoft Learn: Ansvarlige AI-principper](https://docs.microsoft.com/learn/paths/responsible-ai-business-principles/?WT.mc_id=academic-77998-cacaste) | | +| 24 | [AI-etik og Ansvarlig AI](./lessons/7-Ethics/README.md) | [Microsoft Learn: Principper for Ansvarlig AI](https://docs.microsoft.com/learn/paths/responsible-ai-business-principles/?WT.mc_id=academic-77998-cacaste) | | | IX | **Ekstra** | | | | 25 | [Multi-modale Netværk, CLIP og VQGAN](./lessons/X-Extras/X1-MultiModal/README.md) | [Notebook](./lessons/X-Extras/X1-MultiModal/Clip.ipynb) | | ## Hver lektion indeholder - -* Forudlæsningsmateriale -* Eksekverbare Jupyter Notebooks, som ofte er specifikke for frameworket (**PyTorch** eller **TensorFlow**). Den eksekverbare notebook indeholder også meget teoretisk materiale, så for at forstå emnet skal du gennemgå mindst en version af notebook’en (enten PyTorch eller TensorFlow). -* **Labs** tilgængelige for nogle emner, som giver dig mulighed for at prøve at anvende det lærte materiale på et specifikt problem. +* Forlæsning materiale +* Udførbare Jupyter Notebooks, som ofte er specifikke for rammeværket (**PyTorch** eller **TensorFlow**). Den udførbare notebook indeholder også meget teoretisk materiale, så for at forstå emnet skal du gennemgå mindst en version af notebooken (enten PyTorch eller TensorFlow). +* **Labber** tilgængelige for nogle emner, som giver dig mulighed for at prøve at anvende det materiale, du har lært, på et specifikt problem. * Nogle sektioner indeholder links til [**MS Learn**](https://learn.microsoft.com/en-us/collections/7w28iy2xrqzdj0?WT.mc_id=academic-77998-bethanycheum) moduler, der dækker relaterede emner. -## Kom i gang +## Kom godt i gang ### 🎯 Ny til AI? Start her! -Hvis du er helt ny til AI og vil have hurtige, praktiske eksempler, så tjek vores [**Begyndervenlige Eksempler**](./examples/README.md) ud! De inkluderer: +Hvis du er helt ny til AI og ønsker hurtige, praktiske eksempler, så tjek vores [**Begynder-venlige Eksempler**](./examples/README.md)! Disse inkluderer: -- 🌟 **Hej AI-verden** - Dit første AI-program (mønster-genkendelse) -- 🧠 **Simpelt Neuralt Netværk** - Byg et neuralt netværk fra bunden -- 🖼️ **Billedklassificerer** - Klassificer billeder med detaljerede kommentarer -- 💬 **Tekstfølelse** - Analyser positiv/negativ tekst +- 🌟 **Hello AI World** - Dit første AI-program (mønster-genkendelse) +- 🧠 **Simple Neural Network** - Byg et neuralt netværk fra bunden +- 🖼️ **Image Classifier** - Klassificér billeder med detaljerede kommentarer +- 💬 **Text Sentiment** - Analyser positiv/negativ tekst -Disse eksempler er designet til at hjælpe dig med at forstå AI-koncepter, inden du dykker ned i det fulde pensum. +Disse eksempler er designet til at hjælpe dig med at forstå AI-koncepter, før du dykker ned i hele pensum. -### 📚 Opsætning af fuldt pensum +### 📚 Fuld pensum opsætning -- Vi har lavet en [opsætningslektion](./lessons/0-course-setup/setup.md) til at hjælpe dig med at sætte dit udviklingsmiljø op. - For undervisere har vi også lavet en [pensumopsætningslektion](./lessons/0-course-setup/for-teachers.md)! -- Hvordan man [kører koden i VSCode eller en Codespace](./lessons/0-course-setup/how-to-run.md) +- Vi har oprettet en [opsætningslektion](./lessons/0-course-setup/setup.md) for at hjælpe dig med at konfigurere dit udviklingsmiljø. - For undervisere har vi også oprettet en [pensum opsætningslektion](./lessons/0-course-setup/for-teachers.md)! +- Hvordan man [kører koden i VSCode eller en Codespace](./lessons/0-course-setup/how-to-run.md) -Følg disse trin: +Følg disse trin: -Fork Repository: Klik på "Fork" knappen øverst til højre på denne side. +Fork det repository: Klik på "Fork"-knappen i øverste højre hjørne af denne side. -Klon Repository: `git clone https://github.com/microsoft/AI-For-Beginners.git` +Klon repository: `git clone https://github.com/microsoft/AI-For-Beginners.git` -Glem ikke at give en stjerne (🌟) til dette repo, så du nemmere kan finde det senere. +Glem ikke at give denne repo en stjerne (🌟), så du lettere kan finde den senere. -## Mød andre lærende +## Mød andre lærende -Deltag i vores [officielle AI Discord-server](https://aka.ms/genai-discord?WT.mc_id=academic-105485-bethanycheum) for at møde og netværke med andre lærende, der tager dette kursus, og få support. +Deltag i vores [officielle AI Discord-server](https://aka.ms/genai-discord?WT.mc_id=academic-105485-bethanycheum) for at møde og netværke med andre lærende, der tager dette kursus, og få support. -Hvis du har produktfeedback eller spørgsmål under opbygningen, besøg vores [Azure AI Foundry Developer Forum](https://aka.ms/foundry/forum) +Hvis du har produktfeedback eller spørgsmål under udvikling, besøg vores [Azure AI Foundry Developer Forum](https://aka.ms/foundry/forum) -## Quizzer +## Quizzer -> **En note om quizzer**: Alle quizzer findes i Quiz-app mappen i etc\quiz-app, eller [Online her](https://ff-quizzes.netlify.app/) De er linket inde fra lektionerne, quiz appen kan køres lokalt eller deployeres til Azure; følg instruktionen i `quiz-app` mappen. De bliver gradvist lokaliseret. +> **En note om quizzer**: Alle quizzer er indeholdt i Quiz-app mappen i etc\quiz-app, eller [Online Her](https://ff-quizzes.netlify.app/) De er linket fra lektionerne, quiz-appen kan køres lokalt eller deployeres til Azure; følg instruktionerne i `quiz-app` mappen. De bliver gradvist lokaliseret. -## Hjælp ønskes +## Hjælp ønskes -Har du forslag eller fundet stave- eller kodefejl? Opret en issue eller send en pull request. +Har du forslag eller fundet stave- eller kodefejl? Opret en issue eller en pull request. -## Særlige tak +## Særlige tak -* **✍️ Hovedforfatter:** [Dmitry Soshnikov](http://soshnikov.com), PhD -* **🔥 Redaktør:** [Jen Looper](https://twitter.com/jenlooper), PhD -* **🎨 Sketchnote-illustrator:** [Tomomi Imura](https://twitter.com/girlie_mac) -* **✅ Quizskaber:** [Lateefah Bello](https://github.com/CinnamonXI), [MLSA](https://studentambassadors.microsoft.com/) -* **🙏 Kernemedarbejdere:** [Evgenii Pishchik](https://github.com/Pe4enIks) +* **✍️ Primær forfatter:** [Dmitry Soshnikov](http://soshnikov.com), PhD +* **🔥 Redaktør:** [Jen Looper](https://twitter.com/jenlooper), PhD +* **🎨 Sketchnote illustrator:** [Tomomi Imura](https://twitter.com/girlie_mac) +* **✅ Quiz skaber:** [Lateefah Bello](https://github.com/CinnamonXI), [MLSA](https://studentambassadors.microsoft.com/) +* **🙏 Kernebidragydere:** [Evgenii Pishchik](https://github.com/Pe4enIks) -## Andre pensum +## Andre pensum -Vores team producerer andre pensum! Tjek disse ud: +Vores team producerer andre pensum! Tjek: - -### LangChain -[![LangChain4j for Beginners](https://img.shields.io/badge/LangChain4j%20for%20Beginners-22C55E?style=for-the-badge&&labelColor=E5E7EB&color=0553D6)](https://aka.ms/langchain4j-for-beginners) -[![LangChain.js for Beginners](https://img.shields.io/badge/LangChain.js%20for%20Beginners-22C55E?style=for-the-badge&labelColor=E5E7EB&color=0553D6)](https://aka.ms/langchainjs-for-beginners?WT.mc_id=m365-94501-dwahlin) -[![LangChain for Beginners](https://img.shields.io/badge/LangChain%20for%20Beginners-22C55E?style=for-the-badge&labelColor=E5E7EB&color=0553D6)](https://github.com/microsoft/langchain-for-beginners?WT.mc_id=m365-94501-dwahlin) ---- + +### LangChain +[![LangChain4j for Beginners](https://img.shields.io/badge/LangChain4j%20for%20Beginners-22C55E?style=for-the-badge&&labelColor=E5E7EB&color=0553D6)](https://aka.ms/langchain4j-for-beginners) +[![LangChain.js for Beginners](https://img.shields.io/badge/LangChain.js%20for%20Beginners-22C55E?style=for-the-badge&labelColor=E5E7EB&color=0553D6)](https://aka.ms/langchainjs-for-beginners?WT.mc_id=m365-94501-dwahlin) +[![LangChain for Beginners](https://img.shields.io/badge/LangChain%20for%20Beginners-22C55E?style=for-the-badge&labelColor=E5E7EB&color=0553D6)](https://github.com/microsoft/langchain-for-beginners?WT.mc_id=m365-94501-dwahlin) +--- -### Azure / Edge / MCP / Agenter -[![AZD for Beginners](https://img.shields.io/badge/AZD%20for%20Beginners-0078D4?style=for-the-badge&labelColor=E5E7EB&color=0078D4)](https://github.com/microsoft/AZD-for-beginners?WT.mc_id=academic-105485-koreyst) -[![Edge AI for Beginners](https://img.shields.io/badge/Edge%20AI%20for%20Beginners-00B8E4?style=for-the-badge&labelColor=E5E7EB&color=00B8E4)](https://github.com/microsoft/edgeai-for-beginners?WT.mc_id=academic-105485-koreyst) -[![MCP for Beginners](https://img.shields.io/badge/MCP%20for%20Beginners-009688?style=for-the-badge&labelColor=E5E7EB&color=009688)](https://github.com/microsoft/mcp-for-beginners?WT.mc_id=academic-105485-koreyst) -[![AI Agents for Beginners](https://img.shields.io/badge/AI%20Agents%20for%20Beginners-00C49A?style=for-the-badge&labelColor=E5E7EB&color=00C49A)](https://github.com/microsoft/ai-agents-for-beginners?WT.mc_id=academic-105485-koreyst) +### Azure / Edge / MCP / Agenter +[![AZD for Beginners](https://img.shields.io/badge/AZD%20for%20Beginners-0078D4?style=for-the-badge&labelColor=E5E7EB&color=0078D4)](https://github.com/microsoft/AZD-for-beginners?WT.mc_id=academic-105485-koreyst) +[![Edge AI for Beginners](https://img.shields.io/badge/Edge%20AI%20for%20Beginners-00B8E4?style=for-the-badge&labelColor=E5E7EB&color=00B8E4)](https://github.com/microsoft/edgeai-for-beginners?WT.mc_id=academic-105485-koreyst) +[![MCP for Beginners](https://img.shields.io/badge/MCP%20for%20Beginners-009688?style=for-the-badge&labelColor=E5E7EB&color=009688)](https://github.com/microsoft/mcp-for-beginners?WT.mc_id=academic-105485-koreyst) +[![AI Agents for Beginners](https://img.shields.io/badge/AI%20Agents%20for%20Beginners-00C49A?style=for-the-badge&labelColor=E5E7EB&color=00C49A)](https://github.com/microsoft/ai-agents-for-beginners?WT.mc_id=academic-105485-koreyst) ---- - -### Generativ AI Serie -[![Generative AI for Beginners](https://img.shields.io/badge/Generative%20AI%20for%20Beginners-8B5CF6?style=for-the-badge&labelColor=E5E7EB&color=8B5CF6)](https://github.com/microsoft/generative-ai-for-beginners?WT.mc_id=academic-105485-koreyst) -[![Generative AI (.NET)](https://img.shields.io/badge/Generative%20AI%20(.NET)-9333EA?style=for-the-badge&labelColor=E5E7EB&color=9333EA)](https://github.com/microsoft/Generative-AI-for-beginners-dotnet?WT.mc_id=academic-105485-koreyst) -[![Generative AI (Java)](https://img.shields.io/badge/Generative%20AI%20(Java)-C084FC?style=for-the-badge&labelColor=E5E7EB&color=C084FC)](https://github.com/microsoft/generative-ai-for-beginners-java?WT.mc_id=academic-105485-koreyst) -[![Generative AI (JavaScript)](https://img.shields.io/badge/Generative%20AI%20(JavaScript)-E879F9?style=for-the-badge&labelColor=E5E7EB&color=E879F9)](https://github.com/microsoft/generative-ai-with-javascript?WT.mc_id=academic-105485-koreyst) +--- + +### Generativ AI Serie +[![Generative AI for Beginners](https://img.shields.io/badge/Generative%20AI%20for%20Beginners-8B5CF6?style=for-the-badge&labelColor=E5E7EB&color=8B5CF6)](https://github.com/microsoft/generative-ai-for-beginners?WT.mc_id=academic-105485-koreyst) +[![Generative AI (.NET)](https://img.shields.io/badge/Generative%20AI%20(.NET)-9333EA?style=for-the-badge&labelColor=E5E7EB&color=9333EA)](https://github.com/microsoft/Generative-AI-for-beginners-dotnet?WT.mc_id=academic-105485-koreyst) +[![Generative AI (Java)](https://img.shields.io/badge/Generative%20AI%20(Java)-C084FC?style=for-the-badge&labelColor=E5E7EB&color=C084FC)](https://github.com/microsoft/generative-ai-for-beginners-java?WT.mc_id=academic-105485-koreyst) +[![Generative AI (JavaScript)](https://img.shields.io/badge/Generative%20AI%20(JavaScript)-E879F9?style=for-the-badge&labelColor=E5E7EB&color=E879F9)](https://github.com/microsoft/generative-ai-with-javascript?WT.mc_id=academic-105485-koreyst) ---- - -### Kerne Læring -[![ML for Beginners](https://img.shields.io/badge/ML%20for%20Beginners-22C55E?style=for-the-badge&labelColor=E5E7EB&color=22C55E)](https://aka.ms/ml-beginners?WT.mc_id=academic-105485-koreyst) -[![Data Science for Beginners](https://img.shields.io/badge/Data%20Science%20for%20Beginners-84CC16?style=for-the-badge&labelColor=E5E7EB&color=84CC16)](https://aka.ms/datascience-beginners?WT.mc_id=academic-105485-koreyst) -[![AI for Beginners](https://img.shields.io/badge/AI%20for%20Beginners-A3E635?style=for-the-badge&labelColor=E5E7EB&color=A3E635)](https://aka.ms/ai-beginners?WT.mc_id=academic-105485-koreyst) -[![Cybersecurity for Beginners](https://img.shields.io/badge/Cybersecurity%20for%20Beginners-F97316?style=for-the-badge&labelColor=E5E7EB&color=F97316)](https://github.com/microsoft/Security-101?WT.mc_id=academic-96948-sayoung) -[![Web Dev for Beginners](https://img.shields.io/badge/Web%20Dev%20for%20Beginners-EC4899?style=for-the-badge&labelColor=E5E7EB&color=EC4899)](https://aka.ms/webdev-beginners?WT.mc_id=academic-105485-koreyst) -[![IoT for Beginners](https://img.shields.io/badge/IoT%20for%20Beginners-14B8A6?style=for-the-badge&labelColor=E5E7EB&color=14B8A6)](https://aka.ms/iot-beginners?WT.mc_id=academic-105485-koreyst) -[![XR Development for Beginners](https://img.shields.io/badge/XR%20Development%20for%20Beginners-38BDF8?style=for-the-badge&labelColor=E5E7EB&color=38BDF8)](https://github.com/microsoft/xr-development-for-beginners?WT.mc_id=academic-105485-koreyst) +--- + +### Kerne-læring +[![ML for Beginners](https://img.shields.io/badge/ML%20for%20Beginners-22C55E?style=for-the-badge&labelColor=E5E7EB&color=22C55E)](https://aka.ms/ml-beginners?WT.mc_id=academic-105485-koreyst) +[![Data Science for Beginners](https://img.shields.io/badge/Data%20Science%20for%20Beginners-84CC16?style=for-the-badge&labelColor=E5E7EB&color=84CC16)](https://aka.ms/datascience-beginners?WT.mc_id=academic-105485-koreyst) +[![AI for Beginners](https://img.shields.io/badge/AI%20for%20Beginners-A3E635?style=for-the-badge&labelColor=E5E7EB&color=A3E635)](https://aka.ms/ai-beginners?WT.mc_id=academic-105485-koreyst) +[![Cybersecurity for Beginners](https://img.shields.io/badge/Cybersecurity%20for%20Beginners-F97316?style=for-the-badge&labelColor=E5E7EB&color=F97316)](https://github.com/microsoft/Security-101?WT.mc_id=academic-96948-sayoung) +[![Web Dev for Beginners](https://img.shields.io/badge/Web%20Dev%20for%20Beginners-EC4899?style=for-the-badge&labelColor=E5E7EB&color=EC4899)](https://aka.ms/webdev-beginners?WT.mc_id=academic-105485-koreyst) +[![IoT for Beginners](https://img.shields.io/badge/IoT%20for%20Beginners-14B8A6?style=for-the-badge&labelColor=E5E7EB&color=14B8A6)](https://aka.ms/iot-beginners?WT.mc_id=academic-105485-koreyst) +[![XR Development for Beginners](https://img.shields.io/badge/XR%20Development%20for%20Beginners-38BDF8?style=for-the-badge&labelColor=E5E7EB&color=38BDF8)](https://github.com/microsoft/xr-development-for-beginners?WT.mc_id=academic-105485-koreyst) ---- - -### Copilot Serie -[![Copilot for AI Paired Programming](https://img.shields.io/badge/Copilot%20for%20AI%20Paired%20Programming-FACC15?style=for-the-badge&labelColor=E5E7EB&color=FACC15)](https://aka.ms/GitHubCopilotAI?WT.mc_id=academic-105485-koreyst) -[![Copilot for C#/.NET](https://img.shields.io/badge/Copilot%20for%20C%23/.NET-FBBF24?style=for-the-badge&labelColor=E5E7EB&color=FBBF24)](https://github.com/microsoft/mastering-github-copilot-for-dotnet-csharp-developers?WT.mc_id=academic-105485-koreyst) -[![Copilot Adventure](https://img.shields.io/badge/Copilot%20Adventure-FDE68A?style=for-the-badge&labelColor=E5E7EB&color=FDE68A)](https://github.com/microsoft/CopilotAdventures?WT.mc_id=academic-105485-koreyst) - +--- + +### Copilot Serie +[![Copilot for AI Paired Programming](https://img.shields.io/badge/Copilot%20for%20AI%20Paired%20Programming-FACC15?style=for-the-badge&labelColor=E5E7EB&color=FACC15)](https://aka.ms/GitHubCopilotAI?WT.mc_id=academic-105485-koreyst) +[![Copilot for C#/.NET](https://img.shields.io/badge/Copilot%20for%20C%23/.NET-FBBF24?style=for-the-badge&labelColor=E5E7EB&color=FBBF24)](https://github.com/microsoft/mastering-github-copilot-for-dotnet-csharp-developers?WT.mc_id=academic-105485-koreyst) +[![Copilot Adventure](https://img.shields.io/badge/Copilot%20Adventure-FDE68A?style=for-the-badge&labelColor=E5E7EB&color=FDE68A)](https://github.com/microsoft/CopilotAdventures?WT.mc_id=academic-105485-koreyst) + -## Få hjælp +## Få hjælp -Hvis du sidder fast eller har spørgsmål om at bygge AI-apps, så deltag med andre lærende og erfarne udviklere i diskussioner om MCP. Det er et støttende fællesskab, hvor spørgsmål er velkomne, og viden deles frit. +Hvis du sidder fast eller har spørgsmål om at bygge AI-apps, så deltag i diskussioner med medstuderende og erfarne udviklere om MCP. Det er et støttende fællesskab, hvor spørgsmål er velkomne, og viden deles frit. -[![Microsoft Foundry Discord](https://dcbadge.limes.pink/api/server/nTYy5BXMWG)](https://discord.gg/nTYy5BXMWG) +[![Microsoft Foundry Discord](https://dcbadge.limes.pink/api/server/nTYy5BXMWG)](https://discord.gg/nTYy5BXMWG) -Hvis du har produktfeedback eller oplever fejl under opbygningen, besøg: +Hvis du har produktfeedback eller fejl under udvikling, besøg: [![Microsoft Foundry Developer Forum](https://img.shields.io/badge/GitHub-Microsoft_Foundry_Developer_Forum-blue?style=for-the-badge&logo=github&color=000000&logoColor=fff)](https://aka.ms/foundry/forum) --- -**Ansvarsfraskrivelse**: -Dette dokument er blevet oversat ved hjælp af AI-oversættelsestjenesten [Co-op Translator](https://github.com/Azure/co-op-translator). Selvom vi bestræber os på nøjagtighed, bedes du være opmærksom på, at automatiserede oversættelser kan indeholde fejl eller unøjagtigheder. Det oprindelige dokument på dets modersmål bør betragtes som den autoritative kilde. For vigtig information anbefales professionel menneskelig oversættelse. Vi påtager os intet ansvar for misforståelser eller fejltolkninger, der måtte opstå som følge af brugen af denne oversættelse. +**Ansvarsfraskrivelse**: +Dette dokument er oversat ved hjælp af AI-oversættelsestjenesten [Co-op Translator](https://github.com/Azure/co-op-translator). Selvom vi bestræber os på nøjagtighed, skal du være opmærksom på, at automatiserede oversættelser kan indeholde fejl eller unøjagtigheder. Det originale dokument på dets oprindelige sprog bør betragtes som den autoritative kilde. For kritisk information anbefales professionel menneskelig oversættelse. Vi påtager os intet ansvar for eventuelle misforståelser eller fejlfortolkninger, der opstår som følge af brugen af denne oversættelse. \ No newline at end of file diff --git a/translations/da/lessons/2-Symbolic/MSConceptGraph.ipynb b/translations/da/lessons/2-Symbolic/MSConceptGraph.ipynb index 228dde1b..b75995c5 100644 --- a/translations/da/lessons/2-Symbolic/MSConceptGraph.ipynb +++ b/translations/da/lessons/2-Symbolic/MSConceptGraph.ipynb @@ -1,539 +1,532 @@ { - "cells": [ - { - "cell_type": "markdown", - "metadata": { - "collapsed": true - }, - "source": [ - "## Microsoft Concept Graph - Denne API ER IKKE LÆNGERE TILGÆNGELIG, MEN SE VENLIGST NOTEBOGEN FOR AT FORSTÅ KONCEPTET\n", - "\n", - "[Microsoft Concept Graph](https://concept.research.microsoft.com/) er en stor taksonomi af termer udvundet fra internettet, med `is-a` relationer mellem koncepter.\n", - "\n", - "Context Graph er tilgængelig i to former:\n", - " * Stor tekstfil til download\n", - " * REST API\n", - "\n", - "Statistikker:\n", - " * 5401933 unikke koncepter,\n", - " * 12551613 unikke instanser\n", - " * 87603947 `is-a` relationer\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Brug af webtjeneste\n", - "\n", - "Webtjenesten tilbyder forskellige kald for at estimere sandsynligheden for, at et koncept tilhører forskellige grupper. Mere info er tilgængelig [her](https://concept.research.microsoft.com/Home/Api).\n", - "Her er et eksempel på en URL til kald: `https://api.conceptnet.io/query?start=/c/en/microsoft&rel=/r/IsA&limit=10`\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "trusted": true - }, - "outputs": [], - "source": [ - "import urllib\n", - "import json\n", - "\n", - "def http(x):\n", - " response = urllib.request.urlopen(x)\n", - " data = response.read()\n", - " return data.decode('utf-8')\n", - "\n", - "def query(x):\n", - " concept = x.lower().replace(' ', '_')\n", - " url = \"https://api.conceptnet.io/query?start=/c/en/{}&rel=/r/IsA&limit=10\".format(\n", - " urllib.parse.quote(concept))\n", - " try:\n", - " result = json.loads(http(url))\n", - " except Exception:\n", - " return {}\n", - " edges = result.get('edges', [])\n", - " if not edges:\n", - " return {}\n", - " total_weight = sum(edge['weight'] for edge in edges)\n", - " if total_weight == 0:\n", - " return {}\n", - " return {edge['end']['label']: edge['weight'] / total_weight for edge in edges}\n", - "\n", - "query('microsoft')" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Lad os prøve at kategorisere nyhedstitler ved hjælp af overordnede begreber. For at få nyhedstitler vil vi bruge [NewsApi.org](http://newsapi.org) tjenesten. Du skal skaffe din egen API-nøgle for at bruge tjenesten - gå til hjemmesiden og registrer dig for en gratis udviklerplan.\n" - ] - }, - { - "cell_type": "code", - "execution_count": 20, - "metadata": { - "trusted": true - }, - "outputs": [], - "source": [ - "newsapi_key = ''\n", - "def get_news(country='us'):\n", - " res = json.loads(http(\"https://newsapi.org/v2/top-headlines?country={0}&apiKey={1}\".format(country,newsapi_key)))\n", - " return res['articles']\n", - "\n", - "all_titles = [x['title'] for x in get_news('us')+get_news('gb')]" - ] - }, - { - "cell_type": "code", - "execution_count": 21, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "['Covid-19 Live Updates: Vaccines and Boosters News - The New York Times',\n", - " 'Ukrainians Flee Mariupol as Russian Forces Push to Take Port City - The Wall Street Journal',\n", - " 'Bond Yields Jump, Stock Futures Rise After Powell Says Fed Is Ready to Be More Aggressive - The Wall Street Journal',\n", - " 'Putin critic Alexei Navalny found guilty by Russian court - New York Post ',\n", - " \"Supreme Court nominee Ketanji Brown Jackson will face questions at confirmation hearing's second day - CNN\",\n", - " '2 teachers killed at Swedish high school, student arrested - ABC News',\n", - " 'Clues to Covid-19’s Next Moves Come From Sewers - The Wall Street Journal',\n", - " 'Republicans to roll dice by grilling Jackson over child-pornography sentencing decisions | TheHill - The Hill',\n", - " '‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent',\n", - " 'NASA confirms there are 5,000 planets outside our solar system - Daily Mail',\n", - " \"US stocks whipsawed overnight after Fed Chair Powell's remarks - Fox Business\",\n", - " \"'We've learned absolutely nothing': Tests could again be in short supply if Covid surges - POLITICO\",\n", - " \"Duchess of Cambridge swaps khaki jungle gear for Vampire's Wife dress on Belize trip - Daily Mail\",\n", - " 'China searches for victims, flight recorders after first plane crash in 12 years - Reuters',\n", - " 'Second superyacht linked to Russian oligarch Abramovich docks in Turkey - Reuters',\n", - " 'Live updates: Russia stops talks with Japan over sanctions - The Associated Press - en Español',\n", - " 'Powers Remain and Threats Lurk as Women’s Sweet 16 Is Set - The New York Times',\n", - " 'Webb Space Telescope Begins Multi-Instrument Alignment - SciTechDaily',\n", - " \"UConn vs UCF - NCAA women's tournament second-round highlights - March Madness\",\n", - " 'Bucking Republican Trend, Indiana Governor Vetoes Transgender Sports Bill - The New York Times',\n", - " \"Maggie Fox dead: Coronation Street and Shameless actress dies after 'sudden accident' - Mirror Online - The Mirror\",\n", - " 'China plane crash – live: Search for survivors continues as witness describes moment flight fell from sky - The Independent',\n", - " 'Daniel Morgan murder: damning report condemns Met police - The Guardian',\n", - " 'What to expect from Rishi Sunak’s Spring Statement - BBC.com',\n", - " 'UK and Republic of Ireland in line to host Euro 2028 after no one else bids - The Guardian',\n", - " \"Friends beg Vladimir Putin's 'lover' to persuade him to end Ukraine invasion - The Mirror\",\n", - " 'Brass Eye’s outtakes show the brutal TV comedy was the tip of an iceberg - The Guardian',\n", - " \"Vladimir Putin threatens civilians to break Mariupol's spirit - The Times\",\n", - " 'Shell U-turn on Cambo oilfield would threaten green targets, say campaigners - The Guardian',\n", - " 'St Helens dog attack: Girl aged 17 months killed at home - BBC',\n", - " \"PlayStation to buy 'Assassin's Creed' veteran Jade Raymond's Haven Studios - NME\",\n", - " '‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent',\n", - " 'NASA confirms there are 5,000 planets outside our solar system - Daily Mail',\n", - " 'Nintendo Switch finally has folders • Eurogamer.net - Eurogamer.net',\n", - " 'FA to “find a solution” as Liverpool fan group blasts “shambolic” Wembley travel - This Is Anfield',\n", - " 'Manchester United transfer news LIVE Erik ten Hag latest and Man Utd manager updates - Manchester Evening News',\n", - " 'Inflation raises cost of UK government borrowing in February; crude oil up again – business live - The Guardian',\n", - " 'Alexei Navalny: Kremlin critic found guilty of large-scale fraud and contempt of court by Russian court - Sky News',\n", - " \"UK prepares to nationalize Russia natural gas giant Gazprom's retail unit - Business Insider\",\n", - " 'Zaghari-Ratcliffe: Hunt calls for inquiry into delay over Iran debt payment - The Guardian']" - ] - }, - "execution_count": 21, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "all_titles" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Først og fremmest ønsker vi at kunne udtrække substantiver fra nyhedstitler. Vi vil bruge `TextBlob`-biblioteket til dette, hvilket forenkler mange typiske NLP-opgaver som denne.\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": { - "trusted": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Requirement already satisfied: textblob in c:\\winapp\\miniconda3\\lib\\site-packages (0.17.1)\n", - "Requirement already satisfied: nltk>=3.1 in c:\\winapp\\miniconda3\\lib\\site-packages (from textblob) (3.5)\n", - "Requirement already satisfied: joblib in c:\\winapp\\miniconda3\\lib\\site-packages (from nltk>=3.1->textblob) (1.0.1)\n", - "Requirement already satisfied: regex in c:\\winapp\\miniconda3\\lib\\site-packages (from nltk>=3.1->textblob) (2021.11.10)\n", - "Requirement already satisfied: tqdm in c:\\winapp\\miniconda3\\lib\\site-packages (from nltk>=3.1->textblob) (4.61.2)\n", - "Requirement already satisfied: click in c:\\winapp\\miniconda3\\lib\\site-packages (from nltk>=3.1->textblob) (8.0.3)\n", - "Requirement already satisfied: colorama in c:\\winapp\\miniconda3\\lib\\site-packages (from click->nltk>=3.1->textblob) (0.4.4)\n", - "Finished.\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "[nltk_data] Downloading package brown to\n", - "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", - "[nltk_data] Package brown is already up-to-date!\n", - "[nltk_data] Downloading package punkt to\n", - "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", - "[nltk_data] Package punkt is already up-to-date!\n", - "[nltk_data] Downloading package wordnet to\n", - "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", - "[nltk_data] Package wordnet is already up-to-date!\n", - "[nltk_data] Downloading package averaged_perceptron_tagger to\n", - "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", - "[nltk_data] Package averaged_perceptron_tagger is already up-to-\n", - "[nltk_data] date!\n", - "[nltk_data] Downloading package conll2000 to\n", - "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", - "[nltk_data] Package conll2000 is already up-to-date!\n", - "[nltk_data] Downloading package movie_reviews to\n", - "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", - "[nltk_data] Package movie_reviews is already up-to-date!\n" - ] - } - ], - "source": [ - "import sys\n", - "!{sys.executable} -m pip install textblob\n", - "!{sys.executable} -m textblob.download_corpora\n", - "from textblob import TextBlob" - ] - }, - { - "cell_type": "code", - "execution_count": 22, - "metadata": { - "trusted": true - }, - "outputs": [ - { - "data": { - "text/plain": [ - "{'covid-19 live updates': 1,\n", - " 'vaccines': 1,\n", - " 'boosters': 1,\n", - " 'york': 4,\n", - " 'ukrainians flee mariupol': 1,\n", - " 'forces push': 1,\n", - " 'port city': 1,\n", - " 'wall street journal': 3,\n", - " 'bond yields': 1,\n", - " 'futures rise': 1,\n", - " 'powell says fed': 1,\n", - " 'ready': 1,\n", - " 'be': 1,\n", - " 'aggressive': 1,\n", - " 'putin': 3,\n", - " 'alexei navalny': 2,\n", - " 'russian': 2,\n", - " 'supreme court nominee': 1,\n", - " 'ketanji brown jackson': 1,\n", - " \"confirmation hearing 's\": 1,\n", - " 'cnn': 1,\n", - " 'swedish': 1,\n", - " 'high school': 1,\n", - " 'abc': 1,\n", - " 'clues': 1,\n", - " 'covid-19': 1,\n", - " '’ s': 2,\n", - " 'moves': 1,\n", - " 'sewers': 1,\n", - " 'roll dice': 1,\n", - " 'jackson': 1,\n", - " 'decisions |': 1,\n", - " 'thehill': 1,\n", - " 'clear': 2,\n", - " 'chemical weapons': 2,\n", - " 'ukraine': 3,\n", - " 'claims president': 2,\n", - " 'biden': 2,\n", - " 'nasa': 2,\n", - " 'solar system': 2,\n", - " 'daily mail': 3,\n", - " 'us stocks': 1,\n", - " 'fed chair powell': 1,\n", - " \"'s remarks\": 1,\n", - " 'fox': 1,\n", - " \"'we 've\": 1,\n", - " 'tests': 1,\n", - " 'covid': 1,\n", - " 'politico': 1,\n", - " 'duchess': 1,\n", - " 'cambridge': 1,\n", - " 'swaps khaki jungle gear': 1,\n", - " 'vampire': 1,\n", - " 'wife': 1,\n", - " 'belize': 1,\n", - " 'china': 2,\n", - " 'flight recorders': 1,\n", - " 'plane crash': 1,\n", - " 'reuters': 2,\n", - " 'russian oligarch': 1,\n", - " 'abramovich': 1,\n", - " 'live': 1,\n", - " 'russia': 2,\n", - " 'stops talks': 1,\n", - " 'japan': 1,\n", - " 'español': 1,\n", - " 'powers remain': 1,\n", - " 'threats lurk': 1,\n", - " 'set': 1,\n", - " 'webb': 1,\n", - " 'telescope begins multi-instrument alignment': 1,\n", - " 'scitechdaily': 1,\n", - " 'uconn': 1,\n", - " 'ucf': 1,\n", - " 'ncaa': 1,\n", - " \"women 's tournament second-round highlights\": 1,\n", - " 'march madness': 1,\n", - " 'bucking republican trend': 1,\n", - " 'indiana': 1,\n", - " 'vetoes transgender': 1,\n", - " 'bill': 1,\n", - " 'maggie fox': 1,\n", - " 'coronation': 1,\n", - " 'shameless': 1,\n", - " \"'sudden accident\": 1,\n", - " 'mirror online': 1,\n", - " 'mirror': 2,\n", - " 'plane crash –': 1,\n", - " 'search': 1,\n", - " 'moment flight': 1,\n", - " 'daniel morgan': 1,\n", - " 'report condemns': 1,\n", - " 'met': 1,\n", - " 'guardian': 6,\n", - " 'rishi sunak': 1,\n", - " '’ s spring': 1,\n", - " 'statement': 1,\n", - " 'bbc.com': 1,\n", - " 'uk': 3,\n", - " 'ireland': 1,\n", - " 'euro': 1,\n", - " 'vladimir putin': 2,\n", - " \"'s 'lover\": 1,\n", - " 'brass eye': 1,\n", - " '’ s outtakes': 1,\n", - " 'brutal tv comedy': 1,\n", - " 'threatens civilians': 1,\n", - " 'mariupol': 1,\n", - " \"'s spirit\": 1,\n", - " 'shell u-turn': 1,\n", - " 'cambo': 1,\n", - " 'green targets': 1,\n", - " 'st helens': 1,\n", - " 'dog attack': 1,\n", - " 'girl': 1,\n", - " 'bbc': 1,\n", - " 'playstation': 1,\n", - " \"'assassin 's\": 1,\n", - " 'creed': 1,\n", - " 'jade raymond': 1,\n", - " 'haven studios': 1,\n", - " 'nme': 1,\n", - " 'nintendo switch': 1,\n", - " 'folders •': 1,\n", - " 'eurogamer.net': 2,\n", - " 'fa': 1,\n", - " 'solution ”': 1,\n", - " 'liverpool': 1,\n", - " 'fan group blasts “ shambolic ”': 1,\n", - " 'wembley': 1,\n", - " 'anfield': 1,\n", - " 'manchester': 1,\n", - " 'live erik': 1,\n", - " 'hag': 1,\n", - " 'utd': 1,\n", - " 'manager updates': 1,\n", - " 'manchester evening': 1,\n", - " 'inflation': 1,\n", - " 'government borrowing': 1,\n", - " 'february': 1,\n", - " 'crude oil': 1,\n", - " '– business': 1,\n", - " 'kremlin': 1,\n", - " 'large-scale fraud': 1,\n", - " 'sky': 1,\n", - " 'natural gas': 1,\n", - " 'gazprom': 1,\n", - " 'retail unit': 1,\n", - " 'insider': 1,\n", - " 'zaghari-ratcliffe': 1,\n", - " 'hunt': 1,\n", - " 'iran': 1,\n", - " 'debt payment': 1}" - ] - }, - "execution_count": 22, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "w = {}\n", - "for x in all_titles:\n", - " for n in TextBlob(x).noun_phrases:\n", - " if n in w:\n", - " w[n].append(x)\n", - " else:\n", - " w[n]=[x]\n", - "{ x:len(w[x]) for x in w.keys()}" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Vi kan se, at substantiver ikke giver os store tematiske grupper. Lad os erstatte substantiver med mere generelle termer, der er opnået fra konceptgrafen. Dette vil tage noget tid, fordi vi foretager REST-opkald for hver substantivfrase.\n" - ] - }, - { - "cell_type": "code", - "execution_count": 23, - "metadata": { - "trusted": true - }, - "outputs": [], - "source": [ - "w = {}\n", - "for x in all_titles:\n", - " for noun in TextBlob(x).noun_phrases:\n", - " terms = query(noun)\n", - " for term in [u for u in terms.keys() if terms[u]>0.1]:\n", - " if term in w:\n", - " w[term].append(x)\n", - " else:\n", - " w[term]=[x]" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": { - "trusted": true - }, - "outputs": [ - { - "data": { - "text/plain": [ - "{'city': 9,\n", - " 'brand': 4,\n", - " 'place': 9,\n", - " 'town': 4,\n", - " 'factor': 4,\n", - " 'film': 4,\n", - " 'nation': 11,\n", - " 'state': 5,\n", - " 'person': 4,\n", - " 'organization': 5,\n", - " 'publication': 10,\n", - " 'market': 5,\n", - " 'economy': 4,\n", - " 'company': 6,\n", - " 'newspaper': 6,\n", - " 'relationship': 6}" - ] - }, - "execution_count": 24, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "{ x:len(w[x]) for x in w.keys() if len(w[x])>3}" - ] - }, - { - "cell_type": "code", - "execution_count": 27, - "metadata": { - "trusted": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "ECONOMY:\n", - "China searches for victims, flight recorders after first plane crash in 12 years - Reuters\n", - "Live updates: Russia stops talks with Japan over sanctions - The Associated Press - en Español\n", - "China plane crash – live: Search for survivors continues as witness describes moment flight fell from sky - The Independent\n", - "UK prepares to nationalize Russia natural gas giant Gazprom's retail unit - Business Insider\n", - "\n", - "NATION:\n", - "‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent\n", - "Duchess of Cambridge swaps khaki jungle gear for Vampire's Wife dress on Belize trip - Daily Mail\n", - "China searches for victims, flight recorders after first plane crash in 12 years - Reuters\n", - "Live updates: Russia stops talks with Japan over sanctions - The Associated Press - en Español\n", - "Live updates: Russia stops talks with Japan over sanctions - The Associated Press - en Español\n", - "China plane crash – live: Search for survivors continues as witness describes moment flight fell from sky - The Independent\n", - "UK and Republic of Ireland in line to host Euro 2028 after no one else bids - The Guardian\n", - "Friends beg Vladimir Putin's 'lover' to persuade him to end Ukraine invasion - The Mirror\n", - "‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent\n", - "UK prepares to nationalize Russia natural gas giant Gazprom's retail unit - Business Insider\n", - "Zaghari-Ratcliffe: Hunt calls for inquiry into delay over Iran debt payment - The Guardian\n", - "\n", - "PERSON:\n", - "‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent\n", - "Duchess of Cambridge swaps khaki jungle gear for Vampire's Wife dress on Belize trip - Daily Mail\n", - "Second superyacht linked to Russian oligarch Abramovich docks in Turkey - Reuters\n", - "‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent\n" - ] - } - ], - "source": [ - "print('\\nECONOMY:\\n'+'\\n'.join(w['economy']))\n", - "print('\\nNATION:\\n'+'\\n'.join(w['nation']))\n", - "print('\\nPERSON:\\n'+'\\n'.join(w['person']))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n---\n\n**Ansvarsfraskrivelse**: \nDette dokument er blevet oversat ved hjælp af AI-oversættelsestjenesten [Co-op Translator](https://github.com/Azure/co-op-translator). Selvom vi bestræber os på nøjagtighed, skal det bemærkes, at automatiserede oversættelser kan indeholde fejl eller unøjagtigheder. Det originale dokument på dets oprindelige sprog bør betragtes som den autoritative kilde. For kritisk information anbefales professionel menneskelig oversættelse. Vi påtager os ikke ansvar for eventuelle misforståelser eller fejltolkninger, der måtte opstå som følge af brugen af denne oversættelse.\n" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3.7.4 64-bit (conda)", - "metadata": { - "interpreter": { - "hash": "86193a1ab0ba47eac1c69c1756090baa3b420b3eea7d4aafab8b85f8b312f0c5" - } - }, - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9.5" - }, - "coopTranslator": { - "original_hash": "7b3f1fc049371bcf8649ac9fefdf0413", - "translation_date": "2025-10-03T18:55:37+00:00", - "source_file": "lessons/2-Symbolic/MSConceptGraph.ipynb", - "language_code": "da" - } + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Concept Graph using ConceptNet\n", + "\n", + "> **Note:** Den oprindelige [Microsoft Concept Graph](https://concept.research.microsoft.com/) API er ikke længere tilgængelig. Denne notesbog er blevet opdateret til at bruge [ConceptNet](https://conceptnet.io/) som en erstatning, hvilket er en frit tilgængelig åben vidensgraf med lignende `is-a` relationer mellem begreber.\n", + "\n", + "[ConceptNet](https://conceptnet.io/) er et stort semantisk netværk af begreber med relationer som `IsA`, `PartOf`, `UsedFor` og mere. Det findes som:\n", + " * En downloadbar datafil\n", + " * En REST API (ingen API-nøgle krævet)\n", + "\n", + "Statistikker for ConceptNet:\n", + " * Over 8 millioner noder\n", + " * 21+ millioner kanter på tværs af 83 sprog\n" + ] }, - "nbformat": 4, - "nbformat_minor": 2 + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Brug af ConceptNet Web Service\n", + "\n", + "[ConceptNet](https://conceptnet.io/) tilbyder en REST API til at udforske `is-a` (IsA) relationer mellem begreber. Der kræves ingen API-nøgle. \n", + "Her er eksempel-URL'en til kald: `https://api.conceptnet.io/query?start=/c/en/microsoft&rel=/r/IsA&limit=10`\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": true + }, + "outputs": [], + "source": [ + "import urllib\n", + "import json\n", + "\n", + "def http(x):\n", + " response = urllib.request.urlopen(x)\n", + " data = response.read()\n", + " return data.decode('utf-8')\n", + "\n", + "def query(x):\n", + " concept = x.lower().replace(' ', '_')\n", + " url = \"https://api.conceptnet.io/query?start=/c/en/{}&rel=/r/IsA&limit=10\".format(\n", + " urllib.parse.quote(concept))\n", + " try:\n", + " result = json.loads(http(url))\n", + " except Exception:\n", + " return {}\n", + " edges = result.get('edges', [])\n", + " if not edges:\n", + " return {}\n", + " total_weight = sum(edge['weight'] for edge in edges)\n", + " if total_weight == 0:\n", + " return {}\n", + " return {edge['end']['label']: edge['weight'] / total_weight for edge in edges}\n", + "\n", + "query('microsoft')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Lad os prøve at kategorisere nyhedstitler ved hjælp af overordnede begreber. For at hente nyhedstitler vil vi bruge [NewsApi.org](http://newsapi.org) tjenesten. Du skal skaffe din egen API-nøgle for at kunne bruge tjenesten - gå til hjemmesiden og tilmeld dig en gratis udviklerplan.\n" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "trusted": true + }, + "outputs": [], + "source": [ + "newsapi_key = ''\n", + "def get_news(country='us'):\n", + " res = json.loads(http(\"https://newsapi.org/v2/top-headlines?country={0}&apiKey={1}\".format(country,newsapi_key)))\n", + " return res['articles']\n", + "\n", + "all_titles = [x['title'] for x in get_news('us')+get_news('gb')]" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['Covid-19 Live Updates: Vaccines and Boosters News - The New York Times',\n", + " 'Ukrainians Flee Mariupol as Russian Forces Push to Take Port City - The Wall Street Journal',\n", + " 'Bond Yields Jump, Stock Futures Rise After Powell Says Fed Is Ready to Be More Aggressive - The Wall Street Journal',\n", + " 'Putin critic Alexei Navalny found guilty by Russian court - New York Post ',\n", + " \"Supreme Court nominee Ketanji Brown Jackson will face questions at confirmation hearing's second day - CNN\",\n", + " '2 teachers killed at Swedish high school, student arrested - ABC News',\n", + " 'Clues to Covid-19’s Next Moves Come From Sewers - The Wall Street Journal',\n", + " 'Republicans to roll dice by grilling Jackson over child-pornography sentencing decisions | TheHill - The Hill',\n", + " '‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent',\n", + " 'NASA confirms there are 5,000 planets outside our solar system - Daily Mail',\n", + " \"US stocks whipsawed overnight after Fed Chair Powell's remarks - Fox Business\",\n", + " \"'We've learned absolutely nothing': Tests could again be in short supply if Covid surges - POLITICO\",\n", + " \"Duchess of Cambridge swaps khaki jungle gear for Vampire's Wife dress on Belize trip - Daily Mail\",\n", + " 'China searches for victims, flight recorders after first plane crash in 12 years - Reuters',\n", + " 'Second superyacht linked to Russian oligarch Abramovich docks in Turkey - Reuters',\n", + " 'Live updates: Russia stops talks with Japan over sanctions - The Associated Press - en Español',\n", + " 'Powers Remain and Threats Lurk as Women’s Sweet 16 Is Set - The New York Times',\n", + " 'Webb Space Telescope Begins Multi-Instrument Alignment - SciTechDaily',\n", + " \"UConn vs UCF - NCAA women's tournament second-round highlights - March Madness\",\n", + " 'Bucking Republican Trend, Indiana Governor Vetoes Transgender Sports Bill - The New York Times',\n", + " \"Maggie Fox dead: Coronation Street and Shameless actress dies after 'sudden accident' - Mirror Online - The Mirror\",\n", + " 'China plane crash – live: Search for survivors continues as witness describes moment flight fell from sky - The Independent',\n", + " 'Daniel Morgan murder: damning report condemns Met police - The Guardian',\n", + " 'What to expect from Rishi Sunak’s Spring Statement - BBC.com',\n", + " 'UK and Republic of Ireland in line to host Euro 2028 after no one else bids - The Guardian',\n", + " \"Friends beg Vladimir Putin's 'lover' to persuade him to end Ukraine invasion - The Mirror\",\n", + " 'Brass Eye’s outtakes show the brutal TV comedy was the tip of an iceberg - The Guardian',\n", + " \"Vladimir Putin threatens civilians to break Mariupol's spirit - The Times\",\n", + " 'Shell U-turn on Cambo oilfield would threaten green targets, say campaigners - The Guardian',\n", + " 'St Helens dog attack: Girl aged 17 months killed at home - BBC',\n", + " \"PlayStation to buy 'Assassin's Creed' veteran Jade Raymond's Haven Studios - NME\",\n", + " '‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent',\n", + " 'NASA confirms there are 5,000 planets outside our solar system - Daily Mail',\n", + " 'Nintendo Switch finally has folders • Eurogamer.net - Eurogamer.net',\n", + " 'FA to “find a solution” as Liverpool fan group blasts “shambolic” Wembley travel - This Is Anfield',\n", + " 'Manchester United transfer news LIVE Erik ten Hag latest and Man Utd manager updates - Manchester Evening News',\n", + " 'Inflation raises cost of UK government borrowing in February; crude oil up again – business live - The Guardian',\n", + " 'Alexei Navalny: Kremlin critic found guilty of large-scale fraud and contempt of court by Russian court - Sky News',\n", + " \"UK prepares to nationalize Russia natural gas giant Gazprom's retail unit - Business Insider\",\n", + " 'Zaghari-Ratcliffe: Hunt calls for inquiry into delay over Iran debt payment - The Guardian']" + ] + }, + "execution_count": 21, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "all_titles" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Først og fremmest ønsker vi at kunne udtrække navneord fra nyhedstitler. Vi vil bruge `TextBlob`-biblioteket til dette, da det forenkler mange typiske NLP-opgaver som denne.\n" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "trusted": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Requirement already satisfied: textblob in c:\\winapp\\miniconda3\\lib\\site-packages (0.17.1)\n", + "Requirement already satisfied: nltk>=3.1 in c:\\winapp\\miniconda3\\lib\\site-packages (from textblob) (3.5)\n", + "Requirement already satisfied: joblib in c:\\winapp\\miniconda3\\lib\\site-packages (from nltk>=3.1->textblob) (1.0.1)\n", + "Requirement already satisfied: regex in c:\\winapp\\miniconda3\\lib\\site-packages (from nltk>=3.1->textblob) (2021.11.10)\n", + "Requirement already satisfied: tqdm in c:\\winapp\\miniconda3\\lib\\site-packages (from nltk>=3.1->textblob) (4.61.2)\n", + "Requirement already satisfied: click in c:\\winapp\\miniconda3\\lib\\site-packages (from nltk>=3.1->textblob) (8.0.3)\n", + "Requirement already satisfied: colorama in c:\\winapp\\miniconda3\\lib\\site-packages (from click->nltk>=3.1->textblob) (0.4.4)\n", + "Finished.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "[nltk_data] Downloading package brown to\n", + "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", + "[nltk_data] Package brown is already up-to-date!\n", + "[nltk_data] Downloading package punkt to\n", + "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", + "[nltk_data] Package punkt is already up-to-date!\n", + "[nltk_data] Downloading package wordnet to\n", + "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", + "[nltk_data] Package wordnet is already up-to-date!\n", + "[nltk_data] Downloading package averaged_perceptron_tagger to\n", + "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", + "[nltk_data] Package averaged_perceptron_tagger is already up-to-\n", + "[nltk_data] date!\n", + "[nltk_data] Downloading package conll2000 to\n", + "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", + "[nltk_data] Package conll2000 is already up-to-date!\n", + "[nltk_data] Downloading package movie_reviews to\n", + "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", + "[nltk_data] Package movie_reviews is already up-to-date!\n" + ] + } + ], + "source": [ + "import sys\n", + "!{sys.executable} -m pip install textblob\n", + "!{sys.executable} -m textblob.download_corpora\n", + "from textblob import TextBlob" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "trusted": true + }, + "outputs": [ + { + "data": { + "text/plain": [ + "{'covid-19 live updates': 1,\n", + " 'vaccines': 1,\n", + " 'boosters': 1,\n", + " 'york': 4,\n", + " 'ukrainians flee mariupol': 1,\n", + " 'forces push': 1,\n", + " 'port city': 1,\n", + " 'wall street journal': 3,\n", + " 'bond yields': 1,\n", + " 'futures rise': 1,\n", + " 'powell says fed': 1,\n", + " 'ready': 1,\n", + " 'be': 1,\n", + " 'aggressive': 1,\n", + " 'putin': 3,\n", + " 'alexei navalny': 2,\n", + " 'russian': 2,\n", + " 'supreme court nominee': 1,\n", + " 'ketanji brown jackson': 1,\n", + " \"confirmation hearing 's\": 1,\n", + " 'cnn': 1,\n", + " 'swedish': 1,\n", + " 'high school': 1,\n", + " 'abc': 1,\n", + " 'clues': 1,\n", + " 'covid-19': 1,\n", + " '’ s': 2,\n", + " 'moves': 1,\n", + " 'sewers': 1,\n", + " 'roll dice': 1,\n", + " 'jackson': 1,\n", + " 'decisions |': 1,\n", + " 'thehill': 1,\n", + " 'clear': 2,\n", + " 'chemical weapons': 2,\n", + " 'ukraine': 3,\n", + " 'claims president': 2,\n", + " 'biden': 2,\n", + " 'nasa': 2,\n", + " 'solar system': 2,\n", + " 'daily mail': 3,\n", + " 'us stocks': 1,\n", + " 'fed chair powell': 1,\n", + " \"'s remarks\": 1,\n", + " 'fox': 1,\n", + " \"'we 've\": 1,\n", + " 'tests': 1,\n", + " 'covid': 1,\n", + " 'politico': 1,\n", + " 'duchess': 1,\n", + " 'cambridge': 1,\n", + " 'swaps khaki jungle gear': 1,\n", + " 'vampire': 1,\n", + " 'wife': 1,\n", + " 'belize': 1,\n", + " 'china': 2,\n", + " 'flight recorders': 1,\n", + " 'plane crash': 1,\n", + " 'reuters': 2,\n", + " 'russian oligarch': 1,\n", + " 'abramovich': 1,\n", + " 'live': 1,\n", + " 'russia': 2,\n", + " 'stops talks': 1,\n", + " 'japan': 1,\n", + " 'español': 1,\n", + " 'powers remain': 1,\n", + " 'threats lurk': 1,\n", + " 'set': 1,\n", + " 'webb': 1,\n", + " 'telescope begins multi-instrument alignment': 1,\n", + " 'scitechdaily': 1,\n", + " 'uconn': 1,\n", + " 'ucf': 1,\n", + " 'ncaa': 1,\n", + " \"women 's tournament second-round highlights\": 1,\n", + " 'march madness': 1,\n", + " 'bucking republican trend': 1,\n", + " 'indiana': 1,\n", + " 'vetoes transgender': 1,\n", + " 'bill': 1,\n", + " 'maggie fox': 1,\n", + " 'coronation': 1,\n", + " 'shameless': 1,\n", + " \"'sudden accident\": 1,\n", + " 'mirror online': 1,\n", + " 'mirror': 2,\n", + " 'plane crash –': 1,\n", + " 'search': 1,\n", + " 'moment flight': 1,\n", + " 'daniel morgan': 1,\n", + " 'report condemns': 1,\n", + " 'met': 1,\n", + " 'guardian': 6,\n", + " 'rishi sunak': 1,\n", + " '’ s spring': 1,\n", + " 'statement': 1,\n", + " 'bbc.com': 1,\n", + " 'uk': 3,\n", + " 'ireland': 1,\n", + " 'euro': 1,\n", + " 'vladimir putin': 2,\n", + " \"'s 'lover\": 1,\n", + " 'brass eye': 1,\n", + " '’ s outtakes': 1,\n", + " 'brutal tv comedy': 1,\n", + " 'threatens civilians': 1,\n", + " 'mariupol': 1,\n", + " \"'s spirit\": 1,\n", + " 'shell u-turn': 1,\n", + " 'cambo': 1,\n", + " 'green targets': 1,\n", + " 'st helens': 1,\n", + " 'dog attack': 1,\n", + " 'girl': 1,\n", + " 'bbc': 1,\n", + " 'playstation': 1,\n", + " \"'assassin 's\": 1,\n", + " 'creed': 1,\n", + " 'jade raymond': 1,\n", + " 'haven studios': 1,\n", + " 'nme': 1,\n", + " 'nintendo switch': 1,\n", + " 'folders •': 1,\n", + " 'eurogamer.net': 2,\n", + " 'fa': 1,\n", + " 'solution ”': 1,\n", + " 'liverpool': 1,\n", + " 'fan group blasts “ shambolic ”': 1,\n", + " 'wembley': 1,\n", + " 'anfield': 1,\n", + " 'manchester': 1,\n", + " 'live erik': 1,\n", + " 'hag': 1,\n", + " 'utd': 1,\n", + " 'manager updates': 1,\n", + " 'manchester evening': 1,\n", + " 'inflation': 1,\n", + " 'government borrowing': 1,\n", + " 'february': 1,\n", + " 'crude oil': 1,\n", + " '– business': 1,\n", + " 'kremlin': 1,\n", + " 'large-scale fraud': 1,\n", + " 'sky': 1,\n", + " 'natural gas': 1,\n", + " 'gazprom': 1,\n", + " 'retail unit': 1,\n", + " 'insider': 1,\n", + " 'zaghari-ratcliffe': 1,\n", + " 'hunt': 1,\n", + " 'iran': 1,\n", + " 'debt payment': 1}" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "w = {}\n", + "for x in all_titles:\n", + " for n in TextBlob(x).noun_phrases:\n", + " if n in w:\n", + " w[n].append(x)\n", + " else:\n", + " w[n]=[x]\n", + "{ x:len(w[x]) for x in w.keys()}" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Vi kan se, at substantiver ikke giver os store tematiske grupper. Lad os erstatte substantiver med mere generelle termer, der er hentet fra konceptgrafen. Dette vil tage noget tid, fordi vi foretager REST-kald for hver navneordsfrase.\n" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "trusted": true + }, + "outputs": [], + "source": [ + "w = {}\n", + "for x in all_titles:\n", + " for noun in TextBlob(x).noun_phrases:\n", + " terms = query(noun)\n", + " for term in [u for u in terms.keys() if terms[u]>0.1]:\n", + " if term in w:\n", + " w[term].append(x)\n", + " else:\n", + " w[term]=[x]" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "trusted": true + }, + "outputs": [ + { + "data": { + "text/plain": [ + "{'city': 9,\n", + " 'brand': 4,\n", + " 'place': 9,\n", + " 'town': 4,\n", + " 'factor': 4,\n", + " 'film': 4,\n", + " 'nation': 11,\n", + " 'state': 5,\n", + " 'person': 4,\n", + " 'organization': 5,\n", + " 'publication': 10,\n", + " 'market': 5,\n", + " 'economy': 4,\n", + " 'company': 6,\n", + " 'newspaper': 6,\n", + " 'relationship': 6}" + ] + }, + "execution_count": 24, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "{ x:len(w[x]) for x in w.keys() if len(w[x])>3}" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "trusted": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "ECONOMY:\n", + "China searches for victims, flight recorders after first plane crash in 12 years - Reuters\n", + "Live updates: Russia stops talks with Japan over sanctions - The Associated Press - en Español\n", + "China plane crash – live: Search for survivors continues as witness describes moment flight fell from sky - The Independent\n", + "UK prepares to nationalize Russia natural gas giant Gazprom's retail unit - Business Insider\n", + "\n", + "NATION:\n", + "‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent\n", + "Duchess of Cambridge swaps khaki jungle gear for Vampire's Wife dress on Belize trip - Daily Mail\n", + "China searches for victims, flight recorders after first plane crash in 12 years - Reuters\n", + "Live updates: Russia stops talks with Japan over sanctions - The Associated Press - en Español\n", + "Live updates: Russia stops talks with Japan over sanctions - The Associated Press - en Español\n", + "China plane crash – live: Search for survivors continues as witness describes moment flight fell from sky - The Independent\n", + "UK and Republic of Ireland in line to host Euro 2028 after no one else bids - The Guardian\n", + "Friends beg Vladimir Putin's 'lover' to persuade him to end Ukraine invasion - The Mirror\n", + "‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent\n", + "UK prepares to nationalize Russia natural gas giant Gazprom's retail unit - Business Insider\n", + "Zaghari-Ratcliffe: Hunt calls for inquiry into delay over Iran debt payment - The Guardian\n", + "\n", + "PERSON:\n", + "‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent\n", + "Duchess of Cambridge swaps khaki jungle gear for Vampire's Wife dress on Belize trip - Daily Mail\n", + "Second superyacht linked to Russian oligarch Abramovich docks in Turkey - Reuters\n", + "‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent\n" + ] + } + ], + "source": [ + "print('\\nECONOMY:\\n'+'\\n'.join(w['economy']))\n", + "print('\\nNATION:\\n'+'\\n'.join(w['nation']))\n", + "print('\\nPERSON:\\n'+'\\n'.join(w['person']))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "---\n\n\n**Ansvarsfraskrivelse**:\nDette dokument er blevet oversat ved hjælp af AI-oversættelsestjenesten [Co-op Translator](https://github.com/Azure/co-op-translator). Selvom vi bestræber os på nøjagtighed, bedes du være opmærksom på, at automatiserede oversættelser kan indeholde fejl eller unøjagtigheder. Det oprindelige dokument på dets modersmål bør betragtes som den autoritative kilde. For kritisk information anbefales professionel menneskelig oversættelse. Vi påtager os intet ansvar for misforståelser eller fejltolkninger, der måtte opstå som følge af brugen af denne oversættelse.\n\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3.7.4 64-bit (conda)", + "metadata": { + "interpreter": { + "hash": "86193a1ab0ba47eac1c69c1756090baa3b420b3eea7d4aafab8b85f8b312f0c5" + } + }, + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.5" + } + }, + "nbformat": 4, + "nbformat_minor": 2 } \ No newline at end of file diff --git a/translations/sv/.co-op-translator.json b/translations/sv/.co-op-translator.json index 0890eddf..7d82a1fb 100644 --- a/translations/sv/.co-op-translator.json +++ b/translations/sv/.co-op-translator.json @@ -6,8 +6,8 @@ "language_code": "sv" }, "README.md": { - "original_hash": "75fe3383afc51eaa84b82ace619ffea7", - "translation_date": "2026-02-06T08:21:59+00:00", + "original_hash": "9eaca839b0b3f6d7f0a195fd33cebd30", + "translation_date": "2026-02-28T09:07:31+00:00", "source_file": "README.md", "language_code": "sv" }, @@ -89,6 +89,12 @@ "source_file": "lessons/1-Intro/assignment.md", "language_code": "sv" }, + "lessons/2-Symbolic/MSConceptGraph.ipynb": { + "original_hash": "e5690bbc6e5119a96a8172ec7261db67", + "translation_date": "2026-02-28T09:03:57+00:00", + "source_file": "lessons/2-Symbolic/MSConceptGraph.ipynb", + "language_code": "sv" + }, "lessons/2-Symbolic/README.md": { "original_hash": "f9f06b266b8b2bfc6b8792ff2bb1bea4", "translation_date": "2026-01-16T02:22:50+00:00", diff --git a/translations/sv/README.md b/translations/sv/README.md index 0bccedff..4885e3a2 100644 --- a/translations/sv/README.md +++ b/translations/sv/README.md @@ -12,213 +12,222 @@ [![Microsoft Foundry Discord](https://dcbadge.limes.pink/api/server/nTYy5BXMWG)](https://discord.gg/nTYy5BXMWG) -# Artificial Intelligence for Beginners - Ett läroplan +# Artificial Intelligence for Beginners - En Läroplan -|![Sketchnote by @girlie_mac https://twitter.com/girlie_mac](https://github.com/microsoft/AI-For-Beginners/raw/main/lessons/sketchnotes/ai-overview.png)| +|![Sketchnote av @girlie_mac https://twitter.com/girlie_mac](https://github.com/microsoft/AI-For-Beginners/raw/main/lessons/sketchnotes/ai-overview.png)| |:---:| | AI For Beginners - _Sketchnote av [@girlie_mac](https://twitter.com/girlie_mac)_ | -Utforska världen av **Artificiell Intelligens** (AI) med vår 12-veckors, 24-lektioners läroplan! Den inkluderar praktiska lektioner, frågesporter och labbar. Läroplanen är nybörjarvänlig och täcker verktyg som TensorFlow och PyTorch, liksom etik inom AI. +Utforska världen av **Artificiell Intelligens** (AI) med vår 12-veckors, 24-lektioners läroplan! Den inkluderar praktiska lektioner, quiz och labbar. Läroplanen är nybörjarvänlig och täcker verktyg som TensorFlow och PyTorch, samt etik inom AI. -### 🌐 Flerspråkigt stöd -#### Stöds via GitHub Action (Automatiserat & Alltid uppdaterat) +### 🌐 Flerspråkigt Stöd + +#### Stöds via GitHub Action (Automatiserad & Alltid Uppdaterad) -[Arabic](../ar/README.md) | [Bengali](../bn/README.md) | [Bulgarian](../bg/README.md) | [Burmese (Myanmar)](../my/README.md) | [Chinese (Simplified)](../zh-CN/README.md) | [Chinese (Traditional, Hong Kong)](../zh-HK/README.md) | [Chinese (Traditional, Macau)](../zh-MO/README.md) | [Chinese (Traditional, Taiwan)](../zh-TW/README.md) | [Croatian](../hr/README.md) | [Czech](../cs/README.md) | [Danish](../da/README.md) | [Dutch](../nl/README.md) | [Estonian](../et/README.md) | [Finnish](../fi/README.md) | [French](../fr/README.md) | [German](../de/README.md) | [Greek](../el/README.md) | [Hebrew](../he/README.md) | [Hindi](../hi/README.md) | [Hungarian](../hu/README.md) | [Indonesian](../id/README.md) | [Italian](../it/README.md) | [Japanese](../ja/README.md) | [Kannada](../kn/README.md) | [Korean](../ko/README.md) | [Lithuanian](../lt/README.md) | [Malay](../ms/README.md) | [Malayalam](../ml/README.md) | [Marathi](../mr/README.md) | [Nepali](../ne/README.md) | [Nigerian Pidgin](../pcm/README.md) | [Norwegian](../no/README.md) | [Persian (Farsi)](../fa/README.md) | [Polish](../pl/README.md) | [Portuguese (Brazil)](../pt-BR/README.md) | [Portuguese (Portugal)](../pt-PT/README.md) | [Punjabi (Gurmukhi)](../pa/README.md) | [Romanian](../ro/README.md) | [Russian](../ru/README.md) | [Serbian (Cyrillic)](../sr/README.md) | [Slovak](../sk/README.md) | [Slovenian](../sl/README.md) | [Spanish](../es/README.md) | [Swahili](../sw/README.md) | [Swedish](./README.md) | [Tagalog (Filipino)](../tl/README.md) | [Tamil](../ta/README.md) | [Telugu](../te/README.md) | [Thai](../th/README.md) | [Turkish](../tr/README.md) | [Ukrainian](../uk/README.md) | [Urdu](../ur/README.md) | [Vietnamese](../vi/README.md) +[Arabiska](../ar/README.md) | [Bengali](../bn/README.md) | [Bulgariska](../bg/README.md) | [Burmesiska (Myanmar)](../my/README.md) | [Kinesiska (Förenklad)](../zh-CN/README.md) | [Kinesiska (Traditionell, Hongkong)](../zh-HK/README.md) | [Kinesiska (Traditionell, Macau)](../zh-MO/README.md) | [Kinesiska (Traditionell, Taiwan)](../zh-TW/README.md) | [Kroatiska](../hr/README.md) | [Tjeckiska](../cs/README.md) | [Danska](../da/README.md) | [Holländska](../nl/README.md) | [Estniska](../et/README.md) | [Finska](../fi/README.md) | [Franska](../fr/README.md) | [Tyska](../de/README.md) | [Grekiska](../el/README.md) | [Hebreiska](../he/README.md) | [Hindi](../hi/README.md) | [Ungerska](../hu/README.md) | [Indonesiska](../id/README.md) | [Italienska](../it/README.md) | [Japanska](../ja/README.md) | [Kannada](../kn/README.md) | [Koreanska](../ko/README.md) | [Litauiska](../lt/README.md) | [Malayiska](../ms/README.md) | [Malayalam](../ml/README.md) | [Marathi](../mr/README.md) | [Nepalesiska](../ne/README.md) | [Nigeriansk Pidgin](../pcm/README.md) | [Norska](../no/README.md) | [Persiska (Farsi)](../fa/README.md) | [Polska](../pl/README.md) | [Portugisiska (Brasilien)](../pt-BR/README.md) | [Portugisiska (Portugal)](../pt-PT/README.md) | [Punjabi (Gurmukhi)](../pa/README.md) | [Rumänska](../ro/README.md) | [Ryska](../ru/README.md) | [Serbiska (Kyrilliska)](../sr/README.md) | [Slovakiska](../sk/README.md) | [Slovenska](../sl/README.md) | [Spanska](../es/README.md) | [Swahili](../sw/README.md) | [Svenska](./README.md) | [Tagalog (Filippinska)](../tl/README.md) | [Tamil](../ta/README.md) | [Telugu](../te/README.md) | [Thailändska](../th/README.md) | [Turkiska](../tr/README.md) | [Ukrainska](../uk/README.md) | [Urdu](../ur/README.md) | [Vietnamesiska](../vi/README.md) -> **Föredrar du att klona lokalt?** - -> Detta förråd innehåller 50+ språköversättningar som avsevärt ökar nedladdningsstorleken. För att klona utan översättningar, använd sparse checkout: +> **Föredrar att klona lokalt?** +> +> Detta arkiv innehåller över 50 språköversättningar vilket avsevärt ökar nedladdningsstorleken. För att klona utan översättningar, använd sparse checkout: +> +> **Bash / macOS / Linux:** > ```bash > git clone --filter=blob:none --sparse https://github.com/microsoft/AI-For-Beginners.git > cd AI-For-Beginners > git sparse-checkout set --no-cone '/*' '!translations' '!translated_images' > ``` -> Detta ger dig allt du behöver för att genomföra kursen med en mycket snabbare nedladdning. +> +> **CMD (Windows):** +> ```cmd +> git clone --filter=blob:none --sparse https://github.com/microsoft/AI-For-Beginners.git +> cd AI-For-Beginners +> git sparse-checkout set --no-cone "/*" "!translations" "!translated_images" +> ``` +> +> Detta ger dig allt du behöver för att slutföra kursen med en mycket snabbare nedladdning. -**Om du önskar stöd för ytterligare översättningsspråk finns de listade [här](https://github.com/Azure/co-op-translator/blob/main/getting_started/supported-languages.md)** +**Om du vill att ytterligare översättningsspråk ska stödjas finns de listade [här](https://github.com/Azure/co-op-translator/blob/main/getting_started/supported-languages.md)** ## Gå med i communityn [![Microsoft Foundry Discord](https://dcbadge.limes.pink/api/server/nTYy5BXMWG)](https://discord.gg/nTYy5BXMWG) -## Vad du kommer lära dig +## Vad du kommer att lära dig -**[Kursens tankekarta](http://soshnikov.com/courses/ai-for-beginners/mindmap.html)** +**[Mindmap för Kursen](http://soshnikov.com/courses/ai-for-beginners/mindmap.html)** I denna läroplan kommer du att lära dig: -* Olika tillvägagångssätt för artificiell intelligens, inklusive den "goda gamla" symboliska metoden med **Kunskapsrepresentation** och resonemang ([GOFAI](https://en.wikipedia.org/wiki/Symbolic_artificial_intelligence)). -* **Neurala nätverk** och **Deep Learning**, vilka är kärnan i modern AI. Vi kommer att illustrera koncepten bakom dessa viktiga ämnen med kod i två av de mest populära ramverken - [TensorFlow](http://Tensorflow.org) och [PyTorch](http://pytorch.org). -* **Neurala arkitekturer** för arbete med bilder och text. Vi kommer att täcka nyare modeller men kan vara något bristfälliga i den senaste forskningen. -* Mindre populära AI-metoder, såsom **Genetiska Algoritmer** och **Multi-Agent System**. +* Olika tillvägagångssätt för Artificiell Intelligens, inklusive den "gamla goda" symboliska metoden med **Kunskapsrepresentation** och resonemang ([GOFAI](https://en.wikipedia.org/wiki/Symbolic_artificial_intelligence)). +* **Neurala Nätverk** och **Djupinlärning**, som är kärnan i modern AI. Vi kommer att illustrera koncepten bakom dessa viktiga ämnen med kod i två av de mest populära ramverken - [TensorFlow](http://Tensorflow.org) och [PyTorch](http://pytorch.org). +* **Neurala Arkitekturer** för arbete med bilder och text. Vi kommer att täcka aktuella modeller men kan sakna en del av det senaste. +* Mindre populära AI-tillvägagångssätt, såsom **Genetiska Algoritmer** och **Multi-Agent System**. Vad vi inte kommer att täcka i denna läroplan: -> [Hitta alla ytterligare resurser för denna kurs i vår Microsoft Learn-samling](https://learn.microsoft.com/en-us/collections/7w28iy2xrqzdj0?WT.mc_id=academic-77998-bethanycheum) +> [Hitta alla ytterligare resurser för denna kurs i vår Microsoft Learn samling](https://learn.microsoft.com/en-us/collections/7w28iy2xrqzdj0?WT.mc_id=academic-77998-bethanycheum) -* Affärsfall för användning av **AI inom Affärer**. Överväg att ta [Introduktion till AI för affärsanvändare](https://docs.microsoft.com/learn/paths/introduction-ai-for-business-users/?WT.mc_id=academic-77998-bethanycheum) lärväg på Microsoft Learn, eller [AI Business School](https://www.microsoft.com/ai/ai-business-school/?WT.mc_id=academic-77998-bethanycheum), utvecklad i samarbete med [INSEAD](https://www.insead.edu/). -* **Klassisk maskininlärning**, som är väl beskriven i vår [Maskininlärning för nybörjare-läroplan](http://github.com/Microsoft/ML-for-Beginners). -* Praktiska AI-applikationer byggda med **[Cognitive Services](https://azure.microsoft.com/services/cognitive-services/?WT.mc_id=academic-77998-bethanycheum)**. För detta rekommenderar vi att du börjar med moduler på Microsoft Learn för [vision](https://docs.microsoft.com/learn/paths/create-computer-vision-solutions-azure-cognitive-services/?WT.mc_id=academic-77998-bethanycheum), [naturlig språkbehandling](https://docs.microsoft.com/learn/paths/explore-natural-language-processing/?WT.mc_id=academic-77998-bethanycheum), **[Generative AI med Azure OpenAI Service](https://learn.microsoft.com/en-us/training/paths/develop-ai-solutions-azure-openai/?WT.mc_id=academic-77998-bethanycheum)** och andra. -* Specifika ML **molnramverk**, såsom [Azure Machine Learning](https://azure.microsoft.com/services/machine-learning/?WT.mc_id=academic-77998-bethanycheum), [Microsoft Fabric](https://learn.microsoft.com/en-us/training/paths/get-started-fabric/?WT.mc_id=academic-77998-bethanycheum) eller [Azure Databricks](https://docs.microsoft.com/learn/paths/data-engineer-azure-databricks?WT.mc_id=academic-77998-bethanycheum). Överväg att använda lärvägarna [Bygg och kör maskininlärningslösningar med Azure Machine Learning](https://docs.microsoft.com/learn/paths/build-ai-solutions-with-azure-ml-service/?WT.mc_id=academic-77998-bethanycheum) och [Bygg och kör maskininlärningslösningar med Azure Databricks](https://docs.microsoft.com/learn/paths/build-operate-machine-learning-solutions-azure-databricks/?WT.mc_id=academic-77998-bethanycheum). -* **Konversationell AI** och **Chattbotar**. Det finns en separat [Skapa konversationella AI-lösningar](https://docs.microsoft.com/learn/paths/create-conversational-ai-solutions/?WT.mc_id=academic-77998-bethanycheum) lärväg, och du kan också se [det här blogginlägget](https://soshnikov.com/azure/hello-bot-conversational-ai-on-microsoft-platform/) för mer detaljer. -* **Djup matematik** bakom djupinlärning. För detta rekommenderar vi [Deep Learning](https://www.amazon.com/Deep-Learning-Adaptive-Computation-Machine/dp/0262035618) av Ian Goodfellow, Yoshua Bengio och Aaron Courville, som också finns tillgänglig online på [https://www.deeplearningbook.org/](https://www.deeplearningbook.org/). +* Affärsfall för användning av **AI i verksamheter**. Överväg att ta [Introduktion till AI för affärsanvändare](https://docs.microsoft.com/learn/paths/introduction-ai-for-business-users/?WT.mc_id=academic-77998-bethanycheum) lärväg på Microsoft Learn, eller [AI Business School](https://www.microsoft.com/ai/ai-business-school/?WT.mc_id=academic-77998-bethanycheum), utvecklad i samarbete med [INSEAD](https://www.insead.edu/). +* **Klassisk Maskininlärning**, som är väl beskriven i vår [Maskininlärning för nybörjare-läroplan](http://github.com/Microsoft/ML-for-Beginners). +* Praktiska AI-applikationer byggda med **[Cognitive Services](https://azure.microsoft.com/services/cognitive-services/?WT.mc_id=academic-77998-bethanycheum)**. För detta rekommenderar vi att du börjar med Microsoft Learn-moduler för [vision](https://docs.microsoft.com/learn/paths/create-computer-vision-solutions-azure-cognitive-services/?WT.mc_id=academic-77998-bethanycheum), [naturlig språkbehandling](https://docs.microsoft.com/learn/paths/explore-natural-language-processing/?WT.mc_id=academic-77998-bethanycheum), **[Generativ AI med Azure OpenAI Service](https://learn.microsoft.com/en-us/training/paths/develop-ai-solutions-azure-openai/?WT.mc_id=academic-77998-bethanycheum)** och andra. +* Specifika ML **molnramverk**, såsom [Azure Machine Learning](https://azure.microsoft.com/services/machine-learning/?WT.mc_id=academic-77998-bethanycheum), [Microsoft Fabric](https://learn.microsoft.com/en-us/training/paths/get-started-fabric/?WT.mc_id=academic-77998-bethanycheum), eller [Azure Databricks](https://docs.microsoft.com/learn/paths/data-engineer-azure-databricks?WT.mc_id=academic-77998-bethanycheum). Överväg att använda lärvägarna [Bygg och drifta maskininlärningslösningar med Azure Machine Learning](https://docs.microsoft.com/learn/paths/build-ai-solutions-with-azure-ml-service/?WT.mc_id=academic-77998-bethanycheum) och [Bygg och drifta maskininlärningslösningar med Azure Databricks](https://docs.microsoft.com/learn/paths/build-operate-machine-learning-solutions-azure-databricks/?WT.mc_id=academic-77998-bethanycheum). +* **Konversations-AI** och **Chattbotar**. Det finns en separat [Skapa konverserande AI-lösningar](https://docs.microsoft.com/learn/paths/create-conversational-ai-solutions/?WT.mc_id=academic-77998-bethanycheum) lärväg, och du kan också referera till [det här blogginlägget](https://soshnikov.com/azure/hello-bot-conversational-ai-on-microsoft-platform/) för mer detaljer. +* **Djup matematik** bakom djupinlärning. För detta rekommenderar vi [Deep Learning](https://www.amazon.com/Deep-Learning-Adaptive-Computation-Machine/dp/0262035618) av Ian Goodfellow, Yoshua Bengio och Aaron Courville, som också finns online på [https://www.deeplearningbook.org/](https://www.deeplearningbook.org/). -För en mjuk introduktion till _AI i molnet_ kan du överväga att ta [Kom igång med artificiell intelligens på Azure](https://docs.microsoft.com/learn/paths/get-started-with-artificial-intelligence-on-azure/?WT.mc_id=academic-77998-bethanycheum) lärväg. +För en mjuk introduktion till _AI i molnet_-ämnen kan du överväga att ta [Kom igång med artificiell intelligens på Azure](https://docs.microsoft.com/learn/paths/get-started-with-artificial-intelligence-on-azure/?WT.mc_id=academic-77998-bethanycheum) lärväg. # Innehåll | | Lektionlänk | PyTorch/Keras/TensorFlow | Lab | | :-: | :------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------: | ------------------------------------------------------------------------------ | -| 0 | [Kursinställning](./lessons/0-course-setup/setup.md) | [Sätt upp din utvecklingsmiljö](./lessons/0-course-setup/how-to-run.md) | | +| 0 | [Kursinställning](./lessons/0-course-setup/setup.md) | [Ställ in din utvecklingsmiljö](./lessons/0-course-setup/how-to-run.md) | | | I | [**Introduktion till AI**](./lessons/1-Intro/README.md) | | | | 01 | [Introduktion och AI:s historia](./lessons/1-Intro/README.md) | - | - | | II | **Symbolisk AI** | | 02 | [Kunskapsrepresentation och expertsystem](./lessons/2-Symbolic/README.md) | [Expertsystem](./lessons/2-Symbolic/Animals.ipynb) / [Ontologi](./lessons/2-Symbolic/FamilyOntology.ipynb) /[Konceptgraf](./lessons/2-Symbolic/MSConceptGraph.ipynb) | | -| III | [**Introduktion till Neurala Nätverk**](./lessons/3-NeuralNetworks/README.md) ||| -| 03 | [Perceptron](./lessons/3-NeuralNetworks/03-Perceptron/README.md) | [Notebook](./lessons/3-NeuralNetworks/03-Perceptron/Perceptron.ipynb) | [Lab](./lessons/3-NeuralNetworks/03-Perceptron/lab/README.md) | -| 04 | [Flerlagers Perceptron och Skapa vårt eget ramverk](./lessons/3-NeuralNetworks/04-OwnFramework/README.md) | [Notebook](./lessons/3-NeuralNetworks/04-OwnFramework/OwnFramework.ipynb) | [Lab](./lessons/3-NeuralNetworks/04-OwnFramework/lab/README.md) | -| 05 | [Introduktion till Ramverk (PyTorch/TensorFlow) och Överanpassning](./lessons/3-NeuralNetworks/05-Frameworks/README.md) | [PyTorch](./lessons/3-NeuralNetworks/05-Frameworks/IntroPyTorch.ipynb) / [Keras](./lessons/3-NeuralNetworks/05-Frameworks/IntroKeras.ipynb) / [TensorFlow](./lessons/3-NeuralNetworks/05-Frameworks/IntroKerasTF.ipynb) | [Lab](./lessons/3-NeuralNetworks/05-Frameworks/lab/README.md) | -| IV | [**Datorseende**](./lessons/4-ComputerVision/README.md) | [PyTorch](https://docs.microsoft.com/learn/modules/intro-computer-vision-pytorch/?WT.mc_id=academic-77998-cacaste) / [TensorFlow](https://docs.microsoft.com/learn/modules/intro-computer-vision-TensorFlow/?WT.mc_id=academic-77998-cacaste)| [Utforska Datorseende på Microsoft Azure](https://learn.microsoft.com/en-us/collections/7w28iy2xrqzdj0?WT.mc_id=academic-77998-bethanycheum) | -| 06 | [Introduktion till Datorseende. OpenCV](./lessons/4-ComputerVision/06-IntroCV/README.md) | [Notebook](./lessons/4-ComputerVision/06-IntroCV/OpenCV.ipynb) | [Lab](./lessons/4-ComputerVision/06-IntroCV/lab/README.md) | -| 07 | [Konvolutionsneurala Nätverk](./lessons/4-ComputerVision/07-ConvNets/README.md) & [CNN-arkitekturer](./lessons/4-ComputerVision/07-ConvNets/CNN_Architectures.md) | [PyTorch](./lessons/4-ComputerVision/07-ConvNets/ConvNetsPyTorch.ipynb) /[TensorFlow](./lessons/4-ComputerVision/07-ConvNets/ConvNetsTF.ipynb) | [Lab](./lessons/4-ComputerVision/07-ConvNets/lab/README.md) | -| 08 | [Förtränade nätverk och Transfer Learning](./lessons/4-ComputerVision/08-TransferLearning/README.md) och [Träningsknep](./lessons/4-ComputerVision/08-TransferLearning/TrainingTricks.md) | [PyTorch](./lessons/4-ComputerVision/08-TransferLearning/TransferLearningPyTorch.ipynb) / [TensorFlow](./lessons/3-NeuralNetworks/05-Frameworks/IntroKerasTF.ipynb) | [Lab](./lessons/4-ComputerVision/08-TransferLearning/lab/README.md) | -| 09 | [Autoenkodare och VAE:er](./lessons/4-ComputerVision/09-Autoencoders/README.md) | [PyTorch](./lessons/4-ComputerVision/09-Autoencoders/AutoEncodersPyTorch.ipynb) / [TensorFlow](./lessons/4-ComputerVision/09-Autoencoders/AutoencodersTF.ipynb) | | -| 10 | [Generativa Adversariala Nätverk & Konstnärlig Stilöverföring](./lessons/4-ComputerVision/10-GANs/README.md) | [PyTorch](./lessons/4-ComputerVision/10-GANs/GANPyTorch.ipynb) / [TensorFlow](./lessons/4-ComputerVision/10-GANs/GANTF.ipynb) | | +| III | [**Introduktion till neurala nätverk**](./lessons/3-NeuralNetworks/README.md) ||| +| 03 | [Perceptron](./lessons/3-NeuralNetworks/03-Perceptron/README.md) | [Anteckningsbok](./lessons/3-NeuralNetworks/03-Perceptron/Perceptron.ipynb) | [Lab](./lessons/3-NeuralNetworks/03-Perceptron/lab/README.md) | +| 04 | [Flerlagers perceptron och att skapa vårt eget ramverk](./lessons/3-NeuralNetworks/04-OwnFramework/README.md) | [Anteckningsbok](./lessons/3-NeuralNetworks/04-OwnFramework/OwnFramework.ipynb) | [Lab](./lessons/3-NeuralNetworks/04-OwnFramework/lab/README.md) | +| 05 | [Introduktion till ramverk (PyTorch/TensorFlow) och överanpassning](./lessons/3-NeuralNetworks/05-Frameworks/README.md) | [PyTorch](./lessons/3-NeuralNetworks/05-Frameworks/IntroPyTorch.ipynb) / [Keras](./lessons/3-NeuralNetworks/05-Frameworks/IntroKeras.ipynb) / [TensorFlow](./lessons/3-NeuralNetworks/05-Frameworks/IntroKerasTF.ipynb) | [Lab](./lessons/3-NeuralNetworks/05-Frameworks/lab/README.md) | +| IV | [**Datorseende**](./lessons/4-ComputerVision/README.md) | [PyTorch](https://docs.microsoft.com/learn/modules/intro-computer-vision-pytorch/?WT.mc_id=academic-77998-cacaste) / [TensorFlow](https://docs.microsoft.com/learn/modules/intro-computer-vision-TensorFlow/?WT.mc_id=academic-77998-cacaste)| [Utforska datorseende på Microsoft Azure](https://learn.microsoft.com/en-us/collections/7w28iy2xrqzdj0?WT.mc_id=academic-77998-bethanycheum) | +| 06 | [Introduktion till datorseende. OpenCV](./lessons/4-ComputerVision/06-IntroCV/README.md) | [Anteckningsbok](./lessons/4-ComputerVision/06-IntroCV/OpenCV.ipynb) | [Lab](./lessons/4-ComputerVision/06-IntroCV/lab/README.md) | +| 07 | [Konvolutionella neurala nätverk](./lessons/4-ComputerVision/07-ConvNets/README.md) & [CNN-arkitekturer](./lessons/4-ComputerVision/07-ConvNets/CNN_Architectures.md) | [PyTorch](./lessons/4-ComputerVision/07-ConvNets/ConvNetsPyTorch.ipynb) /[TensorFlow](./lessons/4-ComputerVision/07-ConvNets/ConvNetsTF.ipynb) | [Lab](./lessons/4-ComputerVision/07-ConvNets/lab/README.md) | +| 08 | [Förtränade nätverk och transfer learning](./lessons/4-ComputerVision/08-TransferLearning/README.md) och [Träningsknep](./lessons/4-ComputerVision/08-TransferLearning/TrainingTricks.md) | [PyTorch](./lessons/4-ComputerVision/08-TransferLearning/TransferLearningPyTorch.ipynb) / [TensorFlow](./lessons/3-NeuralNetworks/05-Frameworks/IntroKerasTF.ipynb) | [Lab](./lessons/4-ComputerVision/08-TransferLearning/lab/README.md) | +| 09 | [Autoencoders och VAE:er](./lessons/4-ComputerVision/09-Autoencoders/README.md) | [PyTorch](./lessons/4-ComputerVision/09-Autoencoders/AutoEncodersPyTorch.ipynb) / [TensorFlow](./lessons/4-ComputerVision/09-Autoencoders/AutoencodersTF.ipynb) | | +| 10 | [Generativa adversariella nätverk & konstnärlig stilöverföring](./lessons/4-ComputerVision/10-GANs/README.md) | [PyTorch](./lessons/4-ComputerVision/10-GANs/GANPyTorch.ipynb) / [TensorFlow](./lessons/4-ComputerVision/10-GANs/GANTF.ipynb) | | | 11 | [Objektigenkänning](./lessons/4-ComputerVision/11-ObjectDetection/README.md) | [TensorFlow](./lessons/4-ComputerVision/11-ObjectDetection/ObjectDetection.ipynb) | [Lab](./lessons/4-ComputerVision/11-ObjectDetection/lab/README.md) | | 12 | [Semantisk segmentering. U-Net](./lessons/4-ComputerVision/12-Segmentation/README.md) | [PyTorch](./lessons/4-ComputerVision/12-Segmentation/SemanticSegmentationPytorch.ipynb) / [TensorFlow](./lessons/4-ComputerVision/12-Segmentation/SemanticSegmentationTF.ipynb) | | -| V | [**Naturlig Språkbehandling**](./lessons/5-NLP/README.md) | [PyTorch](https://docs.microsoft.com/learn/modules/intro-natural-language-processing-pytorch/?WT.mc_id=academic-77998-cacaste) /[TensorFlow](https://docs.microsoft.com/learn/modules/intro-natural-language-processing-TensorFlow/?WT.mc_id=academic-77998-cacaste) | [Utforska Naturlig Språkbehandling på Microsoft Azure](https://learn.microsoft.com/en-us/collections/7w28iy2xrqzdj0?WT.mc_id=academic-77998-bethanycheum)| +| V | [**Naturlig språkbehandling**](./lessons/5-NLP/README.md) | [PyTorch](https://docs.microsoft.com/learn/modules/intro-natural-language-processing-pytorch/?WT.mc_id=academic-77998-cacaste) /[TensorFlow](https://docs.microsoft.com/learn/modules/intro-natural-language-processing-TensorFlow/?WT.mc_id=academic-77998-cacaste) | [Utforska naturlig språkbehandling på Microsoft Azure](https://learn.microsoft.com/en-us/collections/7w28iy2xrqzdj0?WT.mc_id=academic-77998-bethanycheum)| | 13 | [Textrepresentation. Bow/TF-IDF](./lessons/5-NLP/13-TextRep/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/13-TextRep/TextRepresentationPyTorch.ipynb) / [TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/13-TextRep/TextRepresentationTF.ipynb) | | | 14 | [Semantiska ordinbäddningar. Word2Vec och GloVe](./lessons/5-NLP/14-Embeddings/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/14-Embeddings/EmbeddingsPyTorch.ipynb) / [TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/14-Embeddings/EmbeddingsTF.ipynb) | | | 15 | [Språkmodellering. Träna dina egna inbäddningar](./lessons/5-NLP/15-LanguageModeling/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/15-LanguageModeling/CBoW-PyTorch.ipynb) / [TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/15-LanguageModeling/CBoW-TF.ipynb) | [Lab](./lessons/5-NLP/15-LanguageModeling/lab/README.md) | -| 16 | [Rekursiva Neurala Nätverk](./lessons/5-NLP/16-RNN/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/16-RNN/RNNPyTorch.ipynb) / [TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/16-RNN/RNNTF.ipynb) | | -| 17 | [Generativa Rekursiva Nätverk](./lessons/5-NLP/17-GenerativeNetworks/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/17-GenerativeNetworks/GenerativePyTorch.ipynb) / [TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/17-GenerativeNetworks/GenerativeTF.ipynb) | [Lab](./lessons/5-NLP/17-GenerativeNetworks/lab/README.md) | +| 16 | [Rekursiva neurala nätverk](./lessons/5-NLP/16-RNN/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/16-RNN/RNNPyTorch.ipynb) / [TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/16-RNN/RNNTF.ipynb) | | +| 17 | [Generativa rekursiva nätverk](./lessons/5-NLP/17-GenerativeNetworks/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/17-GenerativeNetworks/GenerativePyTorch.ipynb) / [TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/17-GenerativeNetworks/GenerativeTF.ipynb) | [Lab](./lessons/5-NLP/17-GenerativeNetworks/lab/README.md) | | 18 | [Transformers. BERT.](./lessons/5-NLP/18-Transformers/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/18-Transformers/TransformersPyTorch.ipynb) /[TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/18-Transformers/TransformersTF.ipynb) | | -| 19 | [Namngiven Entitetsigenkänning](./lessons/5-NLP/19-NER/README.md) | [TensorFlow](https://microsoft.github.io/AI-For-Beginners/lessons/5-NLP/19-NER/NER-TF.ipynb) | [Lab](./lessons/5-NLP/19-NER/lab/README.md) | -| 20 | [Stora Språkmodeller, Prompt-programmering och Få-Skottsuppgifter](./lessons/5-NLP/20-LangModels/README.md) | [PyTorch](https://microsoft.github.io/AI-For-Beginners/lessons/5-NLP/20-LangModels/GPT-PyTorch.ipynb) | | +| 19 | [Named Entity Recognition](./lessons/5-NLP/19-NER/README.md) | [TensorFlow](https://microsoft.github.io/AI-For-Beginners/lessons/5-NLP/19-NER/NER-TF.ipynb) | [Lab](./lessons/5-NLP/19-NER/lab/README.md) | +| 20 | [Stora språkmodeller, promptprogrammering och few-shot-uppgifter](./lessons/5-NLP/20-LangModels/README.md) | [PyTorch](https://microsoft.github.io/AI-For-Beginners/lessons/5-NLP/20-LangModels/GPT-PyTorch.ipynb) | | | VI | **Andra AI-tekniker** || | -| 21 | [Genetiska Algoritmer](./lessons/6-Other/21-GeneticAlgorithms/README.md) | [Notebook](./lessons/6-Other/21-GeneticAlgorithms/Genetic.ipynb) | | -| 22 | [Djup Förstärkningsinlärning](./lessons/6-Other/22-DeepRL/README.md) | [PyTorch](./lessons/6-Other/22-DeepRL/CartPole-RL-PyTorch.ipynb) /[TensorFlow](./lessons/6-Other/22-DeepRL/CartPole-RL-TF.ipynb) | [Lab](./lessons/6-Other/22-DeepRL/lab/README.md) | -| 23 | [Multiagent-System](./lessons/6-Other/23-MultiagentSystems/README.md) | | | +| 21 | [Genetiska algoritmer](./lessons/6-Other/21-GeneticAlgorithms/README.md) | [Anteckningsbok](./lessons/6-Other/21-GeneticAlgorithms/Genetic.ipynb) | | +| 22 | [Djup förstärkningsinlärning](./lessons/6-Other/22-DeepRL/README.md) | [PyTorch](./lessons/6-Other/22-DeepRL/CartPole-RL-PyTorch.ipynb) /[TensorFlow](./lessons/6-Other/22-DeepRL/CartPole-RL-TF.ipynb) | [Lab](./lessons/6-Other/22-DeepRL/lab/README.md) | +| 23 | [Fleragentsystem](./lessons/6-Other/23-MultiagentSystems/README.md) | | | | VII | **AI-etik** | | | -| 24 | [AI-etik och Ansvarsfull AI](./lessons/7-Ethics/README.md) | [Microsoft Learn: Principer för Ansvarsfull AI](https://docs.microsoft.com/learn/paths/responsible-ai-business-principles/?WT.mc_id=academic-77998-cacaste) | | -| IX | **Extra** | | | -| 25 | [Multimodala nätverk, CLIP och VQGAN](./lessons/X-Extras/X1-MultiModal/README.md) | [Notebook](./lessons/X-Extras/X1-MultiModal/Clip.ipynb) | | +| 24 | [AI-etik och ansvarsfull AI](./lessons/7-Ethics/README.md) | [Microsoft Learn: Principer för ansvarsfull AI](https://docs.microsoft.com/learn/paths/responsible-ai-business-principles/?WT.mc_id=academic-77998-cacaste) | | +| IX | **Övrigt** | | | +| 25 | [Multimodala nätverk, CLIP och VQGAN](./lessons/X-Extras/X1-MultiModal/README.md) | [Anteckningsbok](./lessons/X-Extras/X1-MultiModal/Clip.ipynb) | | ## Varje lektion innehåller +* Förberedande material +* Körbara Jupyter-anteckningsböcker, som ofta är specifika för ramverket (**PyTorch** eller **TensorFlow**). Den körbara anteckningsboken innehåller också mycket teoretiskt material, så för att förstå ämnet behöver du gå igenom minst en version av anteckningsboken (antingen PyTorch eller TensorFlow). +* **Laborationer** tillgängliga för vissa ämnen, som ger dig möjlighet att prova att tillämpa det material du lärt dig på ett specifikt problem. +* Vissa avsnitt innehåller länkar till [**MS Learn**](https://learn.microsoft.com/en-us/collections/7w28iy2xrqzdj0?WT.mc_id=academic-77998-bethanycheum) moduler som täcker relaterade ämnen. -* Förhandsläsningsmaterial -* Exekverbara Jupyter Notebooks, som ofta är specifika för ramverket (**PyTorch** eller **TensorFlow**). Den exekverbara notebooken innehåller också mycket teoretiskt material, så för att förstå ämnet behöver du gå igenom minst en version av notebooken (antingen PyTorch eller TensorFlow). -* **Labbar** tillgängliga för vissa ämnen, som ger dig möjlighet att prova att tillämpa det material du har lärt dig på ett specifikt problem. -* Vissa avsnitt innehåller länkar till [**MS Learn**](https://learn.microsoft.com/en-us/collections/7w28iy2xrqzdj0?WT.mc_id=academic-77998-bethanycheum) -moduler som täcker relaterade ämnen. +## Kom igång -## Komma igång +### 🎯 Ny inom AI? Börja här! -### 🎯 Ny på AI? Börja här! - -Om du är helt ny inom AI och vill ha snabba, praktiska exempel, kolla in våra [**Nybörjarvänliga Exempel**](./examples/README.md)! Dessa inkluderar: +Om du är helt ny på AI och vill ha snabba, praktiska exempel, kolla in våra [**Nybörjarvänliga exempel**](./examples/README.md)! Dessa inkluderar: - 🌟 **Hello AI World** - Ditt första AI-program (mönsterigenkänning) -- 🧠 **Enkel Neuralt Nätverk** - Bygg ett neuralt nätverk från grunden +- 🧠 **Enkel neuralt nätverk** - Bygg ett neuralt nätverk från grunden +- 🖼️ **Bildklassificerare** - Klassificera bilder med detaljerade kommentarer +- 💬 **Textanalys av känslor** - Analysera positiv/negativ text -- 🖼️ **Bildklassificerare** - Klassificera bilder med detaljerade kommentarer -- 💬 **Textsentiment** - Analysera positiv/negativ text +Dessa exempel är utformade för att hjälpa dig att förstå AI-koncept innan du går vidare till hela kursplanen. -Dessa exempel är designade för att hjälpa dig förstå AI-koncept innan du går vidare med hela kursplanen. +### 📚 Fullständig kursuppläggning -### 📚 Fullständig kursuppsättning - -- Vi har skapat en [installationslektion](./lessons/0-course-setup/setup.md) för att hjälpa dig med att sätta upp din utvecklingsmiljö. - För lärare har vi även skapat en [kursuppsättningslektion](./lessons/0-course-setup/for-teachers.md)! -- Hur du [kör koden i VSCode eller en Codespace](./lessons/0-course-setup/how-to-run.md) +- Vi har skapat en [inställningslektion](./lessons/0-course-setup/setup.md) för att hjälpa dig att ställa in din utvecklingsmiljö. - För lärare har vi även skapat en [kursuppläggningslektion](./lessons/0-course-setup/for-teachers.md)! +- Hur man [kör koden i VSCode eller en Codespace](./lessons/0-course-setup/how-to-run.md) Följ dessa steg: -Fork:a repot: Klicka på "Fork"-knappen i det övre högra hörnet på denna sida. +Forka lagret: Klicka på "Fork" knappen uppe till höger på denna sida. -Klon repo: `git clone https://github.com/microsoft/AI-For-Beginners.git` +Klona lagret: `git clone https://github.com/microsoft/AI-For-Beginners.git` -Glöm inte att stjärnmärka (🌟) detta repo för att lättare hitta det senare. +Glöm inte att stjärnmärka (🌟) detta repo för att hitta det lättare senare. -## Träffa andra lärande +## Träffa andra studerande -Gå med i vår [officiella AI Discord-server](https://aka.ms/genai-discord?WT.mc_id=academic-105485-bethanycheum) för att träffa och nätverka med andra deltagare i kursen och få stöd. +Gå med i vår [officiella AI Discord-server](https://aka.ms/genai-discord?WT.mc_id=academic-105485-bethanycheum) för att träffa och nätverka med andra som går denna kurs och få stöd. -Om du har produktfeedback eller frågor under byggandet, besök vårt [Azure AI Foundry Developer Forum](https://aka.ms/foundry/forum) +Om du har produktfeedback eller frågor under byggandet besök vår [Azure AI Foundry Developer Forum](https://aka.ms/foundry/forum) -## Quiz +## Quizzer -> **En notis om quiz:** Alla quiz finns i mappen Quiz-app i etc\quiz-app, eller [Online Här](https://ff-quizzes.netlify.app/) De länkas från lektionerna och quiz-appen kan köras lokalt eller distribueras till Azure; följ instruktionerna i `quiz-app`-mappen. De håller på att lokaliseras successivt. +> **En notis om quizzer**: Alla quizzer finns i Quiz-app-mappen i etc\quiz-app, eller [Online Här](https://ff-quizzes.netlify.app/) De länkas från lektionerna och quiz-appen kan köras lokalt eller distribueras till Azure; följ instruktionen i `quiz-app` mappen. De håller på att översättas gradvis. ## Hjälp önskas -Har du förslag eller funnit stavfel eller kodfel? Skapa en issue eller pull request. +Har du förslag eller har hittat stav- eller kodfel? Skapa ett ärende eller en pull-begäran. -## Speciella tack +## Ett speciellt tack -* **✍️ Huvudförfattare:** [Dmitry Soshnikov](http://soshnikov.com), PhD -* **🔥 Redaktör:** [Jen Looper](https://twitter.com/jenlooper), PhD -* **🎨 Sketchnote-illustratör:** [Tomomi Imura](https://twitter.com/girlie_mac) -* **✅ Quizskapare:** [Lateefah Bello](https://github.com/CinnamonXI), [MLSA](https://studentambassadors.microsoft.com/) -* **🙏 Kärnbidragare:** [Evgenii Pishchik](https://github.com/Pe4enIks) +* **✍️ Huvudförfattare:** [Dmitry Soshnikov](http://soshnikov.com), PhD +* **🔥 Redaktör:** [Jen Looper](https://twitter.com/jenlooper), PhD +* **🎨 Sketchnote-illustratör:** [Tomomi Imura](https://twitter.com/girlie_mac) +* **✅ Quizskapare:** [Lateefah Bello](https://github.com/CinnamonXI), [MLSA](https://studentambassadors.microsoft.com/) +* **🙏 Kärnbidragsgivare:** [Evgenii Pishchik](https://github.com/Pe4enIks) ## Andra kursplaner -Vårt team producerar även andra kursplaner! Kolla in: +Vårt team producerar andra kursplaner! Kolla in: -### LangChain -[![LangChain4j for Beginners](https://img.shields.io/badge/LangChain4j%20for%20Beginners-22C55E?style=for-the-badge&&labelColor=E5E7EB&color=0553D6)](https://aka.ms/langchain4j-for-beginners) -[![LangChain.js for Beginners](https://img.shields.io/badge/LangChain.js%20for%20Beginners-22C55E?style=for-the-badge&labelColor=E5E7EB&color=0553D6)](https://aka.ms/langchainjs-for-beginners?WT.mc_id=m365-94501-dwahlin) -[![LangChain for Beginners](https://img.shields.io/badge/LangChain%20for%20Beginners-22C55E?style=for-the-badge&labelColor=E5E7EB&color=0553D6)](https://github.com/microsoft/langchain-for-beginners?WT.mc_id=m365-94501-dwahlin) +### LangChain +[![LangChain4j for Beginners](https://img.shields.io/badge/LangChain4j%20for%20Beginners-22C55E?style=for-the-badge&&labelColor=E5E7EB&color=0553D6)](https://aka.ms/langchain4j-for-beginners) +[![LangChain.js for Beginners](https://img.shields.io/badge/LangChain.js%20for%20Beginners-22C55E?style=for-the-badge&labelColor=E5E7EB&color=0553D6)](https://aka.ms/langchainjs-for-beginners?WT.mc_id=m365-94501-dwahlin) +[![LangChain for Beginners](https://img.shields.io/badge/LangChain%20for%20Beginners-22C55E?style=for-the-badge&labelColor=E5E7EB&color=0553D6)](https://github.com/microsoft/langchain-for-beginners?WT.mc_id=m365-94501-dwahlin) --- -### Azure / Edge / MCP / Agenter -[![AZD for Beginners](https://img.shields.io/badge/AZD%20for%20Beginners-0078D4?style=for-the-badge&labelColor=E5E7EB&color=0078D4)](https://github.com/microsoft/AZD-for-beginners?WT.mc_id=academic-105485-koreyst) -[![Edge AI for Beginners](https://img.shields.io/badge/Edge%20AI%20for%20Beginners-00B8E4?style=for-the-badge&labelColor=E5E7EB&color=00B8E4)](https://github.com/microsoft/edgeai-for-beginners?WT.mc_id=academic-105485-koreyst) -[![MCP for Beginners](https://img.shields.io/badge/MCP%20for%20Beginners-009688?style=for-the-badge&labelColor=E5E7EB&color=009688)](https://github.com/microsoft/mcp-for-beginners?WT.mc_id=academic-105485-koreyst) -[![AI Agents for Beginners](https://img.shields.io/badge/AI%20Agents%20for%20Beginners-00C49A?style=for-the-badge&labelColor=E5E7EB&color=00C49A)](https://github.com/microsoft/ai-agents-for-beginners?WT.mc_id=academic-105485-koreyst) +### Azure / Edge / MCP / agenter +[![AZD for Beginners](https://img.shields.io/badge/AZD%20for%20Beginners-0078D4?style=for-the-badge&labelColor=E5E7EB&color=0078D4)](https://github.com/microsoft/AZD-for-beginners?WT.mc_id=academic-105485-koreyst) +[![Edge AI for Beginners](https://img.shields.io/badge/Edge%20AI%20for%20Beginners-00B8E4?style=for-the-badge&labelColor=E5E7EB&color=00B8E4)](https://github.com/microsoft/edgeai-for-beginners?WT.mc_id=academic-105485-koreyst) +[![MCP for Beginners](https://img.shields.io/badge/MCP%20for%20Beginners-009688?style=for-the-badge&labelColor=E5E7EB&color=009688)](https://github.com/microsoft/mcp-for-beginners?WT.mc_id=academic-105485-koreyst) +[![AI Agents for Beginners](https://img.shields.io/badge/AI%20Agents%20for%20Beginners-00C49A?style=for-the-badge&labelColor=E5E7EB&color=00C49A)](https://github.com/microsoft/ai-agents-for-beginners?WT.mc_id=academic-105485-koreyst) --- -### Generativ AI-serie -[![Generative AI for Beginners](https://img.shields.io/badge/Generative%20AI%20for%20Beginners-8B5CF6?style=for-the-badge&labelColor=E5E7EB&color=8B5CF6)](https://github.com/microsoft/generative-ai-for-beginners?WT.mc_id=academic-105485-koreyst) -[![Generative AI (.NET)](https://img.shields.io/badge/Generative%20AI%20(.NET)-9333EA?style=for-the-badge&labelColor=E5E7EB&color=9333EA)](https://github.com/microsoft/Generative-AI-for-beginners-dotnet?WT.mc_id=academic-105485-koreyst) -[![Generative AI (Java)](https://img.shields.io/badge/Generative%20AI%20(Java)-C084FC?style=for-the-badge&labelColor=E5E7EB&color=C084FC)](https://github.com/microsoft/generative-ai-for-beginners-java?WT.mc_id=academic-105485-koreyst) -[![Generative AI (JavaScript)](https://img.shields.io/badge/Generative%20AI%20(JavaScript)-E879F9?style=for-the-badge&labelColor=E5E7EB&color=E879F9)](https://github.com/microsoft/generative-ai-with-javascript?WT.mc_id=academic-105485-koreyst) +### Generativ AI-serie +[![Generative AI for Beginners](https://img.shields.io/badge/Generative%20AI%20for%20Beginners-8B5CF6?style=for-the-badge&labelColor=E5E7EB&color=8B5CF6)](https://github.com/microsoft/generative-ai-for-beginners?WT.mc_id=academic-105485-koreyst) +[![Generative AI (.NET)](https://img.shields.io/badge/Generative%20AI%20(.NET)-9333EA?style=for-the-badge&labelColor=E5E7EB&color=9333EA)](https://github.com/microsoft/Generative-AI-for-beginners-dotnet?WT.mc_id=academic-105485-koreyst) +[![Generative AI (Java)](https://img.shields.io/badge/Generative%20AI%20(Java)-C084FC?style=for-the-badge&labelColor=E5E7EB&color=C084FC)](https://github.com/microsoft/generative-ai-for-beginners-java?WT.mc_id=academic-105485-koreyst) +[![Generative AI (JavaScript)](https://img.shields.io/badge/Generative%20AI%20(JavaScript)-E879F9?style=for-the-badge&labelColor=E5E7EB&color=E879F9)](https://github.com/microsoft/generative-ai-with-javascript?WT.mc_id=academic-105485-koreyst) --- -### Kärnlärande -[![ML for Beginners](https://img.shields.io/badge/ML%20for%20Beginners-22C55E?style=for-the-badge&labelColor=E5E7EB&color=22C55E)](https://aka.ms/ml-beginners?WT.mc_id=academic-105485-koreyst) -[![Data Science for Beginners](https://img.shields.io/badge/Data%20Science%20for%20Beginners-84CC16?style=for-the-badge&labelColor=E5E7EB&color=84CC16)](https://aka.ms/datascience-beginners?WT.mc_id=academic-105485-koreyst) -[![AI for Beginners](https://img.shields.io/badge/AI%20for%20Beginners-A3E635?style=for-the-badge&labelColor=E5E7EB&color=A3E635)](https://aka.ms/ai-beginners?WT.mc_id=academic-105485-koreyst) -[![Cybersecurity for Beginners](https://img.shields.io/badge/Cybersecurity%20for%20Beginners-F97316?style=for-the-badge&labelColor=E5E7EB&color=F97316)](https://github.com/microsoft/Security-101?WT.mc_id=academic-96948-sayoung) -[![Web Dev for Beginners](https://img.shields.io/badge/Web%20Dev%20for%20Beginners-EC4899?style=for-the-badge&labelColor=E5E7EB&color=EC4899)](https://aka.ms/webdev-beginners?WT.mc_id=academic-105485-koreyst) -[![IoT for Beginners](https://img.shields.io/badge/IoT%20for%20Beginners-14B8A6?style=for-the-badge&labelColor=E5E7EB&color=14B8A6)](https://aka.ms/iot-beginners?WT.mc_id=academic-105485-koreyst) -[![XR Development for Beginners](https://img.shields.io/badge/XR%20Development%20for%20Beginners-38BDF8?style=for-the-badge&labelColor=E5E7EB&color=38BDF8)](https://github.com/microsoft/xr-development-for-beginners?WT.mc_id=academic-105485-koreyst) +### Kärnkunskap +[![ML for Beginners](https://img.shields.io/badge/ML%20for%20Beginners-22C55E?style=for-the-badge&labelColor=E5E7EB&color=22C55E)](https://aka.ms/ml-beginners?WT.mc_id=academic-105485-koreyst) +[![Data Science for Beginners](https://img.shields.io/badge/Data%20Science%20for%20Beginners-84CC16?style=for-the-badge&labelColor=E5E7EB&color=84CC16)](https://aka.ms/datascience-beginners?WT.mc_id=academic-105485-koreyst) +[![AI for Beginners](https://img.shields.io/badge/AI%20for%20Beginners-A3E635?style=for-the-badge&labelColor=E5E7EB&color=A3E635)](https://aka.ms/ai-beginners?WT.mc_id=academic-105485-koreyst) +[![Cybersecurity for Beginners](https://img.shields.io/badge/Cybersecurity%20for%20Beginners-F97316?style=for-the-badge&labelColor=E5E7EB&color=F97316)](https://github.com/microsoft/Security-101?WT.mc_id=academic-96948-sayoung) +[![Web Dev for Beginners](https://img.shields.io/badge/Web%20Dev%20for%20Beginners-EC4899?style=for-the-badge&labelColor=E5E7EB&color=EC4899)](https://aka.ms/webdev-beginners?WT.mc_id=academic-105485-koreyst) +[![IoT for Beginners](https://img.shields.io/badge/IoT%20for%20Beginners-14B8A6?style=for-the-badge&labelColor=E5E7EB&color=14B8A6)](https://aka.ms/iot-beginners?WT.mc_id=academic-105485-koreyst) +[![XR Development for Beginners](https://img.shields.io/badge/XR%20Development%20for%20Beginners-38BDF8?style=for-the-badge&labelColor=E5E7EB&color=38BDF8)](https://github.com/microsoft/xr-development-for-beginners?WT.mc_id=academic-105485-koreyst) --- -### Copilot-serie -[![Copilot for AI Paired Programming](https://img.shields.io/badge/Copilot%20for%20AI%20Paired%20Programming-FACC15?style=for-the-badge&labelColor=E5E7EB&color=FACC15)](https://aka.ms/GitHubCopilotAI?WT.mc_id=academic-105485-koreyst) -[![Copilot for C#/.NET](https://img.shields.io/badge/Copilot%20for%20C%23/.NET-FBBF24?style=for-the-badge&labelColor=E5E7EB&color=FBBF24)](https://github.com/microsoft/mastering-github-copilot-for-dotnet-csharp-developers?WT.mc_id=academic-105485-koreyst) -[![Copilot Adventure](https://img.shields.io/badge/Copilot%20Adventure-FDE68A?style=for-the-badge&labelColor=E5E7EB&color=FDE68A)](https://github.com/microsoft/CopilotAdventures?WT.mc_id=academic-105485-koreyst) +### Copilot-serie +[![Copilot for AI Paired Programming](https://img.shields.io/badge/Copilot%20for%20AI%20Paired%20Programming-FACC15?style=for-the-badge&labelColor=E5E7EB&color=FACC15)](https://aka.ms/GitHubCopilotAI?WT.mc_id=academic-105485-koreyst) +[![Copilot for C#/.NET](https://img.shields.io/badge/Copilot%20for%20C%23/.NET-FBBF24?style=for-the-badge&labelColor=E5E7EB&color=FBBF24)](https://github.com/microsoft/mastering-github-copilot-for-dotnet-csharp-developers?WT.mc_id=academic-105485-koreyst) +[![Copilot Adventure](https://img.shields.io/badge/Copilot%20Adventure-FDE68A?style=for-the-badge&labelColor=E5E7EB&color=FDE68A)](https://github.com/microsoft/CopilotAdventures?WT.mc_id=academic-105485-koreyst) ## Få hjälp -Om du fastnar eller har frågor om att bygga AI-appar. Gå med andra deltagare och erfarna utvecklare i diskussioner om MCP. Det är en stödjande gemenskap där frågor är välkomna och kunskap delas fritt. +Om du kör fast eller har frågor om att bygga AI-appar. Gå med i diskussioner tillsammans med andra studerande och erfarna utvecklare om MCP. Det är en stödjande gemenskap där frågor är välkomna och kunskap delas fritt. [![Microsoft Foundry Discord](https://dcbadge.limes.pink/api/server/nTYy5BXMWG)](https://discord.gg/nTYy5BXMWG) -Om du har produktfeedback eller fel under byggande, besök: +Om du har produktfeedback eller fel under byggandet besök: [![Microsoft Foundry Developer Forum](https://img.shields.io/badge/GitHub-Microsoft_Foundry_Developer_Forum-blue?style=for-the-badge&logo=github&color=000000&logoColor=fff)](https://aka.ms/foundry/forum) --- -**Ansvarsfriskrivning**: -Detta dokument har översatts med hjälp av AI-översättningstjänsten [Co-op Translator](https://github.com/Azure/co-op-translator). Även om vi eftersträvar noggrannhet, vänligen observera att automatiska översättningar kan innehålla fel eller brister. Det ursprungliga dokumentet på dess modersmål bör betraktas som den auktoritativa källan. För kritisk information rekommenderas professionell mänsklig översättning. Vi ansvarar inte för några missförstånd eller feltolkningar som kan uppstå vid användning av denna översättning. +**Ansvarsfriskrivning**: +Detta dokument har översatts med hjälp av AI-översättningstjänsten [Co-op Translator](https://github.com/Azure/co-op-translator). Även om vi strävar efter noggrannhet, vänligen var medveten om att automatiska översättningar kan innehålla fel eller brister. Det ursprungliga dokumentet på dess modersmål bör betraktas som den auktoritativa källan. För viktig information rekommenderas professionell mänsklig översättning. Vi ansvarar inte för några missförstånd eller feltolkningar som uppstår vid användning av denna översättning. \ No newline at end of file diff --git a/translations/sv/lessons/2-Symbolic/MSConceptGraph.ipynb b/translations/sv/lessons/2-Symbolic/MSConceptGraph.ipynb index b4fc4a45..9c64fdbe 100644 --- a/translations/sv/lessons/2-Symbolic/MSConceptGraph.ipynb +++ b/translations/sv/lessons/2-Symbolic/MSConceptGraph.ipynb @@ -1,539 +1,532 @@ { - "cells": [ - { - "cell_type": "markdown", - "metadata": { - "collapsed": true - }, - "source": [ - "## Microsoft Concept Graph - DENNA API ÄR INTE LÄNGRE TILLGÄNGLIG MEN KOLLA GÄRNA PÅ NOTEBOOK FÖR ATT FÖRSTÅ KONCEPTET\n", - "\n", - "[Microsoft Concept Graph](https://concept.research.microsoft.com/) är en stor taxonomi av termer hämtade från internet, med `is-a`-relationer mellan koncept.\n", - "\n", - "Context Graph finns tillgänglig i två former:\n", - " * Stor textfil för nedladdning\n", - " * REST API\n", - "\n", - "Statistik:\n", - " * 5401933 unika koncept\n", - " * 12551613 unika instanser\n", - " * 87603947 `is-a`-relationer\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Använda webbtjänsten\n", - "\n", - "Webbtjänsten erbjuder olika anrop för att uppskatta sannolikheten för att ett koncept tillhör olika grupper. Mer information finns [här](https://concept.research.microsoft.com/Home/Api). \n", - "Här är exempel-URL för anrop: `https://api.conceptnet.io/query?start=/c/en/microsoft&rel=/r/IsA&limit=10`\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "trusted": true - }, - "outputs": [], - "source": [ - "import urllib\n", - "import json\n", - "\n", - "def http(x):\n", - " response = urllib.request.urlopen(x)\n", - " data = response.read()\n", - " return data.decode('utf-8')\n", - "\n", - "def query(x):\n", - " concept = x.lower().replace(' ', '_')\n", - " url = \"https://api.conceptnet.io/query?start=/c/en/{}&rel=/r/IsA&limit=10\".format(\n", - " urllib.parse.quote(concept))\n", - " try:\n", - " result = json.loads(http(url))\n", - " except Exception:\n", - " return {}\n", - " edges = result.get('edges', [])\n", - " if not edges:\n", - " return {}\n", - " total_weight = sum(edge['weight'] for edge in edges)\n", - " if total_weight == 0:\n", - " return {}\n", - " return {edge['end']['label']: edge['weight'] / total_weight for edge in edges}\n", - "\n", - "query('microsoft')" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Låt oss försöka kategorisera nyhetstitlarna med hjälp av överordnade koncept. För att få nyhetstitlar kommer vi att använda tjänsten [NewsApi.org](http://newsapi.org). Du behöver skaffa din egen API-nyckel för att använda tjänsten - gå till webbplatsen och registrera dig för den kostnadsfria utvecklarplanen.\n" - ] - }, - { - "cell_type": "code", - "execution_count": 20, - "metadata": { - "trusted": true - }, - "outputs": [], - "source": [ - "newsapi_key = ''\n", - "def get_news(country='us'):\n", - " res = json.loads(http(\"https://newsapi.org/v2/top-headlines?country={0}&apiKey={1}\".format(country,newsapi_key)))\n", - " return res['articles']\n", - "\n", - "all_titles = [x['title'] for x in get_news('us')+get_news('gb')]" - ] - }, - { - "cell_type": "code", - "execution_count": 21, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "['Covid-19 Live Updates: Vaccines and Boosters News - The New York Times',\n", - " 'Ukrainians Flee Mariupol as Russian Forces Push to Take Port City - The Wall Street Journal',\n", - " 'Bond Yields Jump, Stock Futures Rise After Powell Says Fed Is Ready to Be More Aggressive - The Wall Street Journal',\n", - " 'Putin critic Alexei Navalny found guilty by Russian court - New York Post ',\n", - " \"Supreme Court nominee Ketanji Brown Jackson will face questions at confirmation hearing's second day - CNN\",\n", - " '2 teachers killed at Swedish high school, student arrested - ABC News',\n", - " 'Clues to Covid-19’s Next Moves Come From Sewers - The Wall Street Journal',\n", - " 'Republicans to roll dice by grilling Jackson over child-pornography sentencing decisions | TheHill - The Hill',\n", - " '‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent',\n", - " 'NASA confirms there are 5,000 planets outside our solar system - Daily Mail',\n", - " \"US stocks whipsawed overnight after Fed Chair Powell's remarks - Fox Business\",\n", - " \"'We've learned absolutely nothing': Tests could again be in short supply if Covid surges - POLITICO\",\n", - " \"Duchess of Cambridge swaps khaki jungle gear for Vampire's Wife dress on Belize trip - Daily Mail\",\n", - " 'China searches for victims, flight recorders after first plane crash in 12 years - Reuters',\n", - " 'Second superyacht linked to Russian oligarch Abramovich docks in Turkey - Reuters',\n", - " 'Live updates: Russia stops talks with Japan over sanctions - The Associated Press - en Español',\n", - " 'Powers Remain and Threats Lurk as Women’s Sweet 16 Is Set - The New York Times',\n", - " 'Webb Space Telescope Begins Multi-Instrument Alignment - SciTechDaily',\n", - " \"UConn vs UCF - NCAA women's tournament second-round highlights - March Madness\",\n", - " 'Bucking Republican Trend, Indiana Governor Vetoes Transgender Sports Bill - The New York Times',\n", - " \"Maggie Fox dead: Coronation Street and Shameless actress dies after 'sudden accident' - Mirror Online - The Mirror\",\n", - " 'China plane crash – live: Search for survivors continues as witness describes moment flight fell from sky - The Independent',\n", - " 'Daniel Morgan murder: damning report condemns Met police - The Guardian',\n", - " 'What to expect from Rishi Sunak’s Spring Statement - BBC.com',\n", - " 'UK and Republic of Ireland in line to host Euro 2028 after no one else bids - The Guardian',\n", - " \"Friends beg Vladimir Putin's 'lover' to persuade him to end Ukraine invasion - The Mirror\",\n", - " 'Brass Eye’s outtakes show the brutal TV comedy was the tip of an iceberg - The Guardian',\n", - " \"Vladimir Putin threatens civilians to break Mariupol's spirit - The Times\",\n", - " 'Shell U-turn on Cambo oilfield would threaten green targets, say campaigners - The Guardian',\n", - " 'St Helens dog attack: Girl aged 17 months killed at home - BBC',\n", - " \"PlayStation to buy 'Assassin's Creed' veteran Jade Raymond's Haven Studios - NME\",\n", - " '‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent',\n", - " 'NASA confirms there are 5,000 planets outside our solar system - Daily Mail',\n", - " 'Nintendo Switch finally has folders • Eurogamer.net - Eurogamer.net',\n", - " 'FA to “find a solution” as Liverpool fan group blasts “shambolic” Wembley travel - This Is Anfield',\n", - " 'Manchester United transfer news LIVE Erik ten Hag latest and Man Utd manager updates - Manchester Evening News',\n", - " 'Inflation raises cost of UK government borrowing in February; crude oil up again – business live - The Guardian',\n", - " 'Alexei Navalny: Kremlin critic found guilty of large-scale fraud and contempt of court by Russian court - Sky News',\n", - " \"UK prepares to nationalize Russia natural gas giant Gazprom's retail unit - Business Insider\",\n", - " 'Zaghari-Ratcliffe: Hunt calls for inquiry into delay over Iran debt payment - The Guardian']" - ] - }, - "execution_count": 21, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "all_titles" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Först och främst vill vi kunna extrahera substantiv från nyhetstitlar. Vi kommer att använda biblioteket `TextBlob` för att göra detta, vilket förenklar många typiska NLP-uppgifter som denna.\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": { - "trusted": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Requirement already satisfied: textblob in c:\\winapp\\miniconda3\\lib\\site-packages (0.17.1)\n", - "Requirement already satisfied: nltk>=3.1 in c:\\winapp\\miniconda3\\lib\\site-packages (from textblob) (3.5)\n", - "Requirement already satisfied: joblib in c:\\winapp\\miniconda3\\lib\\site-packages (from nltk>=3.1->textblob) (1.0.1)\n", - "Requirement already satisfied: regex in c:\\winapp\\miniconda3\\lib\\site-packages (from nltk>=3.1->textblob) (2021.11.10)\n", - "Requirement already satisfied: tqdm in c:\\winapp\\miniconda3\\lib\\site-packages (from nltk>=3.1->textblob) (4.61.2)\n", - "Requirement already satisfied: click in c:\\winapp\\miniconda3\\lib\\site-packages (from nltk>=3.1->textblob) (8.0.3)\n", - "Requirement already satisfied: colorama in c:\\winapp\\miniconda3\\lib\\site-packages (from click->nltk>=3.1->textblob) (0.4.4)\n", - "Finished.\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "[nltk_data] Downloading package brown to\n", - "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", - "[nltk_data] Package brown is already up-to-date!\n", - "[nltk_data] Downloading package punkt to\n", - "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", - "[nltk_data] Package punkt is already up-to-date!\n", - "[nltk_data] Downloading package wordnet to\n", - "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", - "[nltk_data] Package wordnet is already up-to-date!\n", - "[nltk_data] Downloading package averaged_perceptron_tagger to\n", - "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", - "[nltk_data] Package averaged_perceptron_tagger is already up-to-\n", - "[nltk_data] date!\n", - "[nltk_data] Downloading package conll2000 to\n", - "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", - "[nltk_data] Package conll2000 is already up-to-date!\n", - "[nltk_data] Downloading package movie_reviews to\n", - "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", - "[nltk_data] Package movie_reviews is already up-to-date!\n" - ] - } - ], - "source": [ - "import sys\n", - "!{sys.executable} -m pip install textblob\n", - "!{sys.executable} -m textblob.download_corpora\n", - "from textblob import TextBlob" - ] - }, - { - "cell_type": "code", - "execution_count": 22, - "metadata": { - "trusted": true - }, - "outputs": [ - { - "data": { - "text/plain": [ - "{'covid-19 live updates': 1,\n", - " 'vaccines': 1,\n", - " 'boosters': 1,\n", - " 'york': 4,\n", - " 'ukrainians flee mariupol': 1,\n", - " 'forces push': 1,\n", - " 'port city': 1,\n", - " 'wall street journal': 3,\n", - " 'bond yields': 1,\n", - " 'futures rise': 1,\n", - " 'powell says fed': 1,\n", - " 'ready': 1,\n", - " 'be': 1,\n", - " 'aggressive': 1,\n", - " 'putin': 3,\n", - " 'alexei navalny': 2,\n", - " 'russian': 2,\n", - " 'supreme court nominee': 1,\n", - " 'ketanji brown jackson': 1,\n", - " \"confirmation hearing 's\": 1,\n", - " 'cnn': 1,\n", - " 'swedish': 1,\n", - " 'high school': 1,\n", - " 'abc': 1,\n", - " 'clues': 1,\n", - " 'covid-19': 1,\n", - " '’ s': 2,\n", - " 'moves': 1,\n", - " 'sewers': 1,\n", - " 'roll dice': 1,\n", - " 'jackson': 1,\n", - " 'decisions |': 1,\n", - " 'thehill': 1,\n", - " 'clear': 2,\n", - " 'chemical weapons': 2,\n", - " 'ukraine': 3,\n", - " 'claims president': 2,\n", - " 'biden': 2,\n", - " 'nasa': 2,\n", - " 'solar system': 2,\n", - " 'daily mail': 3,\n", - " 'us stocks': 1,\n", - " 'fed chair powell': 1,\n", - " \"'s remarks\": 1,\n", - " 'fox': 1,\n", - " \"'we 've\": 1,\n", - " 'tests': 1,\n", - " 'covid': 1,\n", - " 'politico': 1,\n", - " 'duchess': 1,\n", - " 'cambridge': 1,\n", - " 'swaps khaki jungle gear': 1,\n", - " 'vampire': 1,\n", - " 'wife': 1,\n", - " 'belize': 1,\n", - " 'china': 2,\n", - " 'flight recorders': 1,\n", - " 'plane crash': 1,\n", - " 'reuters': 2,\n", - " 'russian oligarch': 1,\n", - " 'abramovich': 1,\n", - " 'live': 1,\n", - " 'russia': 2,\n", - " 'stops talks': 1,\n", - " 'japan': 1,\n", - " 'español': 1,\n", - " 'powers remain': 1,\n", - " 'threats lurk': 1,\n", - " 'set': 1,\n", - " 'webb': 1,\n", - " 'telescope begins multi-instrument alignment': 1,\n", - " 'scitechdaily': 1,\n", - " 'uconn': 1,\n", - " 'ucf': 1,\n", - " 'ncaa': 1,\n", - " \"women 's tournament second-round highlights\": 1,\n", - " 'march madness': 1,\n", - " 'bucking republican trend': 1,\n", - " 'indiana': 1,\n", - " 'vetoes transgender': 1,\n", - " 'bill': 1,\n", - " 'maggie fox': 1,\n", - " 'coronation': 1,\n", - " 'shameless': 1,\n", - " \"'sudden accident\": 1,\n", - " 'mirror online': 1,\n", - " 'mirror': 2,\n", - " 'plane crash –': 1,\n", - " 'search': 1,\n", - " 'moment flight': 1,\n", - " 'daniel morgan': 1,\n", - " 'report condemns': 1,\n", - " 'met': 1,\n", - " 'guardian': 6,\n", - " 'rishi sunak': 1,\n", - " '’ s spring': 1,\n", - " 'statement': 1,\n", - " 'bbc.com': 1,\n", - " 'uk': 3,\n", - " 'ireland': 1,\n", - " 'euro': 1,\n", - " 'vladimir putin': 2,\n", - " \"'s 'lover\": 1,\n", - " 'brass eye': 1,\n", - " '’ s outtakes': 1,\n", - " 'brutal tv comedy': 1,\n", - " 'threatens civilians': 1,\n", - " 'mariupol': 1,\n", - " \"'s spirit\": 1,\n", - " 'shell u-turn': 1,\n", - " 'cambo': 1,\n", - " 'green targets': 1,\n", - " 'st helens': 1,\n", - " 'dog attack': 1,\n", - " 'girl': 1,\n", - " 'bbc': 1,\n", - " 'playstation': 1,\n", - " \"'assassin 's\": 1,\n", - " 'creed': 1,\n", - " 'jade raymond': 1,\n", - " 'haven studios': 1,\n", - " 'nme': 1,\n", - " 'nintendo switch': 1,\n", - " 'folders •': 1,\n", - " 'eurogamer.net': 2,\n", - " 'fa': 1,\n", - " 'solution ”': 1,\n", - " 'liverpool': 1,\n", - " 'fan group blasts “ shambolic ”': 1,\n", - " 'wembley': 1,\n", - " 'anfield': 1,\n", - " 'manchester': 1,\n", - " 'live erik': 1,\n", - " 'hag': 1,\n", - " 'utd': 1,\n", - " 'manager updates': 1,\n", - " 'manchester evening': 1,\n", - " 'inflation': 1,\n", - " 'government borrowing': 1,\n", - " 'february': 1,\n", - " 'crude oil': 1,\n", - " '– business': 1,\n", - " 'kremlin': 1,\n", - " 'large-scale fraud': 1,\n", - " 'sky': 1,\n", - " 'natural gas': 1,\n", - " 'gazprom': 1,\n", - " 'retail unit': 1,\n", - " 'insider': 1,\n", - " 'zaghari-ratcliffe': 1,\n", - " 'hunt': 1,\n", - " 'iran': 1,\n", - " 'debt payment': 1}" - ] - }, - "execution_count": 22, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "w = {}\n", - "for x in all_titles:\n", - " for n in TextBlob(x).noun_phrases:\n", - " if n in w:\n", - " w[n].append(x)\n", - " else:\n", - " w[n]=[x]\n", - "{ x:len(w[x]) for x in w.keys()}" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Vi kan se att substantiv inte ger oss stora tematiska grupper. Låt oss ersätta substantiv med mer generella termer som erhålls från konceptgrafen. Detta kommer att ta lite tid, eftersom vi gör REST-anrop för varje substantivfras.\n" - ] - }, - { - "cell_type": "code", - "execution_count": 23, - "metadata": { - "trusted": true - }, - "outputs": [], - "source": [ - "w = {}\n", - "for x in all_titles:\n", - " for noun in TextBlob(x).noun_phrases:\n", - " terms = query(noun)\n", - " for term in [u for u in terms.keys() if terms[u]>0.1]:\n", - " if term in w:\n", - " w[term].append(x)\n", - " else:\n", - " w[term]=[x]" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": { - "trusted": true - }, - "outputs": [ - { - "data": { - "text/plain": [ - "{'city': 9,\n", - " 'brand': 4,\n", - " 'place': 9,\n", - " 'town': 4,\n", - " 'factor': 4,\n", - " 'film': 4,\n", - " 'nation': 11,\n", - " 'state': 5,\n", - " 'person': 4,\n", - " 'organization': 5,\n", - " 'publication': 10,\n", - " 'market': 5,\n", - " 'economy': 4,\n", - " 'company': 6,\n", - " 'newspaper': 6,\n", - " 'relationship': 6}" - ] - }, - "execution_count": 24, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "{ x:len(w[x]) for x in w.keys() if len(w[x])>3}" - ] - }, - { - "cell_type": "code", - "execution_count": 27, - "metadata": { - "trusted": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "ECONOMY:\n", - "China searches for victims, flight recorders after first plane crash in 12 years - Reuters\n", - "Live updates: Russia stops talks with Japan over sanctions - The Associated Press - en Español\n", - "China plane crash – live: Search for survivors continues as witness describes moment flight fell from sky - The Independent\n", - "UK prepares to nationalize Russia natural gas giant Gazprom's retail unit - Business Insider\n", - "\n", - "NATION:\n", - "‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent\n", - "Duchess of Cambridge swaps khaki jungle gear for Vampire's Wife dress on Belize trip - Daily Mail\n", - "China searches for victims, flight recorders after first plane crash in 12 years - Reuters\n", - "Live updates: Russia stops talks with Japan over sanctions - The Associated Press - en Español\n", - "Live updates: Russia stops talks with Japan over sanctions - The Associated Press - en Español\n", - "China plane crash – live: Search for survivors continues as witness describes moment flight fell from sky - The Independent\n", - "UK and Republic of Ireland in line to host Euro 2028 after no one else bids - The Guardian\n", - "Friends beg Vladimir Putin's 'lover' to persuade him to end Ukraine invasion - The Mirror\n", - "‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent\n", - "UK prepares to nationalize Russia natural gas giant Gazprom's retail unit - Business Insider\n", - "Zaghari-Ratcliffe: Hunt calls for inquiry into delay over Iran debt payment - The Guardian\n", - "\n", - "PERSON:\n", - "‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent\n", - "Duchess of Cambridge swaps khaki jungle gear for Vampire's Wife dress on Belize trip - Daily Mail\n", - "Second superyacht linked to Russian oligarch Abramovich docks in Turkey - Reuters\n", - "‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent\n" - ] - } - ], - "source": [ - "print('\\nECONOMY:\\n'+'\\n'.join(w['economy']))\n", - "print('\\nNATION:\\n'+'\\n'.join(w['nation']))\n", - "print('\\nPERSON:\\n'+'\\n'.join(w['person']))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n---\n\n**Ansvarsfriskrivning**: \nDetta dokument har översatts med hjälp av AI-översättningstjänsten [Co-op Translator](https://github.com/Azure/co-op-translator). Även om vi strävar efter noggrannhet, bör det noteras att automatiserade översättningar kan innehålla fel eller felaktigheter. Det ursprungliga dokumentet på dess ursprungliga språk bör betraktas som den auktoritativa källan. För kritisk information rekommenderas professionell mänsklig översättning. Vi ansvarar inte för eventuella missförstånd eller feltolkningar som uppstår vid användning av denna översättning.\n" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3.7.4 64-bit (conda)", - "metadata": { - "interpreter": { - "hash": "86193a1ab0ba47eac1c69c1756090baa3b420b3eea7d4aafab8b85f8b312f0c5" - } - }, - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9.5" - }, - "coopTranslator": { - "original_hash": "7b3f1fc049371bcf8649ac9fefdf0413", - "translation_date": "2025-10-03T18:55:24+00:00", - "source_file": "lessons/2-Symbolic/MSConceptGraph.ipynb", - "language_code": "sv" - } + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Concept Graph using ConceptNet\n", + "\n", + "> **Note:** Den ursprungliga [Microsoft Concept Graph](https://concept.research.microsoft.com/)-API:n är inte längre tillgänglig. Denna anteckningsbok har uppdaterats för att använda [ConceptNet](https://conceptnet.io/) som ersättning, vilket är en fritt tillgänglig öppen kunskapsgraf med liknande `is-a`-relationer mellan koncept.\n", + "\n", + "[ConceptNet](https://conceptnet.io/) är ett stort semantiskt nätverk av koncept med relationer som `IsA`, `PartOf`, `UsedFor` och fler. Det finns tillgängligt som:\n", + " * En nedladdningsbar datafil\n", + " * Ett REST API (ingen API-nyckel krävs)\n", + "\n", + "ConceptNet statistik:\n", + " * Över 8 miljoner noder\n", + " * 21+ miljoner kanter över 83 språk\n" + ] }, - "nbformat": 4, - "nbformat_minor": 2 + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Använda ConceptNet Web Service\n", + "\n", + "[ConceptNet](https://conceptnet.io/) tillhandahåller ett REST API för att utforska `is-a` (IsA) relationer mellan begrepp. Ingen API-nyckel krävs.\n", + "Här är ett exempel-URL att anropa: `https://api.conceptnet.io/query?start=/c/en/microsoft&rel=/r/IsA&limit=10`\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": true + }, + "outputs": [], + "source": [ + "import urllib\n", + "import json\n", + "\n", + "def http(x):\n", + " response = urllib.request.urlopen(x)\n", + " data = response.read()\n", + " return data.decode('utf-8')\n", + "\n", + "def query(x):\n", + " concept = x.lower().replace(' ', '_')\n", + " url = \"https://api.conceptnet.io/query?start=/c/en/{}&rel=/r/IsA&limit=10\".format(\n", + " urllib.parse.quote(concept))\n", + " try:\n", + " result = json.loads(http(url))\n", + " except Exception:\n", + " return {}\n", + " edges = result.get('edges', [])\n", + " if not edges:\n", + " return {}\n", + " total_weight = sum(edge['weight'] for edge in edges)\n", + " if total_weight == 0:\n", + " return {}\n", + " return {edge['end']['label']: edge['weight'] / total_weight for edge in edges}\n", + "\n", + "query('microsoft')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Låt oss försöka kategorisera nyhetstitlarna med hjälp av överordnade begrepp. För att hämta nyhetstitlar kommer vi att använda tjänsten [NewsApi.org](http://newsapi.org). Du behöver skaffa din egen API-nyckel för att kunna använda tjänsten – gå till webbplatsen och registrera dig för en kostnadsfri utvecklarplan.\n" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "trusted": true + }, + "outputs": [], + "source": [ + "newsapi_key = ''\n", + "def get_news(country='us'):\n", + " res = json.loads(http(\"https://newsapi.org/v2/top-headlines?country={0}&apiKey={1}\".format(country,newsapi_key)))\n", + " return res['articles']\n", + "\n", + "all_titles = [x['title'] for x in get_news('us')+get_news('gb')]" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['Covid-19 Live Updates: Vaccines and Boosters News - The New York Times',\n", + " 'Ukrainians Flee Mariupol as Russian Forces Push to Take Port City - The Wall Street Journal',\n", + " 'Bond Yields Jump, Stock Futures Rise After Powell Says Fed Is Ready to Be More Aggressive - The Wall Street Journal',\n", + " 'Putin critic Alexei Navalny found guilty by Russian court - New York Post ',\n", + " \"Supreme Court nominee Ketanji Brown Jackson will face questions at confirmation hearing's second day - CNN\",\n", + " '2 teachers killed at Swedish high school, student arrested - ABC News',\n", + " 'Clues to Covid-19’s Next Moves Come From Sewers - The Wall Street Journal',\n", + " 'Republicans to roll dice by grilling Jackson over child-pornography sentencing decisions | TheHill - The Hill',\n", + " '‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent',\n", + " 'NASA confirms there are 5,000 planets outside our solar system - Daily Mail',\n", + " \"US stocks whipsawed overnight after Fed Chair Powell's remarks - Fox Business\",\n", + " \"'We've learned absolutely nothing': Tests could again be in short supply if Covid surges - POLITICO\",\n", + " \"Duchess of Cambridge swaps khaki jungle gear for Vampire's Wife dress on Belize trip - Daily Mail\",\n", + " 'China searches for victims, flight recorders after first plane crash in 12 years - Reuters',\n", + " 'Second superyacht linked to Russian oligarch Abramovich docks in Turkey - Reuters',\n", + " 'Live updates: Russia stops talks with Japan over sanctions - The Associated Press - en Español',\n", + " 'Powers Remain and Threats Lurk as Women’s Sweet 16 Is Set - The New York Times',\n", + " 'Webb Space Telescope Begins Multi-Instrument Alignment - SciTechDaily',\n", + " \"UConn vs UCF - NCAA women's tournament second-round highlights - March Madness\",\n", + " 'Bucking Republican Trend, Indiana Governor Vetoes Transgender Sports Bill - The New York Times',\n", + " \"Maggie Fox dead: Coronation Street and Shameless actress dies after 'sudden accident' - Mirror Online - The Mirror\",\n", + " 'China plane crash – live: Search for survivors continues as witness describes moment flight fell from sky - The Independent',\n", + " 'Daniel Morgan murder: damning report condemns Met police - The Guardian',\n", + " 'What to expect from Rishi Sunak’s Spring Statement - BBC.com',\n", + " 'UK and Republic of Ireland in line to host Euro 2028 after no one else bids - The Guardian',\n", + " \"Friends beg Vladimir Putin's 'lover' to persuade him to end Ukraine invasion - The Mirror\",\n", + " 'Brass Eye’s outtakes show the brutal TV comedy was the tip of an iceberg - The Guardian',\n", + " \"Vladimir Putin threatens civilians to break Mariupol's spirit - The Times\",\n", + " 'Shell U-turn on Cambo oilfield would threaten green targets, say campaigners - The Guardian',\n", + " 'St Helens dog attack: Girl aged 17 months killed at home - BBC',\n", + " \"PlayStation to buy 'Assassin's Creed' veteran Jade Raymond's Haven Studios - NME\",\n", + " '‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent',\n", + " 'NASA confirms there are 5,000 planets outside our solar system - Daily Mail',\n", + " 'Nintendo Switch finally has folders • Eurogamer.net - Eurogamer.net',\n", + " 'FA to “find a solution” as Liverpool fan group blasts “shambolic” Wembley travel - This Is Anfield',\n", + " 'Manchester United transfer news LIVE Erik ten Hag latest and Man Utd manager updates - Manchester Evening News',\n", + " 'Inflation raises cost of UK government borrowing in February; crude oil up again – business live - The Guardian',\n", + " 'Alexei Navalny: Kremlin critic found guilty of large-scale fraud and contempt of court by Russian court - Sky News',\n", + " \"UK prepares to nationalize Russia natural gas giant Gazprom's retail unit - Business Insider\",\n", + " 'Zaghari-Ratcliffe: Hunt calls for inquiry into delay over Iran debt payment - The Guardian']" + ] + }, + "execution_count": 21, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "all_titles" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Först och främst vill vi kunna extrahera substantiv från nyhetstitlar. Vi kommer att använda biblioteket `TextBlob` för att göra detta, vilket förenklar många typiska NLP-uppgifter som denna.\n" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "trusted": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Requirement already satisfied: textblob in c:\\winapp\\miniconda3\\lib\\site-packages (0.17.1)\n", + "Requirement already satisfied: nltk>=3.1 in c:\\winapp\\miniconda3\\lib\\site-packages (from textblob) (3.5)\n", + "Requirement already satisfied: joblib in c:\\winapp\\miniconda3\\lib\\site-packages (from nltk>=3.1->textblob) (1.0.1)\n", + "Requirement already satisfied: regex in c:\\winapp\\miniconda3\\lib\\site-packages (from nltk>=3.1->textblob) (2021.11.10)\n", + "Requirement already satisfied: tqdm in c:\\winapp\\miniconda3\\lib\\site-packages (from nltk>=3.1->textblob) (4.61.2)\n", + "Requirement already satisfied: click in c:\\winapp\\miniconda3\\lib\\site-packages (from nltk>=3.1->textblob) (8.0.3)\n", + "Requirement already satisfied: colorama in c:\\winapp\\miniconda3\\lib\\site-packages (from click->nltk>=3.1->textblob) (0.4.4)\n", + "Finished.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "[nltk_data] Downloading package brown to\n", + "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", + "[nltk_data] Package brown is already up-to-date!\n", + "[nltk_data] Downloading package punkt to\n", + "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", + "[nltk_data] Package punkt is already up-to-date!\n", + "[nltk_data] Downloading package wordnet to\n", + "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", + "[nltk_data] Package wordnet is already up-to-date!\n", + "[nltk_data] Downloading package averaged_perceptron_tagger to\n", + "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", + "[nltk_data] Package averaged_perceptron_tagger is already up-to-\n", + "[nltk_data] date!\n", + "[nltk_data] Downloading package conll2000 to\n", + "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", + "[nltk_data] Package conll2000 is already up-to-date!\n", + "[nltk_data] Downloading package movie_reviews to\n", + "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", + "[nltk_data] Package movie_reviews is already up-to-date!\n" + ] + } + ], + "source": [ + "import sys\n", + "!{sys.executable} -m pip install textblob\n", + "!{sys.executable} -m textblob.download_corpora\n", + "from textblob import TextBlob" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "trusted": true + }, + "outputs": [ + { + "data": { + "text/plain": [ + "{'covid-19 live updates': 1,\n", + " 'vaccines': 1,\n", + " 'boosters': 1,\n", + " 'york': 4,\n", + " 'ukrainians flee mariupol': 1,\n", + " 'forces push': 1,\n", + " 'port city': 1,\n", + " 'wall street journal': 3,\n", + " 'bond yields': 1,\n", + " 'futures rise': 1,\n", + " 'powell says fed': 1,\n", + " 'ready': 1,\n", + " 'be': 1,\n", + " 'aggressive': 1,\n", + " 'putin': 3,\n", + " 'alexei navalny': 2,\n", + " 'russian': 2,\n", + " 'supreme court nominee': 1,\n", + " 'ketanji brown jackson': 1,\n", + " \"confirmation hearing 's\": 1,\n", + " 'cnn': 1,\n", + " 'swedish': 1,\n", + " 'high school': 1,\n", + " 'abc': 1,\n", + " 'clues': 1,\n", + " 'covid-19': 1,\n", + " '’ s': 2,\n", + " 'moves': 1,\n", + " 'sewers': 1,\n", + " 'roll dice': 1,\n", + " 'jackson': 1,\n", + " 'decisions |': 1,\n", + " 'thehill': 1,\n", + " 'clear': 2,\n", + " 'chemical weapons': 2,\n", + " 'ukraine': 3,\n", + " 'claims president': 2,\n", + " 'biden': 2,\n", + " 'nasa': 2,\n", + " 'solar system': 2,\n", + " 'daily mail': 3,\n", + " 'us stocks': 1,\n", + " 'fed chair powell': 1,\n", + " \"'s remarks\": 1,\n", + " 'fox': 1,\n", + " \"'we 've\": 1,\n", + " 'tests': 1,\n", + " 'covid': 1,\n", + " 'politico': 1,\n", + " 'duchess': 1,\n", + " 'cambridge': 1,\n", + " 'swaps khaki jungle gear': 1,\n", + " 'vampire': 1,\n", + " 'wife': 1,\n", + " 'belize': 1,\n", + " 'china': 2,\n", + " 'flight recorders': 1,\n", + " 'plane crash': 1,\n", + " 'reuters': 2,\n", + " 'russian oligarch': 1,\n", + " 'abramovich': 1,\n", + " 'live': 1,\n", + " 'russia': 2,\n", + " 'stops talks': 1,\n", + " 'japan': 1,\n", + " 'español': 1,\n", + " 'powers remain': 1,\n", + " 'threats lurk': 1,\n", + " 'set': 1,\n", + " 'webb': 1,\n", + " 'telescope begins multi-instrument alignment': 1,\n", + " 'scitechdaily': 1,\n", + " 'uconn': 1,\n", + " 'ucf': 1,\n", + " 'ncaa': 1,\n", + " \"women 's tournament second-round highlights\": 1,\n", + " 'march madness': 1,\n", + " 'bucking republican trend': 1,\n", + " 'indiana': 1,\n", + " 'vetoes transgender': 1,\n", + " 'bill': 1,\n", + " 'maggie fox': 1,\n", + " 'coronation': 1,\n", + " 'shameless': 1,\n", + " \"'sudden accident\": 1,\n", + " 'mirror online': 1,\n", + " 'mirror': 2,\n", + " 'plane crash –': 1,\n", + " 'search': 1,\n", + " 'moment flight': 1,\n", + " 'daniel morgan': 1,\n", + " 'report condemns': 1,\n", + " 'met': 1,\n", + " 'guardian': 6,\n", + " 'rishi sunak': 1,\n", + " '’ s spring': 1,\n", + " 'statement': 1,\n", + " 'bbc.com': 1,\n", + " 'uk': 3,\n", + " 'ireland': 1,\n", + " 'euro': 1,\n", + " 'vladimir putin': 2,\n", + " \"'s 'lover\": 1,\n", + " 'brass eye': 1,\n", + " '’ s outtakes': 1,\n", + " 'brutal tv comedy': 1,\n", + " 'threatens civilians': 1,\n", + " 'mariupol': 1,\n", + " \"'s spirit\": 1,\n", + " 'shell u-turn': 1,\n", + " 'cambo': 1,\n", + " 'green targets': 1,\n", + " 'st helens': 1,\n", + " 'dog attack': 1,\n", + " 'girl': 1,\n", + " 'bbc': 1,\n", + " 'playstation': 1,\n", + " \"'assassin 's\": 1,\n", + " 'creed': 1,\n", + " 'jade raymond': 1,\n", + " 'haven studios': 1,\n", + " 'nme': 1,\n", + " 'nintendo switch': 1,\n", + " 'folders •': 1,\n", + " 'eurogamer.net': 2,\n", + " 'fa': 1,\n", + " 'solution ”': 1,\n", + " 'liverpool': 1,\n", + " 'fan group blasts “ shambolic ”': 1,\n", + " 'wembley': 1,\n", + " 'anfield': 1,\n", + " 'manchester': 1,\n", + " 'live erik': 1,\n", + " 'hag': 1,\n", + " 'utd': 1,\n", + " 'manager updates': 1,\n", + " 'manchester evening': 1,\n", + " 'inflation': 1,\n", + " 'government borrowing': 1,\n", + " 'february': 1,\n", + " 'crude oil': 1,\n", + " '– business': 1,\n", + " 'kremlin': 1,\n", + " 'large-scale fraud': 1,\n", + " 'sky': 1,\n", + " 'natural gas': 1,\n", + " 'gazprom': 1,\n", + " 'retail unit': 1,\n", + " 'insider': 1,\n", + " 'zaghari-ratcliffe': 1,\n", + " 'hunt': 1,\n", + " 'iran': 1,\n", + " 'debt payment': 1}" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "w = {}\n", + "for x in all_titles:\n", + " for n in TextBlob(x).noun_phrases:\n", + " if n in w:\n", + " w[n].append(x)\n", + " else:\n", + " w[n]=[x]\n", + "{ x:len(w[x]) for x in w.keys()}" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Vi kan se att substantiv inte ger oss stora tematiska grupper. Låt oss ersätta substantiv med mer generella termer hämtade från konceptgrafen. Detta kommer att ta lite tid eftersom vi gör ett REST-anrop för varje nominalfras.\n" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "trusted": true + }, + "outputs": [], + "source": [ + "w = {}\n", + "for x in all_titles:\n", + " for noun in TextBlob(x).noun_phrases:\n", + " terms = query(noun)\n", + " for term in [u for u in terms.keys() if terms[u]>0.1]:\n", + " if term in w:\n", + " w[term].append(x)\n", + " else:\n", + " w[term]=[x]" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "trusted": true + }, + "outputs": [ + { + "data": { + "text/plain": [ + "{'city': 9,\n", + " 'brand': 4,\n", + " 'place': 9,\n", + " 'town': 4,\n", + " 'factor': 4,\n", + " 'film': 4,\n", + " 'nation': 11,\n", + " 'state': 5,\n", + " 'person': 4,\n", + " 'organization': 5,\n", + " 'publication': 10,\n", + " 'market': 5,\n", + " 'economy': 4,\n", + " 'company': 6,\n", + " 'newspaper': 6,\n", + " 'relationship': 6}" + ] + }, + "execution_count": 24, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "{ x:len(w[x]) for x in w.keys() if len(w[x])>3}" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "trusted": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "ECONOMY:\n", + "China searches for victims, flight recorders after first plane crash in 12 years - Reuters\n", + "Live updates: Russia stops talks with Japan over sanctions - The Associated Press - en Español\n", + "China plane crash – live: Search for survivors continues as witness describes moment flight fell from sky - The Independent\n", + "UK prepares to nationalize Russia natural gas giant Gazprom's retail unit - Business Insider\n", + "\n", + "NATION:\n", + "‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent\n", + "Duchess of Cambridge swaps khaki jungle gear for Vampire's Wife dress on Belize trip - Daily Mail\n", + "China searches for victims, flight recorders after first plane crash in 12 years - Reuters\n", + "Live updates: Russia stops talks with Japan over sanctions - The Associated Press - en Español\n", + "Live updates: Russia stops talks with Japan over sanctions - The Associated Press - en Español\n", + "China plane crash – live: Search for survivors continues as witness describes moment flight fell from sky - The Independent\n", + "UK and Republic of Ireland in line to host Euro 2028 after no one else bids - The Guardian\n", + "Friends beg Vladimir Putin's 'lover' to persuade him to end Ukraine invasion - The Mirror\n", + "‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent\n", + "UK prepares to nationalize Russia natural gas giant Gazprom's retail unit - Business Insider\n", + "Zaghari-Ratcliffe: Hunt calls for inquiry into delay over Iran debt payment - The Guardian\n", + "\n", + "PERSON:\n", + "‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent\n", + "Duchess of Cambridge swaps khaki jungle gear for Vampire's Wife dress on Belize trip - Daily Mail\n", + "Second superyacht linked to Russian oligarch Abramovich docks in Turkey - Reuters\n", + "‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent\n" + ] + } + ], + "source": [ + "print('\\nECONOMY:\\n'+'\\n'.join(w['economy']))\n", + "print('\\nNATION:\\n'+'\\n'.join(w['nation']))\n", + "print('\\nPERSON:\\n'+'\\n'.join(w['person']))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "---\n\n\n**Ansvarsfriskrivning**:\nDetta dokument har översatts med hjälp av AI-översättningstjänsten [Co-op Translator](https://github.com/Azure/co-op-translator). Även om vi strävar efter noggrannhet, var god notera att automatiska översättningar kan innehålla fel eller brister. Det ursprungliga dokumentet på dess modersmål bör betraktas som den auktoritativa källan. För kritisk information rekommenderas professionell mänsklig översättning. Vi ansvarar inte för några missförstånd eller feltolkningar som uppstår till följd av användningen av denna översättning.\n\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3.7.4 64-bit (conda)", + "metadata": { + "interpreter": { + "hash": "86193a1ab0ba47eac1c69c1756090baa3b420b3eea7d4aafab8b85f8b312f0c5" + } + }, + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.5" + } + }, + "nbformat": 4, + "nbformat_minor": 2 } \ No newline at end of file diff --git a/translations/th/.co-op-translator.json b/translations/th/.co-op-translator.json index 69631064..e13a1896 100644 --- a/translations/th/.co-op-translator.json +++ b/translations/th/.co-op-translator.json @@ -6,8 +6,8 @@ "language_code": "th" }, "README.md": { - "original_hash": "75fe3383afc51eaa84b82ace619ffea7", - "translation_date": "2026-02-06T08:19:50+00:00", + "original_hash": "9eaca839b0b3f6d7f0a195fd33cebd30", + "translation_date": "2026-02-28T09:05:40+00:00", "source_file": "README.md", "language_code": "th" }, @@ -89,6 +89,12 @@ "source_file": "lessons/1-Intro/assignment.md", "language_code": "th" }, + "lessons/2-Symbolic/MSConceptGraph.ipynb": { + "original_hash": "e5690bbc6e5119a96a8172ec7261db67", + "translation_date": "2026-02-28T09:03:42+00:00", + "source_file": "lessons/2-Symbolic/MSConceptGraph.ipynb", + "language_code": "th" + }, "lessons/2-Symbolic/README.md": { "original_hash": "f9f06b266b8b2bfc6b8792ff2bb1bea4", "translation_date": "2026-01-16T02:18:27+00:00", diff --git a/translations/th/README.md b/translations/th/README.md index 36a5f84b..da429eaf 100644 --- a/translations/th/README.md +++ b/translations/th/README.md @@ -16,214 +16,218 @@ |![Sketchnote by @girlie_mac https://twitter.com/girlie_mac](https://github.com/microsoft/AI-For-Beginners/raw/main/lessons/sketchnotes/ai-overview.png)| |:---:| -| AI For Beginners - _สเก็ตช์โน้ตโดย [@girlie_mac](https://twitter.com/girlie_mac)_ | +| AI For Beginners - _Sketchnote โดย [@girlie_mac](https://twitter.com/girlie_mac)_ | -สำรวจโลกของ **ปัญญาประดิษฐ์** (AI) กับหลักสูตร 12 สัปดาห์ 24 บทเรียนของเรา! หลักสูตรนี้ประกอบด้วยบทเรียนเชิงปฏิบัติ แบบทดสอบ และห้องปฏิบัติการ หลักสูตรนี้เหมาะสำหรับผู้เริ่มต้นและครอบคลุมเครื่องมือต่างๆ เช่น TensorFlow และ PyTorch รวมถึงจริยธรรมใน AI +สำรวจโลกของ **ปัญญาประดิษฐ์** (AI) ด้วยหลักสูตร 12 สัปดาห์ 24 บทเรียนของเรา! ซึ่งประกอบด้วยบทเรียนเชิงปฏิบัติ, แบบทดสอบ และห้องปฏิบัติการ หลักสูตรนี้เหมาะสำหรับผู้เริ่มต้นและครอบคลุมเครื่องมือต่างๆ เช่น TensorFlow และ PyTorch รวมถึงจริยธรรมใน AI ### 🌐 รองรับหลายภาษา -#### รองรับผ่าน GitHub Action (ทำงานอัตโนมัติ & อัปเดตตลอดเวลา) +#### รองรับผ่าน GitHub Action (อัตโนมัติ & อัปเดตอยู่เสมอ) [Arabic](../ar/README.md) | [Bengali](../bn/README.md) | [Bulgarian](../bg/README.md) | [Burmese (Myanmar)](../my/README.md) | [Chinese (Simplified)](../zh-CN/README.md) | [Chinese (Traditional, Hong Kong)](../zh-HK/README.md) | [Chinese (Traditional, Macau)](../zh-MO/README.md) | [Chinese (Traditional, Taiwan)](../zh-TW/README.md) | [Croatian](../hr/README.md) | [Czech](../cs/README.md) | [Danish](../da/README.md) | [Dutch](../nl/README.md) | [Estonian](../et/README.md) | [Finnish](../fi/README.md) | [French](../fr/README.md) | [German](../de/README.md) | [Greek](../el/README.md) | [Hebrew](../he/README.md) | [Hindi](../hi/README.md) | [Hungarian](../hu/README.md) | [Indonesian](../id/README.md) | [Italian](../it/README.md) | [Japanese](../ja/README.md) | [Kannada](../kn/README.md) | [Korean](../ko/README.md) | [Lithuanian](../lt/README.md) | [Malay](../ms/README.md) | [Malayalam](../ml/README.md) | [Marathi](../mr/README.md) | [Nepali](../ne/README.md) | [Nigerian Pidgin](../pcm/README.md) | [Norwegian](../no/README.md) | [Persian (Farsi)](../fa/README.md) | [Polish](../pl/README.md) | [Portuguese (Brazil)](../pt-BR/README.md) | [Portuguese (Portugal)](../pt-PT/README.md) | [Punjabi (Gurmukhi)](../pa/README.md) | [Romanian](../ro/README.md) | [Russian](../ru/README.md) | [Serbian (Cyrillic)](../sr/README.md) | [Slovak](../sk/README.md) | [Slovenian](../sl/README.md) | [Spanish](../es/README.md) | [Swahili](../sw/README.md) | [Swedish](../sv/README.md) | [Tagalog (Filipino)](../tl/README.md) | [Tamil](../ta/README.md) | [Telugu](../te/README.md) | [Thai](./README.md) | [Turkish](../tr/README.md) | [Ukrainian](../uk/README.md) | [Urdu](../ur/README.md) | [Vietnamese](../vi/README.md) -> **ต้องการโคลนแบบภายในเครื่อง?** - -> ที่เก็บนี้รวมการแปลมากกว่า 50 ภาษา ซึ่งจะเพิ่มขนาดการดาวน์โหลดอย่างมาก หากต้องการโคลนโดยไม่เอาการแปล ให้ใช้ sparse checkout: +> **ต้องการโคลนแบบโลคอล?** +> +> รีโพสนี้รวมการแปลภาษากว่า 50 ภาษา ซึ่งเพิ่มขนาดการดาวน์โหลดอย่างมาก หากต้องการโคลนโดยไม่รวมการแปล ให้ใช้ sparse checkout: +> +> **Bash / macOS / Linux:** > ```bash > git clone --filter=blob:none --sparse https://github.com/microsoft/AI-For-Beginners.git > cd AI-For-Beginners > git sparse-checkout set --no-cone '/*' '!translations' '!translated_images' > ``` -> วิธีนี้จะให้ทุกสิ่งที่คุณต้องการเพื่อทำคอร์สนี้ให้เสร็จด้วยการดาวน์โหลดที่เร็วขึ้นมาก +> +> **CMD (Windows):** +> ```cmd +> git clone --filter=blob:none --sparse https://github.com/microsoft/AI-For-Beginners.git +> cd AI-For-Beginners +> git sparse-checkout set --no-cone "/*" "!translations" "!translated_images" +> ``` +> +> วิธีนี้จะให้ทุกอย่างที่คุณจำเป็นต้องใช้ในการเรียนหลักสูตรนี้โดยดาวน์โหลดได้รวดเร็วขึ้นมาก -**หากคุณต้องการให้รองรับภาษาเพิ่มอีก รายการภาษาที่รองรับอยู่ [ที่นี่](https://github.com/Azure/co-op-translator/blob/main/getting_started/supported-languages.md)** +**ถ้าคุณต้องการให้รองรับการแปลภาษาเพิ่มเติม รายชื่อภาษาที่รองรับสามารถดูได้ที่ [ที่นี่](https://github.com/Azure/co-op-translator/blob/main/getting_started/supported-languages.md)** ## เข้าร่วมชุมชน [![Microsoft Foundry Discord](https://dcbadge.limes.pink/api/server/nTYy5BXMWG)](https://discord.gg/nTYy5BXMWG) ## สิ่งที่คุณจะได้เรียนรู้ -**[แผนผังใจของหลักสูตร](http://soshnikov.com/courses/ai-for-beginners/mindmap.html)** +**[แผนผังความคิดของหลักสูตร](http://soshnikov.com/courses/ai-for-beginners/mindmap.html)** -ในหลักสูตรนี้ คุณจะได้เรียนรู้: +ในหลักสูตรนี้คุณจะได้เรียนรู้: -* วิธีการต่าง ๆ ของปัญญาประดิษฐ์ รวมถึงวิธีแบบ "เก่าแก่" ทางสัญลักษณ์ด้วย **การแทนความรู้** และการให้เหตุผล ([GOFAI](https://en.wikipedia.org/wiki/Symbolic_artificial_intelligence)) -* **โครงข่ายประสาทเทียม** และ **การเรียนรู้เชิงลึก** ซึ่งเป็นแกนหลักของ AI สมัยใหม่ เราจะอธิบายแนวคิดเบื้องหลังหัวข้อสำคัญเหล่านี้โดยใช้โค้ดในสองเฟรมเวิร์กยอดนิยม คือ [TensorFlow](http://Tensorflow.org) และ [PyTorch](http://pytorch.org) -* **สถาปัตยกรรมประสาท** สำหรับการทำงานกับภาพและข้อความ เราจะครอบคลุมโมเดลล่าสุดแม้อาจจะยังไม่ทันสมัยที่สุด -* วิธี AI ที่นิยมน้อยกว่า เช่น **อัลกอริทึมพันธุกรรม** และ **ระบบหลายเอเย่นต์** +* แนวทางที่หลากหลายของปัญญาประดิษฐ์ รวมถึงวิธีแบบ "โบราณ" ที่ใช้สัญลักษณ์กับ **การแทนความรู้** และการอนุมาน ([GOFAI](https://en.wikipedia.org/wiki/Symbolic_artificial_intelligence)) +* **โครงข่ายประสาทเทียม** และ **การเรียนรู้เชิงลึก** ซึ่งเป็นหัวใจสำคัญของ AI สมัยใหม่ เราจะอธิบายแนวคิดเบื้องหลังหัวข้อเหล่านี้ผ่านโค้ดในสองเฟรมเวิร์กที่ได้รับความนิยมมาก - [TensorFlow](http://Tensorflow.org) และ [PyTorch](http://pytorch.org) +* **สถาปัตยกรรมโครงข่ายประสาทเทียม** สำหรับการทำงานกับภาพและข้อความ เราจะครอบคลุมโมเดลล่าสุดแม้อาจจะยังไม่ล้ำหน้าไปถึงขั้นความเป็น state-of-the-art +* แนวทาง AI ที่ไม่เป็นที่นิยมมาก เช่น **อัลกอริทึมทางพันธุกรรม** และ **ระบบตัวแทนหลายตัว** -สิ่งที่เราจะไม่กล่าวถึงในหลักสูตรนี้: +สิ่งที่เราจะไม่ครอบคลุมในหลักสูตรนี้: -> [ค้นหาทรัพยากรเพิ่มเติมทั้งหมดสำหรับหลักสูตรนี้ได้ที่คอลเลกชัน Microsoft Learn ของเรา](https://learn.microsoft.com/en-us/collections/7w28iy2xrqzdj0?WT.mc_id=academic-77998-bethanycheum) +> [ค้นหาแหล่งข้อมูลเพิ่มเติมทั้งหมดสำหรับหลักสูตรนี้ได้ในคอลเล็กชัน Microsoft Learn ของเรา](https://learn.microsoft.com/en-us/collections/7w28iy2xrqzdj0?WT.mc_id=academic-77998-bethanycheum) -* กรณีธุรกิจของการใช้ **AI ในธุรกิจ** แนะนำให้ลองเรียนเส้นทาง [เกริ่นนำ AI สำหรับผู้ใช้งานธุรกิจ](https://docs.microsoft.com/learn/paths/introduction-ai-for-business-users/?WT.mc_id=academic-77998-bethanycheum) บน Microsoft Learn หรือ [AI Business School](https://www.microsoft.com/ai/ai-business-school/?WT.mc_id=academic-77998-bethanycheum) ซึ่งพัฒนาร่วมกับ [INSEAD](https://www.insead.edu/) -* **Machine Learning แบบคลาสสิก** ซึ่งได้รับการอธิบายอย่างดีใน [Machine Learning for Beginners Curriculum](http://github.com/Microsoft/ML-for-Beginners) -* แอปพลิเคชัน AI เชิงปฏิบัติที่สร้างด้วย **[Cognitive Services](https://azure.microsoft.com/services/cognitive-services/?WT.mc_id=academic-77998-bethanycheum)** เราแนะนำเริ่มจากโมดูล Microsoft Learn สำหรับ [การมองเห็น](https://docs.microsoft.com/learn/paths/create-computer-vision-solutions-azure-cognitive-services/?WT.mc_id=academic-77998-bethanycheum), [การประมวลผลภาษาธรรมชาติ](https://docs.microsoft.com/learn/paths/explore-natural-language-processing/?WT.mc_id=academic-77998-bethanycheum), **[Generative AI กับ Azure OpenAI Service](https://learn.microsoft.com/en-us/training/paths/develop-ai-solutions-azure-openai/?WT.mc_id=academic-77998-bethanycheum)** และอื่น ๆ -* เฟรมเวิร์ก ML เฉพาะทางบนคลาวด์ เช่น [Azure Machine Learning](https://azure.microsoft.com/services/machine-learning/?WT.mc_id=academic-77998-bethanycheum), [Microsoft Fabric](https://learn.microsoft.com/en-us/training/paths/get-started-fabric/?WT.mc_id=academic-77998-bethanycheum) หรือ [Azure Databricks](https://docs.microsoft.com/learn/paths/data-engineer-azure-databricks?WT.mc_id=academic-77998-bethanycheum) แนะนำใช้เส้นทางการเรียน [Build and operate machine learning solutions with Azure Machine Learning](https://docs.microsoft.com/learn/paths/build-ai-solutions-with-azure-ml-service/?WT.mc_id=academic-77998-bethanycheum) และ [Build and Operate Machine Learning Solutions with Azure Databricks](https://docs.microsoft.com/learn/paths/build-operate-machine-learning-solutions-azure-databricks/?WT.mc_id=academic-77998-bethanycheum) -* **Conversational AI** และ **แชทบอท** มีเส้นทางเรียนแยก [Create conversational AI solutions](https://docs.microsoft.com/learn/paths/create-conversational-ai-solutions/?WT.mc_id=academic-77998-bethanycheum) และคุณยังสามารถอ้างอิง [โพสต์บล็อกนี้](https://soshnikov.com/azure/hello-bot-conversational-ai-on-microsoft-platform/) เพื่อรายละเอียดเพิ่มเติม -* **คณิตศาสตร์เชิงลึก** เบื้องหลังการเรียนรู้เชิงลึก เราขอแนะนำหนังสือ [Deep Learning](https://www.amazon.com/Deep-Learning-Adaptive-Computation-Machine/dp/0262035618) โดย Ian Goodfellow, Yoshua Bengio และ Aaron Courville ซึ่งมีให้บริการออนไลน์ที่ [https://www.deeplearningbook.org/](https://www.deeplearningbook.org/) +* กรณีการใช้งานธุรกิจของ **AI ในธุรกิจ** พิจารณาการเรียนเส้นทาง [แนะนำ AI สำหรับผู้ใช้ธุรกิจ](https://docs.microsoft.com/learn/paths/introduction-ai-for-business-users/?WT.mc_id=academic-77998-bethanycheum) บน Microsoft Learn หรือ [AI Business School](https://www.microsoft.com/ai/ai-business-school/?WT.mc_id=academic-77998-bethanycheum) ที่พัฒนาร่วมกับ [INSEAD](https://www.insead.edu/) +* **แมชชีนเลิร์นนิงคลาสสิก** ซึ่งมีคำอธิบายอย่างดีใน [หลักสูตร Machine Learning สำหรับผู้เริ่มต้น](http://github.com/Microsoft/ML-for-Beginners) +* การประยุกต์ใช้งาน AI เชิงปฏิบัติที่สร้างขึ้นด้วย **[Cognitive Services](https://azure.microsoft.com/services/cognitive-services/?WT.mc_id=academic-77998-bethanycheum)** สำหรับเรื่องนี้แนะนำให้เริ่มต้นที่โมดูล Microsoft Learn สำหรับ [การมองเห็น](https://docs.microsoft.com/learn/paths/create-computer-vision-solutions-azure-cognitive-services/?WT.mc_id=academic-77998-bethanycheum), [การประมวลผลภาษาธรรมชาติ](https://docs.microsoft.com/learn/paths/explore-natural-language-processing/?WT.mc_id=academic-77998-bethanycheum), **[Generative AI กับ Azure OpenAI Service](https://learn.microsoft.com/en-us/training/paths/develop-ai-solutions-azure-openai/?WT.mc_id=academic-77998-bethanycheum)** และอื่นๆ +* เฟรมเวิร์กคลาวด์เฉพาะทาง ML เช่น [Azure Machine Learning](https://azure.microsoft.com/services/machine-learning/?WT.mc_id=academic-77998-bethanycheum), [Microsoft Fabric](https://learn.microsoft.com/en-us/training/paths/get-started-fabric/?WT.mc_id=academic-77998-bethanycheum) หรือ [Azure Databricks](https://docs.microsoft.com/learn/paths/data-engineer-azure-databricks?WT.mc_id=academic-77998-bethanycheum) พิจารณาใช้เส้นทางการเรียนรู้ [สร้างและดำเนินการโซลูชันแมชชีนเลิร์นนิงด้วย Azure Machine Learning](https://docs.microsoft.com/learn/paths/build-ai-solutions-with-azure-ml-service/?WT.mc_id=academic-77998-bethanycheum) และ [สร้างและดำเนินการโซลูชันแมชชีนเลิร์นนิงด้วย Azure Databricks](https://docs.microsoft.com/learn/paths/build-operate-machine-learning-solutions-azure-databricks/?WT.mc_id=academic-77998-bethanycheum) +* **AI เชิงสนทนา** และ **แชทบอท** มีเส้นทางการเรียนรู้แยกต่างหาก [สร้างโซลูชัน AI เชิงสนทนา](https://docs.microsoft.com/learn/paths/create-conversational-ai-solutions/?WT.mc_id=academic-77998-bethanycheum) และคุณยังสามารถอ้างอิง [โพสต์บล็อกนี้](https://soshnikov.com/azure/hello-bot-conversational-ai-on-microsoft-platform/) สำหรับรายละเอียดเพิ่มเติม +* **คณิตศาสตร์ลึก** ที่อยู่เบื้องหลังการเรียนรู้เชิงลึก สำหรับเรื่องนี้ เราแนะนำ [Deep Learning](https://www.amazon.com/Deep-Learning-Adaptive-Computation-Machine/dp/0262035618) โดย Ian Goodfellow, Yoshua Bengio และ Aaron Courville ซึ่งก็มีเวอร์ชันออนไลน์ที่ [https://www.deeplearningbook.org/](https://www.deeplearningbook.org/) -สำหรับการแนะนำเบื้องต้นเรื่อง _AI บนคลาวด์_ คุณอาจสนใจเข้าร่วมเส้นทางการเรียน [Get started with artificial intelligence on Azure](https://docs.microsoft.com/learn/paths/get-started-with-artificial-intelligence-on-azure/?WT.mc_id=academic-77998-bethanycheum) +สำหรับการแนะนำหัวข้อ _AI บนคลาวด์_ อย่างนุ่มนวล คุณอาจพิจารณาเส้นทางการเรียนรู้ [เริ่มต้นกับปัญญาประดิษฐ์บน Azure](https://docs.microsoft.com/learn/paths/get-started-with-artificial-intelligence-on-azure/?WT.mc_id=academic-77998-bethanycheum) # เนื้อหา -| | ลิงก์บทเรียน | PyTorch/Keras/TensorFlow | ห้องปฏิบัติการ | +| | Lesson Link | PyTorch/Keras/TensorFlow | Lab | | :-: | :------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------: | ------------------------------------------------------------------------------ | -| 0 | [ตั้งค่าคอร์ส](./lessons/0-course-setup/setup.md) | [ตั้งค่าสภาพแวดล้อมพัฒนาของคุณ](./lessons/0-course-setup/how-to-run.md) | | -| I | [**แนะนำสู่ AI**](./lessons/1-Intro/README.md) | | | +| 0 | [Course Setup](./lessons/0-course-setup/setup.md) | [ตั้งค่าสภาพแวดล้อมการพัฒนาของคุณ](./lessons/0-course-setup/how-to-run.md) | | +| I | [**แนะนำ AI**](./lessons/1-Intro/README.md) | | | | 01 | [แนะนำและประวัติของ AI](./lessons/1-Intro/README.md) | - | - | -| II | **AI ทางสัญลักษณ์** | -| 02 | [การแทนความรู้และระบบผู้เชี่ยวชาญ](./lessons/2-Symbolic/README.md) | [ระบบผู้เชี่ยวชาญ](./lessons/2-Symbolic/Animals.ipynb) / [ออนโทโลยี](./lessons/2-Symbolic/FamilyOntology.ipynb) /[กราฟแนวคิด](./lessons/2-Symbolic/MSConceptGraph.ipynb) | | -| III | [**แนะนำเกี่ยวกับโครงข่ายประสาทเทียม**](./lessons/3-NeuralNetworks/README.md) ||| -| 03 | [Perceptron](./lessons/3-NeuralNetworks/03-Perceptron/README.md) | [Notebook](./lessons/3-NeuralNetworks/03-Perceptron/Perceptron.ipynb) | [Lab](./lessons/3-NeuralNetworks/03-Perceptron/lab/README.md) | -| 04 | [Multi-Layered Perceptron และการสร้าง Framework ของเราเอง](./lessons/3-NeuralNetworks/04-OwnFramework/README.md) | [Notebook](./lessons/3-NeuralNetworks/04-OwnFramework/OwnFramework.ipynb) | [Lab](./lessons/3-NeuralNetworks/04-OwnFramework/lab/README.md) | -| 05 | [แนะนำ Frameworks (PyTorch/TensorFlow) และการ overfitting](./lessons/3-NeuralNetworks/05-Frameworks/README.md) | [PyTorch](./lessons/3-NeuralNetworks/05-Frameworks/IntroPyTorch.ipynb) / [Keras](./lessons/3-NeuralNetworks/05-Frameworks/IntroKeras.ipynb) / [TensorFlow](./lessons/3-NeuralNetworks/05-Frameworks/IntroKerasTF.ipynb) | [Lab](./lessons/3-NeuralNetworks/05-Frameworks/lab/README.md) | +| II | **AI สัญลักษณ์** | +| 02 | [การแสดงความรู้และระบบผู้เชี่ยวชาญ](./lessons/2-Symbolic/README.md) | [ระบบผู้เชี่ยวชาญ](./lessons/2-Symbolic/Animals.ipynb) / [ออนโทโลยี](./lessons/2-Symbolic/FamilyOntology.ipynb) /[กราฟแนวคิด](./lessons/2-Symbolic/MSConceptGraph.ipynb) | | +| III | [**บทนำสู่โครงข่ายประสาทเทียม**](./lessons/3-NeuralNetworks/README.md) ||| +| 03 | [เพอร์เซปตรอน](./lessons/3-NeuralNetworks/03-Perceptron/README.md) | [สมุดบันทึก](./lessons/3-NeuralNetworks/03-Perceptron/Perceptron.ipynb) | [ห้องปฏิบัติการ](./lessons/3-NeuralNetworks/03-Perceptron/lab/README.md) | +| 04 | [เพอร์เซปตรอนหลายชั้นและการสร้างกรอบงานของเราเอง](./lessons/3-NeuralNetworks/04-OwnFramework/README.md) | [สมุดบันทึก](./lessons/3-NeuralNetworks/04-OwnFramework/OwnFramework.ipynb) | [ห้องปฏิบัติการ](./lessons/3-NeuralNetworks/04-OwnFramework/lab/README.md) | +| 05 | [บทนำสู่กรอบงาน (PyTorch/TensorFlow) และปัญหาการฝึกเกิน](./lessons/3-NeuralNetworks/05-Frameworks/README.md) | [PyTorch](./lessons/3-NeuralNetworks/05-Frameworks/IntroPyTorch.ipynb) / [Keras](./lessons/3-NeuralNetworks/05-Frameworks/IntroKeras.ipynb) / [TensorFlow](./lessons/3-NeuralNetworks/05-Frameworks/IntroKerasTF.ipynb) | [ห้องปฏิบัติการ](./lessons/3-NeuralNetworks/05-Frameworks/lab/README.md) | | IV | [**คอมพิวเตอร์วิชัน**](./lessons/4-ComputerVision/README.md) | [PyTorch](https://docs.microsoft.com/learn/modules/intro-computer-vision-pytorch/?WT.mc_id=academic-77998-cacaste) / [TensorFlow](https://docs.microsoft.com/learn/modules/intro-computer-vision-TensorFlow/?WT.mc_id=academic-77998-cacaste)| [สำรวจคอมพิวเตอร์วิชันบน Microsoft Azure](https://learn.microsoft.com/en-us/collections/7w28iy2xrqzdj0?WT.mc_id=academic-77998-bethanycheum) | -| 06 | [แนะนำคอมพิวเตอร์วิชัน OpenCV](./lessons/4-ComputerVision/06-IntroCV/README.md) | [Notebook](./lessons/4-ComputerVision/06-IntroCV/OpenCV.ipynb) | [Lab](./lessons/4-ComputerVision/06-IntroCV/lab/README.md) | -| 07 | [โครงข่ายประสาทเทียมคอนโวลูชัน (CNN)](./lessons/4-ComputerVision/07-ConvNets/README.md) & [สถาปัตยกรรม CNN](./lessons/4-ComputerVision/07-ConvNets/CNN_Architectures.md) | [PyTorch](./lessons/4-ComputerVision/07-ConvNets/ConvNetsPyTorch.ipynb) /[TensorFlow](./lessons/4-ComputerVision/07-ConvNets/ConvNetsTF.ipynb) | [Lab](./lessons/4-ComputerVision/07-ConvNets/lab/README.md) | -| 08 | [โครงข่ายที่ผ่านการฝึกแล้วและการถ่ายโอนเรียนรู้](./lessons/4-ComputerVision/08-TransferLearning/README.md) และ [เทคนิคการฝึก](./lessons/4-ComputerVision/08-TransferLearning/TrainingTricks.md) | [PyTorch](./lessons/4-ComputerVision/08-TransferLearning/TransferLearningPyTorch.ipynb) / [TensorFlow](./lessons/3-NeuralNetworks/05-Frameworks/IntroKerasTF.ipynb) | [Lab](./lessons/4-ComputerVision/08-TransferLearning/lab/README.md) | -| 09 | [ออโต้เอนโค้ดเดอร์และ VAEs](./lessons/4-ComputerVision/09-Autoencoders/README.md) | [PyTorch](./lessons/4-ComputerVision/09-Autoencoders/AutoEncodersPyTorch.ipynb) / [TensorFlow](./lessons/4-ComputerVision/09-Autoencoders/AutoencodersTF.ipynb) | | -| 10 | [โครงข่ายแข่งขันสร้างสรรค์ (GAN) และการถ่ายโอนสไตล์ศิลปะ](./lessons/4-ComputerVision/10-GANs/README.md) | [PyTorch](./lessons/4-ComputerVision/10-GANs/GANPyTorch.ipynb) / [TensorFlow](./lessons/4-ComputerVision/10-GANs/GANTF.ipynb) | | -| 11 | [การตรวจจับวัตถุ](./lessons/4-ComputerVision/11-ObjectDetection/README.md) | [TensorFlow](./lessons/4-ComputerVision/11-ObjectDetection/ObjectDetection.ipynb) | [Lab](./lessons/4-ComputerVision/11-ObjectDetection/lab/README.md) | +| 06 | [บทนำสู่คอมพิวเตอร์วิชัน OpenCV](./lessons/4-ComputerVision/06-IntroCV/README.md) | [สมุดบันทึก](./lessons/4-ComputerVision/06-IntroCV/OpenCV.ipynb) | [ห้องปฏิบัติการ](./lessons/4-ComputerVision/06-IntroCV/lab/README.md) | +| 07 | [โครงข่ายประสาทเทียมแบบคอนโวลูชัน](./lessons/4-ComputerVision/07-ConvNets/README.md) & [สถาปัตยกรรม CNN](./lessons/4-ComputerVision/07-ConvNets/CNN_Architectures.md) | [PyTorch](./lessons/4-ComputerVision/07-ConvNets/ConvNetsPyTorch.ipynb) /[TensorFlow](./lessons/4-ComputerVision/07-ConvNets/ConvNetsTF.ipynb) | [ห้องปฏิบัติการ](./lessons/4-ComputerVision/07-ConvNets/lab/README.md) | +| 08 | [โครงข่ายที่ผ่านการฝึกมาแล้วและการเรียนรู้แบบถ่ายโอน](./lessons/4-ComputerVision/08-TransferLearning/README.md) และ [เคล็ดลับการฝึก](./lessons/4-ComputerVision/08-TransferLearning/TrainingTricks.md) | [PyTorch](./lessons/4-ComputerVision/08-TransferLearning/TransferLearningPyTorch.ipynb) / [TensorFlow](./lessons/3-NeuralNetworks/05-Frameworks/IntroKerasTF.ipynb) | [ห้องปฏิบัติการ](./lessons/4-ComputerVision/08-TransferLearning/lab/README.md) | +| 09 | [ออโตเอนโค้ดเดอร์และ VAE](./lessons/4-ComputerVision/09-Autoencoders/README.md) | [PyTorch](./lessons/4-ComputerVision/09-Autoencoders/AutoEncodersPyTorch.ipynb) / [TensorFlow](./lessons/4-ComputerVision/09-Autoencoders/AutoencodersTF.ipynb) | | +| 10 | [โครงข่ายประสาทปะทะเชิงสร้างสรรค์และการถ่ายโอนสไตล์เชิงศิลปะ](./lessons/4-ComputerVision/10-GANs/README.md) | [PyTorch](./lessons/4-ComputerVision/10-GANs/GANPyTorch.ipynb) / [TensorFlow](./lessons/4-ComputerVision/10-GANs/GANTF.ipynb) | | +| 11 | [การตรวจจับวัตถุ](./lessons/4-ComputerVision/11-ObjectDetection/README.md) | [TensorFlow](./lessons/4-ComputerVision/11-ObjectDetection/ObjectDetection.ipynb) | [ห้องปฏิบัติการ](./lessons/4-ComputerVision/11-ObjectDetection/lab/README.md) | | 12 | [การแบ่งส่วนเชิงความหมาย U-Net](./lessons/4-ComputerVision/12-Segmentation/README.md) | [PyTorch](./lessons/4-ComputerVision/12-Segmentation/SemanticSegmentationPytorch.ipynb) / [TensorFlow](./lessons/4-ComputerVision/12-Segmentation/SemanticSegmentationTF.ipynb) | | | V | [**การประมวลผลภาษาธรรมชาติ**](./lessons/5-NLP/README.md) | [PyTorch](https://docs.microsoft.com/learn/modules/intro-natural-language-processing-pytorch/?WT.mc_id=academic-77998-cacaste) /[TensorFlow](https://docs.microsoft.com/learn/modules/intro-natural-language-processing-TensorFlow/?WT.mc_id=academic-77998-cacaste) | [สำรวจการประมวลผลภาษาธรรมชาติบน Microsoft Azure](https://learn.microsoft.com/en-us/collections/7w28iy2xrqzdj0?WT.mc_id=academic-77998-bethanycheum)| -| 13 | [การแทนข้อความ Bow/TF-IDF](./lessons/5-NLP/13-TextRep/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/13-TextRep/TextRepresentationPyTorch.ipynb) / [TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/13-TextRep/TextRepresentationTF.ipynb) | | -| 14 | [Embedding คำเชิงความหมาย Word2Vec และ GloVe](./lessons/5-NLP/14-Embeddings/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/14-Embeddings/EmbeddingsPyTorch.ipynb) / [TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/14-Embeddings/EmbeddingsTF.ipynb) | | -| 15 | [การสร้างแบบจำลองภาษา ฝึก embeddings ของคุณเอง](./lessons/5-NLP/15-LanguageModeling/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/15-LanguageModeling/CBoW-PyTorch.ipynb) / [TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/15-LanguageModeling/CBoW-TF.ipynb) | [Lab](./lessons/5-NLP/15-LanguageModeling/lab/README.md) | -| 16 | [โครงข่ายประสาทเทียมแแบบลำดับ (RNN)](./lessons/5-NLP/16-RNN/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/16-RNN/RNNPyTorch.ipynb) / [TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/16-RNN/RNNTF.ipynb) | | -| 17 | [โครงข่ายประสาทเทียมแบบลำดับสร้างสรรค์](./lessons/5-NLP/17-GenerativeNetworks/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/17-GenerativeNetworks/GenerativePyTorch.ipynb) / [TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/17-GenerativeNetworks/GenerativeTF.ipynb) | [Lab](./lessons/5-NLP/17-GenerativeNetworks/lab/README.md) | -| 18 | [ทรานส์ฟอร์มเมอร์ BERT.](./lessons/5-NLP/18-Transformers/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/18-Transformers/TransformersPyTorch.ipynb) /[TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/18-Transformers/TransformersTF.ipynb) | | -| 19 | [การรู้จำชื่อเอนทิตี้](./lessons/5-NLP/19-NER/README.md) | [TensorFlow](https://microsoft.github.io/AI-For-Beginners/lessons/5-NLP/19-NER/NER-TF.ipynb) | [Lab](./lessons/5-NLP/19-NER/lab/README.md) | -| 20 | [โมเดลภาษาขนาดใหญ่ การเขียน prompt และงาน few-shot](./lessons/5-NLP/20-LangModels/README.md) | [PyTorch](https://microsoft.github.io/AI-For-Beginners/lessons/5-NLP/20-LangModels/GPT-PyTorch.ipynb) | | +| 13 | [การแสดงข้อความ Bow/TF-IDF](./lessons/5-NLP/13-TextRep/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/13-TextRep/TextRepresentationPyTorch.ipynb) / [TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/13-TextRep/TextRepresentationTF.ipynb) | | +| 14 | [การฝังคำเชิงความหมาย Word2Vec และ GloVe](./lessons/5-NLP/14-Embeddings/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/14-Embeddings/EmbeddingsPyTorch.ipynb) / [TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/14-Embeddings/EmbeddingsTF.ipynb) | | +| 15 | [การสร้างแบบจำลองภาษา การฝังตัวเอง](./lessons/5-NLP/15-LanguageModeling/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/15-LanguageModeling/CBoW-PyTorch.ipynb) / [TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/15-LanguageModeling/CBoW-TF.ipynb) | [ห้องปฏิบัติการ](./lessons/5-NLP/15-LanguageModeling/lab/README.md) | +| 16 | [โครงข่ายประสาทซ้ำ](./lessons/5-NLP/16-RNN/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/16-RNN/RNNPyTorch.ipynb) / [TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/16-RNN/RNNTF.ipynb) | | +| 17 | [โครงข่ายซ้ำเชิงสร้างสรรค์](./lessons/5-NLP/17-GenerativeNetworks/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/17-GenerativeNetworks/GenerativePyTorch.ipynb) / [TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/17-GenerativeNetworks/GenerativeTF.ipynb) | [ห้องปฏิบัติการ](./lessons/5-NLP/17-GenerativeNetworks/lab/README.md) | +| 18 | [ทรานส์ฟอร์มเมอร์ BERT](./lessons/5-NLP/18-Transformers/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/18-Transformers/TransformersPyTorch.ipynb) /[TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/18-Transformers/TransformersTF.ipynb) | | +| 19 | [การรู้จำเอนทิตีชื่อ](./lessons/5-NLP/19-NER/README.md) | [TensorFlow](https://microsoft.github.io/AI-For-Beginners/lessons/5-NLP/19-NER/NER-TF.ipynb) | [ห้องปฏิบัติการ](./lessons/5-NLP/19-NER/lab/README.md) | +| 20 | [โมเดลภาษาขนาดใหญ่ การเขียนคำสั่งและงานไม่กี่ช็อต](./lessons/5-NLP/20-LangModels/README.md) | [PyTorch](https://microsoft.github.io/AI-For-Beginners/lessons/5-NLP/20-LangModels/GPT-PyTorch.ipynb) | | | VI | **เทคนิค AI อื่นๆ** || | -| 21 | [อัลกอริทึมพันธุกรรม](./lessons/6-Other/21-GeneticAlgorithms/README.md) | [Notebook](./lessons/6-Other/21-GeneticAlgorithms/Genetic.ipynb) | | -| 22 | [การเรียนรู้เสริมเชิงลึก](./lessons/6-Other/22-DeepRL/README.md) | [PyTorch](./lessons/6-Other/22-DeepRL/CartPole-RL-PyTorch.ipynb) /[TensorFlow](./lessons/6-Other/22-DeepRL/CartPole-RL-TF.ipynb) | [Lab](./lessons/6-Other/22-DeepRL/lab/README.md) | -| 23 | [ระบบหลายเอเย่นต์](./lessons/6-Other/23-MultiagentSystems/README.md) | | | +| 21 | [อัลกอริทึมพันธุกรรม](./lessons/6-Other/21-GeneticAlgorithms/README.md) | [สมุดบันทึก](./lessons/6-Other/21-GeneticAlgorithms/Genetic.ipynb) | | +| 22 | [การเรียนรู้เสริมเชิงลึก](./lessons/6-Other/22-DeepRL/README.md) | [PyTorch](./lessons/6-Other/22-DeepRL/CartPole-RL-PyTorch.ipynb) /[TensorFlow](./lessons/6-Other/22-DeepRL/CartPole-RL-TF.ipynb) | [ห้องปฏิบัติการ](./lessons/6-Other/22-DeepRL/lab/README.md) | +| 23 | [ระบบผู้แทนหลายตัว](./lessons/6-Other/23-MultiagentSystems/README.md) | | | | VII | **จริยธรรม AI** | | | -| 24 | [จริยธรรม AI และความรับผิดชอบ AI](./lessons/7-Ethics/README.md) | [Microsoft Learn: หลักการ AI ที่รับผิดชอบ](https://docs.microsoft.com/learn/paths/responsible-ai-business-principles/?WT.mc_id=academic-77998-cacaste) | | +| 24 | [จริยธรรม AI และ AI ที่รับผิดชอบ](./lessons/7-Ethics/README.md) | [Microsoft Learn: หลักการ AI ที่รับผิดชอบ](https://docs.microsoft.com/learn/paths/responsible-ai-business-principles/?WT.mc_id=academic-77998-cacaste) | | | IX | **ส่วนเพิ่มเติม** | | | -| 25 | [โครงข่ายมัลติ-โมดัล CLIP และ VQGAN](./lessons/X-Extras/X1-MultiModal/README.md) | [Notebook](./lessons/X-Extras/X1-MultiModal/Clip.ipynb) | | +| 25 | [โครงข่ายหลายโหมด CLIP และ VQGAN](./lessons/X-Extras/X1-MultiModal/README.md) | [สมุดบันทึก](./lessons/X-Extras/X1-MultiModal/Clip.ipynb) | | ## แต่ละบทเรียนประกอบด้วย +* เอกสารเพื่ออ่านก่อนเรียน +* Jupyter Notebooks ที่สามารถรันได้ ซึ่งมักจะเฉพาะเจาะจงกับเฟรมเวิร์ก (**PyTorch** หรือ **TensorFlow**) โน๊ตบุ๊ครันได้ยังมีเนื้อหาทางทฤษฎีมากมาย ดังนั้นเพื่อเข้าใจหัวข้อนี้คุณต้องผ่านโน๊ตบุ๊คอย่างน้อยหนึ่งเวอร์ชัน (ไม่ว่าจะเป็น PyTorch หรือ TensorFlow) +* **แลปส์** ที่มีให้ในบางหัวข้อ ซึ่งเปิดโอกาสให้คุณได้ลองประยุกต์ใช้เนื้อหาที่คุณได้เรียนรู้กับปัญหาเฉพาะ +* บางหัวข้อมีลิงก์ไปยังโมดูล [**MS Learn**](https://learn.microsoft.com/en-us/collections/7w28iy2xrqzdj0?WT.mc_id=academic-77998-bethanycheum) ที่เกี่ยวข้องกับเรื่องนั้น ๆ -* เนื้อหาก่อนอ่าน -* Jupyter Notebooks ที่สามารถรันได้ ซึ่งมักจะเฉพาะเจาะจงกับ framework (**PyTorch** หรือ **TensorFlow**) โน้ตบุ๊กรันได้ยังประกอบด้วยเนื้อหาทางทฤษฎีมากมาย ดังนั้นเพื่อให้เข้าใจหัวข้อจำเป็นต้องผ่านอย่างน้อยหนึ่งเวอร์ชันของโน้ตบุ๊ก (ทั้ง PyTorch หรือ TensorFlow) -* **ห้องปฏิบัติการ (Labs)** มีให้สำหรับบางหัวข้อ ซึ่งเปิดโอกาสให้คุณทดลองนำเนื้อหาที่เรียนไปประยุกต์ใช้กับปัญหาเฉพาะ -* บางส่วนมีลิงก์ไปยังโมดูล [**MS Learn**](https://learn.microsoft.com/en-us/collections/7w28iy2xrqzdj0?WT.mc_id=academic-77998-bethanycheum) ที่เกี่ยวข้อง +## การเริ่มต้น -## เริ่มต้น +### 🎯 ใหม่กับ AI? เริ่มได้ที่นี่! -### 🎯 ใหม่กับ AI? เริ่มที่นี่! - -ถ้าคุณเป็นมือใหม่กับ AI และต้องการตัวอย่างแบบลงมือทำอย่างรวดเร็ว ลองดูที่ [**ตัวอย่างสำหรับผู้เริ่มต้น**](./examples/README.md)! ซึ่งประกอบด้วย: +ถ้าคุณเพิ่งเริ่มเรียนรู้ AI และต้องการตัวอย่างที่ใช้งานได้เร็ว ๆ ดูที่ [**ตัวอย่างสำหรับผู้เริ่มต้น**](./examples/README.md)! ตัวอย่างเหล่านี้ประกอบด้วย: - 🌟 **Hello AI World** - โปรแกรม AI แรกของคุณ (การจดจำรูปแบบ) -- 🧠 **โครงข่ายประสาทเทียมง่ายๆ** - สร้างโครงข่ายประสาทเทียมจากศูนย์ +- 🧠 **Simple Neural Network** - สร้างโครงข่ายประสาทเทียมตั้งแต่เริ่มต้น +- 🖼️ **Image Classifier** - จำแนกรูปภาพพร้อมคำอธิบายละเอียด +- 💬 **Text Sentiment** - วิเคราะห์ความรู้สึกของข้อความเชิงบวก/เชิงลบ -- 🖼️ **ตัวจำแนกรูปภาพ** - จำแนกรูปภาพพร้อมคำอธิบายรายละเอียด -- 💬 **การวิเคราะห์อารมณ์ข้อความ** - วิเคราะห์ข้อความเชิงบวก/เชิงลบ +ตัวอย่างเหล่านี้ออกแบบมาเพื่อช่วยให้คุณเข้าใจแนวคิด AI ก่อนที่จะเข้าสู่หลักสูตรเต็มรูปแบบ -ตัวอย่างเหล่านี้ถูกออกแบบมาเพื่อช่วยให้คุณเข้าใจแนวคิด AI ก่อนที่จะเริ่มเรียนหลักสูตรเต็มรูปแบบ +### 📚 การตั้งค่าหลักสูตรเต็มรูปแบบ -### 📚 การตั้งค่าหลักสูตรเต็มรูปแบบ +- เราได้สร้าง [บทเรียนตั้งค่าระบบ](./lessons/0-course-setup/setup.md) เพื่อช่วยคุณตั้งค่าสภาพแวดล้อมการพัฒนา +- สำหรับผู้สอน เราได้สร้าง [บทเรียนตั้งค่าหลักสูตร](./lessons/0-course-setup/for-teachers.md) ให้คุณด้วย! +- วิธี [รันโค้ดใน VSCode หรือ Codespace](./lessons/0-course-setup/how-to-run.md) -- เราได้สร้าง [บทเรียนตั้งค่า](./lessons/0-course-setup/setup.md) เพื่อช่วยคุณตั้งค่าสภาพแวดล้อมการพัฒนา -- สำหรับครูผู้สอน เราได้สร้าง [บทเรียนตั้งค่าหลักสูตร](./lessons/0-course-setup/for-teachers.md) ให้กับคุณด้วย! -- วิธีการ [รันโค้ดใน VSCode หรือ Codespace](./lessons/0-course-setup/how-to-run.md) +ทำตามขั้นตอนดังนี้: -ทำตามขั้นตอนเหล่านี้: +Fork the Repository: คลิกที่ปุ่ม "Fork" ที่มุมขวาบนของหน้านี้ -Fork ที่เก็บ: คลิกที่ปุ่ม "Fork" ที่มุมบนขวาของหน้านี้ +Clone the Repository: `git clone https://github.com/microsoft/AI-For-Beginners.git` -โคลนที่เก็บ: `git clone https://github.com/microsoft/AI-For-Beginners.git` +อย่าลืมกดดาว (🌟) repo นี้เพื่อจะได้ค้นหาได้ง่ายขึ้นในภายหลัง -อย่าลืมกดดาว (🌟) ที่ repo นี้เพื่อให้ง่ายต่อการค้นหาในภายหลัง +## พบกับผู้เรียนคนอื่น ๆ -## พบปะผู้เรียนคนอื่น ๆ +เข้าร่วม [เซิร์ฟเวอร์ Discord AI อย่างเป็นทางการ](https://aka.ms/genai-discord?WT.mc_id=academic-105485-bethanycheum) เพื่อพบปะและสร้างเครือข่ายกับผู้เรียนคนอื่นที่เรียนคอร์สนี้ และรับการสนับสนุน -เข้าร่วม [เซิร์ฟเวอร์ Discord ทางการของ AI](https://aka.ms/genai-discord?WT.mc_id=academic-105485-bethanycheum) เพื่อพบปะและสร้างเครือข่ายกับผู้เรียนคนอื่น ๆ ที่เรียนหลักสูตรนี้ และรับการสนับสนุน +หากคุณมีข้อเสนอแนะหรือคำถามขณะพัฒนาผลิตภัณฑ์ เยี่ยมชม [Azure AI Foundry Developer Forum](https://aka.ms/foundry/forum) -หากคุณมีความคิดเห็นเกี่ยวกับผลิตภัณฑ์หรือคำถามระหว่างการสร้างโปรดเยี่ยมชม [Azure AI Foundry Developer Forum](https://aka.ms/foundry/forum) +## แบบทดสอบ -## แบบทดสอบ +> **หมายเหตุเกี่ยวกับแบบทดสอบ**: แบบทดสอบทั้งหมดอยู่ในโฟลเดอร์ Quiz-app ใน etc\quiz-app หรือ [ออนไลน์ที่นี่](https://ff-quizzes.netlify.app/) แบบทดสอบเหล่านี้เชื่อมโยงจากบทเรียนต่าง ๆ แอปแบบทดสอบสามารถรันได้ในเครื่องหรือปรับใช้บน Azure; ทำตามคำแนะนำในโฟลเดอร์ `quiz-app` แบบทดสอบกำลังถูกแปลเป็นภาษาต่าง ๆ อย่างต่อเนื่อง -> **หมายเหตุเกี่ยวกับแบบทดสอบ**: แบบทดสอบทั้งหมดจะอยู่ในโฟลเดอร์ Quiz-app ใน etc\quiz-app หรือ [ออนไลน์ที่นี่](https://ff-quizzes.netlify.app/) มีลิงก์จากในบทเรียน -แอปแบบทดสอบสามารถรันได้ในเครื่องหรือดีพลอยไปที่ Azure; ทำตามคำแนะนำในโฟลเดอร์ `quiz-app` -แบบทดสอบมีการแปลเป็นภาษาต่าง ๆ อย่างต่อเนื่อง +## ต้องการความช่วยเหลือ -## ต้องการความช่วยเหลือ +คุณมีคำแนะนำหรือเจอข้อผิดพลาดการสะกดคำหรือโค้ดไหม? แจ้งปัญหาหรือสร้าง pull request ได้เลย -คุณมีคำแนะนำหรือพบข้อผิดพลาดตัวสะกดหรือโค้ดหรือไม่? -เปิด issue หรือสร้าง pull request +## ขอขอบคุณเป็นพิเศษ -## ขอบคุณพิเศษ +* **✍️ ผู้เขียนหลัก:** [Dmitry Soshnikov](http://soshnikov.com), ปริญญาเอก +* **🔥 บรรณาธิการ:** [Jen Looper](https://twitter.com/jenlooper), ปริญญาเอก +* **🎨 นักวาดสเก็ตช์โน้ต:** [Tomomi Imura](https://twitter.com/girlie_mac) +* **✅ ผู้สร้างแบบทดสอบ:** [Lateefah Bello](https://github.com/CinnamonXI), [MLSA](https://studentambassadors.microsoft.com/) +* **🙏 ผู้ร่วมสร้างหลัก:** [Evgenii Pishchik](https://github.com/Pe4enIks) -* **✍️ ผู้เขียนหลัก:** [Dmitry Soshnikov](http://soshnikov.com), PhD -* **🔥 บรรณาธิการ:** [Jen Looper](https://twitter.com/jenlooper), PhD -* **🎨 นักวาดสเกตช์โน้ต:** [Tomomi Imura](https://twitter.com/girlie_mac) -* **✅ ผู้สร้างแบบทดสอบ:** [Lateefah Bello](https://github.com/CinnamonXI), [MLSA](https://studentambassadors.microsoft.com/) -* **🙏 ผู้ร่วมพัฒนาหลัก:** [Evgenii Pishchik](https://github.com/Pe4enIks) +## หลักสูตรอื่น ๆ -## หลักสูตรอื่น ๆ +ทีมงานของเราผลิตหลักสูตรอื่น ๆ ด้วย! ลองดู: -ทีมงานของเราผลิตหลักสูตรอื่น ๆ ด้วย! ลองดู: + +### LangChain +[![LangChain4j for Beginners](https://img.shields.io/badge/LangChain4j%20for%20Beginners-22C55E?style=for-the-badge&&labelColor=E5E7EB&color=0553D6)](https://aka.ms/langchain4j-for-beginners) +[![LangChain.js for Beginners](https://img.shields.io/badge/LangChain.js%20for%20Beginners-22C55E?style=for-the-badge&labelColor=E5E7EB&color=0553D6)](https://aka.ms/langchainjs-for-beginners?WT.mc_id=m365-94501-dwahlin) +[![LangChain for Beginners](https://img.shields.io/badge/LangChain%20for%20Beginners-22C55E?style=for-the-badge&labelColor=E5E7EB&color=0553D6)](https://github.com/microsoft/langchain-for-beginners?WT.mc_id=m365-94501-dwahlin) +--- - -### LangChain -[![LangChain4j for Beginners](https://img.shields.io/badge/LangChain4j%20for%20Beginners-22C55E?style=for-the-badge&&labelColor=E5E7EB&color=0553D6)](https://aka.ms/langchain4j-for-beginners) -[![LangChain.js for Beginners](https://img.shields.io/badge/LangChain.js%20for%20Beginners-22C55E?style=for-the-badge&labelColor=E5E7EB&color=0553D6)](https://aka.ms/langchainjs-for-beginners?WT.mc_id=m365-94501-dwahlin) -[![LangChain for Beginners](https://img.shields.io/badge/LangChain%20for%20Beginners-22C55E?style=for-the-badge&labelColor=E5E7EB&color=0553D6)](https://github.com/microsoft/langchain-for-beginners?WT.mc_id=m365-94501-dwahlin) ---- +### Azure / Edge / MCP / Agents +[![AZD for Beginners](https://img.shields.io/badge/AZD%20for%20Beginners-0078D4?style=for-the-badge&labelColor=E5E7EB&color=0078D4)](https://github.com/microsoft/AZD-for-beginners?WT.mc_id=academic-105485-koreyst) +[![Edge AI for Beginners](https://img.shields.io/badge/Edge%20AI%20for%20Beginners-00B8E4?style=for-the-badge&labelColor=E5E7EB&color=00B8E4)](https://github.com/microsoft/edgeai-for-beginners?WT.mc_id=academic-105485-koreyst) +[![MCP for Beginners](https://img.shields.io/badge/MCP%20for%20Beginners-009688?style=for-the-badge&labelColor=E5E7EB&color=009688)](https://github.com/microsoft/mcp-for-beginners?WT.mc_id=academic-105485-koreyst) +[![AI Agents for Beginners](https://img.shields.io/badge/AI%20Agents%20for%20Beginners-00C49A?style=for-the-badge&labelColor=E5E7EB&color=00C49A)](https://github.com/microsoft/ai-agents-for-beginners?WT.mc_id=academic-105485-koreyst) -### Azure / Edge / MCP / Agents -[![AZD for Beginners](https://img.shields.io/badge/AZD%20for%20Beginners-0078D4?style=for-the-badge&labelColor=E5E7EB&color=0078D4)](https://github.com/microsoft/AZD-for-beginners?WT.mc_id=academic-105485-koreyst) -[![Edge AI for Beginners](https://img.shields.io/badge/Edge%20AI%20for%20Beginners-00B8E4?style=for-the-badge&labelColor=E5E7EB&color=00B8E4)](https://github.com/microsoft/edgeai-for-beginners?WT.mc_id=academic-105485-koreyst) -[![MCP for Beginners](https://img.shields.io/badge/MCP%20for%20Beginners-009688?style=for-the-badge&labelColor=E5E7EB&color=009688)](https://github.com/microsoft/mcp-for-beginners?WT.mc_id=academic-105485-koreyst) -[![AI Agents for Beginners](https://img.shields.io/badge/AI%20Agents%20for%20Beginners-00C49A?style=for-the-badge&labelColor=E5E7EB&color=00C49A)](https://github.com/microsoft/ai-agents-for-beginners?WT.mc_id=academic-105485-koreyst) +--- + +### Generative AI Series +[![Generative AI for Beginners](https://img.shields.io/badge/Generative%20AI%20for%20Beginners-8B5CF6?style=for-the-badge&labelColor=E5E7EB&color=8B5CF6)](https://github.com/microsoft/generative-ai-for-beginners?WT.mc_id=academic-105485-koreyst) +[![Generative AI (.NET)](https://img.shields.io/badge/Generative%20AI%20(.NET)-9333EA?style=for-the-badge&labelColor=E5E7EB&color=9333EA)](https://github.com/microsoft/Generative-AI-for-beginners-dotnet?WT.mc_id=academic-105485-koreyst) +[![Generative AI (Java)](https://img.shields.io/badge/Generative%20AI%20(Java)-C084FC?style=for-the-badge&labelColor=E5E7EB&color=C084FC)](https://github.com/microsoft/generative-ai-for-beginners-java?WT.mc_id=academic-105485-koreyst) +[![Generative AI (JavaScript)](https://img.shields.io/badge/Generative%20AI%20(JavaScript)-E879F9?style=for-the-badge&labelColor=E5E7EB&color=E879F9)](https://github.com/microsoft/generative-ai-with-javascript?WT.mc_id=academic-105485-koreyst) ---- - -### ซีรีส์ Generative AI -[![Generative AI for Beginners](https://img.shields.io/badge/Generative%20AI%20for%20Beginners-8B5CF6?style=for-the-badge&labelColor=E5E7EB&color=8B5CF6)](https://github.com/microsoft/generative-ai-for-beginners?WT.mc_id=academic-105485-koreyst) -[![Generative AI (.NET)](https://img.shields.io/badge/Generative%20AI%20(.NET)-9333EA?style=for-the-badge&labelColor=E5E7EB&color=9333EA)](https://github.com/microsoft/Generative-AI-for-beginners-dotnet?WT.mc_id=academic-105485-koreyst) -[![Generative AI (Java)](https://img.shields.io/badge/Generative%20AI%20(Java)-C084FC?style=for-the-badge&labelColor=E5E7EB&color=C084FC)](https://github.com/microsoft/generative-ai-for-beginners-java?WT.mc_id=academic-105485-koreyst) -[![Generative AI (JavaScript)](https://img.shields.io/badge/Generative%20AI%20(JavaScript)-E879F9?style=for-the-badge&labelColor=E5E7EB&color=E879F9)](https://github.com/microsoft/generative-ai-with-javascript?WT.mc_id=academic-105485-koreyst) +--- + +### Core Learning +[![ML for Beginners](https://img.shields.io/badge/ML%20for%20Beginners-22C55E?style=for-the-badge&labelColor=E5E7EB&color=22C55E)](https://aka.ms/ml-beginners?WT.mc_id=academic-105485-koreyst) +[![Data Science for Beginners](https://img.shields.io/badge/Data%20Science%20for%20Beginners-84CC16?style=for-the-badge&labelColor=E5E7EB&color=84CC16)](https://aka.ms/datascience-beginners?WT.mc_id=academic-105485-koreyst) +[![AI for Beginners](https://img.shields.io/badge/AI%20for%20Beginners-A3E635?style=for-the-badge&labelColor=E5E7EB&color=A3E635)](https://aka.ms/ai-beginners?WT.mc_id=academic-105485-koreyst) +[![Cybersecurity for Beginners](https://img.shields.io/badge/Cybersecurity%20for%20Beginners-F97316?style=for-the-badge&labelColor=E5E7EB&color=F97316)](https://github.com/microsoft/Security-101?WT.mc_id=academic-96948-sayoung) +[![Web Dev for Beginners](https://img.shields.io/badge/Web%20Dev%20for%20Beginners-EC4899?style=for-the-badge&labelColor=E5E7EB&color=EC4899)](https://aka.ms/webdev-beginners?WT.mc_id=academic-105485-koreyst) +[![IoT for Beginners](https://img.shields.io/badge/IoT%20for%20Beginners-14B8A6?style=for-the-badge&labelColor=E5E7EB&color=14B8A6)](https://aka.ms/iot-beginners?WT.mc_id=academic-105485-koreyst) +[![XR Development for Beginners](https://img.shields.io/badge/XR%20Development%20for%20Beginners-38BDF8?style=for-the-badge&labelColor=E5E7EB&color=38BDF8)](https://github.com/microsoft/xr-development-for-beginners?WT.mc_id=academic-105485-koreyst) ---- - -### การเรียนรู้หลัก -[![ML for Beginners](https://img.shields.io/badge/ML%20for%20Beginners-22C55E?style=for-the-badge&labelColor=E5E7EB&color=22C55E)](https://aka.ms/ml-beginners?WT.mc_id=academic-105485-koreyst) -[![Data Science for Beginners](https://img.shields.io/badge/Data%20Science%20for%20Beginners-84CC16?style=for-the-badge&labelColor=E5E7EB&color=84CC16)](https://aka.ms/datascience-beginners?WT.mc_id=academic-105485-koreyst) -[![AI for Beginners](https://img.shields.io/badge/AI%20for%20Beginners-A3E635?style=for-the-badge&labelColor=E5E7EB&color=A3E635)](https://aka.ms/ai-beginners?WT.mc_id=academic-105485-koreyst) -[![Cybersecurity for Beginners](https://img.shields.io/badge/Cybersecurity%20for%20Beginners-F97316?style=for-the-badge&labelColor=E5E7EB&color=F97316)](https://github.com/microsoft/Security-101?WT.mc_id=academic-96948-sayoung) -[![Web Dev for Beginners](https://img.shields.io/badge/Web%20Dev%20for%20Beginners-EC4899?style=for-the-badge&labelColor=E5E7EB&color=EC4899)](https://aka.ms/webdev-beginners?WT.mc_id=academic-105485-koreyst) -[![IoT for Beginners](https://img.shields.io/badge/IoT%20for%20Beginners-14B8A6?style=for-the-badge&labelColor=E5E7EB&color=14B8A6)](https://aka.ms/iot-beginners?WT.mc_id=academic-105485-koreyst) -[![XR Development for Beginners](https://img.shields.io/badge/XR%20Development%20for%20Beginners-38BDF8?style=for-the-badge&labelColor=E5E7EB&color=38BDF8)](https://github.com/microsoft/xr-development-for-beginners?WT.mc_id=academic-105485-koreyst) +--- + +### Copilot Series +[![Copilot for AI Paired Programming](https://img.shields.io/badge/Copilot%20for%20AI%20Paired%20Programming-FACC15?style=for-the-badge&labelColor=E5E7EB&color=FACC15)](https://aka.ms/GitHubCopilotAI?WT.mc_id=academic-105485-koreyst) +[![Copilot for C#/.NET](https://img.shields.io/badge/Copilot%20for%20C%23/.NET-FBBF24?style=for-the-badge&labelColor=E5E7EB&color=FBBF24)](https://github.com/microsoft/mastering-github-copilot-for-dotnet-csharp-developers?WT.mc_id=academic-105485-koreyst) +[![Copilot Adventure](https://img.shields.io/badge/Copilot%20Adventure-FDE68A?style=for-the-badge&labelColor=E5E7EB&color=FDE68A)](https://github.com/microsoft/CopilotAdventures?WT.mc_id=academic-105485-koreyst) + ---- - -### ซีรีส์ Copilot -[![Copilot for AI Paired Programming](https://img.shields.io/badge/Copilot%20for%20AI%20Paired%20Programming-FACC15?style=for-the-badge&labelColor=E5E7EB&color=FACC15)](https://aka.ms/GitHubCopilotAI?WT.mc_id=academic-105485-koreyst) -[![Copilot for C#/.NET](https://img.shields.io/badge/Copilot%20for%20C%23/.NET-FBBF24?style=for-the-badge&labelColor=E5E7EB&color=FBBF24)](https://github.com/microsoft/mastering-github-copilot-for-dotnet-csharp-developers?WT.mc_id=academic-105485-koreyst) -[![Copilot Adventure](https://img.shields.io/badge/Copilot%20Adventure-FDE68A?style=for-the-badge&labelColor=E5E7EB&color=FDE68A)](https://github.com/microsoft/CopilotAdventures?WT.mc_id=academic-105485-koreyst) - +## การขอความช่วยเหลือ -## รับความช่วยเหลือ +ถ้าคุณติดขัดหรือต้องการคำถามเกี่ยวกับการสร้างแอป AI เข้าร่วมกับผู้เรียนและนักพัฒนาที่มีประสบการณ์ในการอภิปรายเกี่ยวกับ MCP นี่คือชุมชนที่สนับสนุนซึ่งคำถามเป็นที่ต้อนรับและความรู้ถูกแบ่งปันอย่างอิสระ -ถ้าคุณติดขัดหรือมีคำถามเกี่ยวกับการสร้างแอป AI -เข้าร่วมกับเพื่อนผู้เรียนและนักพัฒนาประสบการณ์ในชุมชนเพื่อพูดคุยเกี่ยวกับ MCP นี่คือชุมชนที่สนับสนุนซึ่งทุกคำถามเป็นที่ต้อนรับและความรู้ถูกแบ่งปันอย่างอิสระ +[![Microsoft Foundry Discord](https://dcbadge.limes.pink/api/server/nTYy5BXMWG)](https://discord.gg/nTYy5BXMWG) -[![Microsoft Foundry Discord](https://dcbadge.limes.pink/api/server/nTYy5BXMWG)](https://discord.gg/nTYy5BXMWG) - -หากคุณมีข้อคิดเห็นเกี่ยวกับผลิตภัณฑ์หรือข้อผิดพลาดขณะสร้างโปรดเยี่ยมชม: +ถ้าคุณมีข้อเสนอแนะหรือพบข้อผิดพลาดระหว่างการพัฒนาเยี่ยมชม: [![Microsoft Foundry Developer Forum](https://img.shields.io/badge/GitHub-Microsoft_Foundry_Developer_Forum-blue?style=for-the-badge&logo=github&color=000000&logoColor=fff)](https://aka.ms/foundry/forum) --- -**ปฏิเสธความรับผิดชอบ**: -เอกสารฉบับนี้ถูกแปลโดยใช้บริการแปลภาษาด้วย AI [Co-op Translator](https://github.com/Azure/co-op-translator) แม้เราจะพยายามให้มีความถูกต้องสูงสุด แต่โปรดทราบว่าการแปลอัตโนมัติอาจมีข้อผิดพลาดหรือความไม่แม่นยำ เอกสารต้นฉบับในภาษาต้นฉบับควรถูกถือเป็นแหล่งข้อมูลที่เชื่อถือได้ สำหรับข้อมูลที่มีความสำคัญแนะนำให้ใช้บริการแปลโดยผู้เชี่ยวชาญที่เป็นมนุษย์ เราไม่รับผิดชอบต่อความเข้าใจผิดหรือการตีความผิดใด ๆ ที่เกิดขึ้นจากการใช้การแปลนี้ +**ข้อจำกัดความรับผิดชอบ**: +เอกสารนี้ได้รับการแปลโดยใช้บริการแปลภาษาอัตโนมัติ [Co-op Translator](https://github.com/Azure/co-op-translator) แม้ว่าเราจะพยายามให้ความถูกต้อง โปรดทราบว่าการแปลอัตโนมัติอาจมีข้อผิดพลาดหรือความไม่ถูกต้องได้ เอกสารต้นฉบับในภาษาต้นทางควรถือเป็นแหล่งอ้างอิงที่ถูกต้อง สำหรับข้อมูลสำคัญ ขอแนะนำให้ใช้บริการแปลโดยผู้เชี่ยวชาญมืออาชีพ เราจะไม่รับผิดชอบต่อความเข้าใจผิดหรือการตีความผิดที่เกิดขึ้นจากการใช้การแปลนี้ \ No newline at end of file diff --git a/translations/th/lessons/2-Symbolic/MSConceptGraph.ipynb b/translations/th/lessons/2-Symbolic/MSConceptGraph.ipynb index 19eae8d9..6170dba2 100644 --- a/translations/th/lessons/2-Symbolic/MSConceptGraph.ipynb +++ b/translations/th/lessons/2-Symbolic/MSConceptGraph.ipynb @@ -1,539 +1,532 @@ { - "cells": [ - { - "cell_type": "markdown", - "metadata": { - "collapsed": true - }, - "source": [ - "## Microsoft Concept Graph - API นี้ไม่มีให้บริการอีกต่อไป แต่โปรดดูที่โน้ตบุ๊กเพื่อทำความเข้าใจแนวคิด\n", - "\n", - "[Microsoft Concept Graph](https://concept.research.microsoft.com/) เป็นระบบการจัดหมวดหมู่ขนาดใหญ่ของคำศัพท์ที่ได้มาจากอินเทอร์เน็ต โดยมีความสัมพันธ์แบบ `is-a` ระหว่างแนวคิดต่างๆ\n", - "\n", - "Context Graph มีให้ใช้งานในสองรูปแบบ:\n", - " * ไฟล์ข้อความขนาดใหญ่สำหรับดาวน์โหลด\n", - " * REST API\n", - "\n", - "สถิติ:\n", - " * แนวคิดที่ไม่ซ้ำกัน 5,401,933 รายการ\n", - " * อินสแตนซ์ที่ไม่ซ้ำกัน 12,551,613 รายการ\n", - " * ความสัมพันธ์แบบ `is-a` 87,603,947 รายการ\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## การใช้งาน Web Service\n", - "\n", - "Web service มีการเรียกใช้งานหลากหลายรูปแบบเพื่อประมาณความน่าจะเป็นของแนวคิดที่อยู่ในกลุ่มต่าง ๆ สามารถดูข้อมูลเพิ่มเติมได้ [ที่นี่](https://concept.research.microsoft.com/Home/Api) \n", - "ตัวอย่าง URL สำหรับการเรียกใช้งาน: `https://api.conceptnet.io/query?start=/c/en/microsoft&rel=/r/IsA&limit=10`\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "trusted": true - }, - "outputs": [], - "source": [ - "import urllib\n", - "import json\n", - "\n", - "def http(x):\n", - " response = urllib.request.urlopen(x)\n", - " data = response.read()\n", - " return data.decode('utf-8')\n", - "\n", - "def query(x):\n", - " concept = x.lower().replace(' ', '_')\n", - " url = \"https://api.conceptnet.io/query?start=/c/en/{}&rel=/r/IsA&limit=10\".format(\n", - " urllib.parse.quote(concept))\n", - " try:\n", - " result = json.loads(http(url))\n", - " except Exception:\n", - " return {}\n", - " edges = result.get('edges', [])\n", - " if not edges:\n", - " return {}\n", - " total_weight = sum(edge['weight'] for edge in edges)\n", - " if total_weight == 0:\n", - " return {}\n", - " return {edge['end']['label']: edge['weight'] / total_weight for edge in edges}\n", - "\n", - "query('microsoft')" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "ลองจัดหมวดหมู่หัวข้อข่าวโดยใช้แนวคิดหลัก ในการดึงหัวข้อข่าว เราจะใช้บริการ [NewsApi.org](http://newsapi.org) คุณจำเป็นต้องมี API key ของคุณเองเพื่อใช้บริการนี้ - ไปที่เว็บไซต์และลงทะเบียนแผนสำหรับนักพัฒนาฟรี\n" - ] - }, - { - "cell_type": "code", - "execution_count": 20, - "metadata": { - "trusted": true - }, - "outputs": [], - "source": [ - "newsapi_key = ''\n", - "def get_news(country='us'):\n", - " res = json.loads(http(\"https://newsapi.org/v2/top-headlines?country={0}&apiKey={1}\".format(country,newsapi_key)))\n", - " return res['articles']\n", - "\n", - "all_titles = [x['title'] for x in get_news('us')+get_news('gb')]" - ] - }, - { - "cell_type": "code", - "execution_count": 21, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "['Covid-19 Live Updates: Vaccines and Boosters News - The New York Times',\n", - " 'Ukrainians Flee Mariupol as Russian Forces Push to Take Port City - The Wall Street Journal',\n", - " 'Bond Yields Jump, Stock Futures Rise After Powell Says Fed Is Ready to Be More Aggressive - The Wall Street Journal',\n", - " 'Putin critic Alexei Navalny found guilty by Russian court - New York Post ',\n", - " \"Supreme Court nominee Ketanji Brown Jackson will face questions at confirmation hearing's second day - CNN\",\n", - " '2 teachers killed at Swedish high school, student arrested - ABC News',\n", - " 'Clues to Covid-19’s Next Moves Come From Sewers - The Wall Street Journal',\n", - " 'Republicans to roll dice by grilling Jackson over child-pornography sentencing decisions | TheHill - The Hill',\n", - " '‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent',\n", - " 'NASA confirms there are 5,000 planets outside our solar system - Daily Mail',\n", - " \"US stocks whipsawed overnight after Fed Chair Powell's remarks - Fox Business\",\n", - " \"'We've learned absolutely nothing': Tests could again be in short supply if Covid surges - POLITICO\",\n", - " \"Duchess of Cambridge swaps khaki jungle gear for Vampire's Wife dress on Belize trip - Daily Mail\",\n", - " 'China searches for victims, flight recorders after first plane crash in 12 years - Reuters',\n", - " 'Second superyacht linked to Russian oligarch Abramovich docks in Turkey - Reuters',\n", - " 'Live updates: Russia stops talks with Japan over sanctions - The Associated Press - en Español',\n", - " 'Powers Remain and Threats Lurk as Women’s Sweet 16 Is Set - The New York Times',\n", - " 'Webb Space Telescope Begins Multi-Instrument Alignment - SciTechDaily',\n", - " \"UConn vs UCF - NCAA women's tournament second-round highlights - March Madness\",\n", - " 'Bucking Republican Trend, Indiana Governor Vetoes Transgender Sports Bill - The New York Times',\n", - " \"Maggie Fox dead: Coronation Street and Shameless actress dies after 'sudden accident' - Mirror Online - The Mirror\",\n", - " 'China plane crash – live: Search for survivors continues as witness describes moment flight fell from sky - The Independent',\n", - " 'Daniel Morgan murder: damning report condemns Met police - The Guardian',\n", - " 'What to expect from Rishi Sunak’s Spring Statement - BBC.com',\n", - " 'UK and Republic of Ireland in line to host Euro 2028 after no one else bids - The Guardian',\n", - " \"Friends beg Vladimir Putin's 'lover' to persuade him to end Ukraine invasion - The Mirror\",\n", - " 'Brass Eye’s outtakes show the brutal TV comedy was the tip of an iceberg - The Guardian',\n", - " \"Vladimir Putin threatens civilians to break Mariupol's spirit - The Times\",\n", - " 'Shell U-turn on Cambo oilfield would threaten green targets, say campaigners - The Guardian',\n", - " 'St Helens dog attack: Girl aged 17 months killed at home - BBC',\n", - " \"PlayStation to buy 'Assassin's Creed' veteran Jade Raymond's Haven Studios - NME\",\n", - " '‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent',\n", - " 'NASA confirms there are 5,000 planets outside our solar system - Daily Mail',\n", - " 'Nintendo Switch finally has folders • Eurogamer.net - Eurogamer.net',\n", - " 'FA to “find a solution” as Liverpool fan group blasts “shambolic” Wembley travel - This Is Anfield',\n", - " 'Manchester United transfer news LIVE Erik ten Hag latest and Man Utd manager updates - Manchester Evening News',\n", - " 'Inflation raises cost of UK government borrowing in February; crude oil up again – business live - The Guardian',\n", - " 'Alexei Navalny: Kremlin critic found guilty of large-scale fraud and contempt of court by Russian court - Sky News',\n", - " \"UK prepares to nationalize Russia natural gas giant Gazprom's retail unit - Business Insider\",\n", - " 'Zaghari-Ratcliffe: Hunt calls for inquiry into delay over Iran debt payment - The Guardian']" - ] - }, - "execution_count": 21, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "all_titles" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "ก่อนอื่น เราต้องการที่จะสามารถดึงคำนามจากหัวข้อข่าว เราจะใช้ไลบรารี `TextBlob` เพื่อทำสิ่งนี้ ซึ่งช่วยทำให้งาน NLP ทั่วไปอย่างนี้ง่ายขึ้นมาก\n" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": { - "trusted": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Requirement already satisfied: textblob in c:\\winapp\\miniconda3\\lib\\site-packages (0.17.1)\n", - "Requirement already satisfied: nltk>=3.1 in c:\\winapp\\miniconda3\\lib\\site-packages (from textblob) (3.5)\n", - "Requirement already satisfied: joblib in c:\\winapp\\miniconda3\\lib\\site-packages (from nltk>=3.1->textblob) (1.0.1)\n", - "Requirement already satisfied: regex in c:\\winapp\\miniconda3\\lib\\site-packages (from nltk>=3.1->textblob) (2021.11.10)\n", - "Requirement already satisfied: tqdm in c:\\winapp\\miniconda3\\lib\\site-packages (from nltk>=3.1->textblob) (4.61.2)\n", - "Requirement already satisfied: click in c:\\winapp\\miniconda3\\lib\\site-packages (from nltk>=3.1->textblob) (8.0.3)\n", - "Requirement already satisfied: colorama in c:\\winapp\\miniconda3\\lib\\site-packages (from click->nltk>=3.1->textblob) (0.4.4)\n", - "Finished.\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "[nltk_data] Downloading package brown to\n", - "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", - "[nltk_data] Package brown is already up-to-date!\n", - "[nltk_data] Downloading package punkt to\n", - "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", - "[nltk_data] Package punkt is already up-to-date!\n", - "[nltk_data] Downloading package wordnet to\n", - "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", - "[nltk_data] Package wordnet is already up-to-date!\n", - "[nltk_data] Downloading package averaged_perceptron_tagger to\n", - "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", - "[nltk_data] Package averaged_perceptron_tagger is already up-to-\n", - "[nltk_data] date!\n", - "[nltk_data] Downloading package conll2000 to\n", - "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", - "[nltk_data] Package conll2000 is already up-to-date!\n", - "[nltk_data] Downloading package movie_reviews to\n", - "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", - "[nltk_data] Package movie_reviews is already up-to-date!\n" - ] - } - ], - "source": [ - "import sys\n", - "!{sys.executable} -m pip install textblob\n", - "!{sys.executable} -m textblob.download_corpora\n", - "from textblob import TextBlob" - ] - }, - { - "cell_type": "code", - "execution_count": 22, - "metadata": { - "trusted": true - }, - "outputs": [ - { - "data": { - "text/plain": [ - "{'covid-19 live updates': 1,\n", - " 'vaccines': 1,\n", - " 'boosters': 1,\n", - " 'york': 4,\n", - " 'ukrainians flee mariupol': 1,\n", - " 'forces push': 1,\n", - " 'port city': 1,\n", - " 'wall street journal': 3,\n", - " 'bond yields': 1,\n", - " 'futures rise': 1,\n", - " 'powell says fed': 1,\n", - " 'ready': 1,\n", - " 'be': 1,\n", - " 'aggressive': 1,\n", - " 'putin': 3,\n", - " 'alexei navalny': 2,\n", - " 'russian': 2,\n", - " 'supreme court nominee': 1,\n", - " 'ketanji brown jackson': 1,\n", - " \"confirmation hearing 's\": 1,\n", - " 'cnn': 1,\n", - " 'swedish': 1,\n", - " 'high school': 1,\n", - " 'abc': 1,\n", - " 'clues': 1,\n", - " 'covid-19': 1,\n", - " '’ s': 2,\n", - " 'moves': 1,\n", - " 'sewers': 1,\n", - " 'roll dice': 1,\n", - " 'jackson': 1,\n", - " 'decisions |': 1,\n", - " 'thehill': 1,\n", - " 'clear': 2,\n", - " 'chemical weapons': 2,\n", - " 'ukraine': 3,\n", - " 'claims president': 2,\n", - " 'biden': 2,\n", - " 'nasa': 2,\n", - " 'solar system': 2,\n", - " 'daily mail': 3,\n", - " 'us stocks': 1,\n", - " 'fed chair powell': 1,\n", - " \"'s remarks\": 1,\n", - " 'fox': 1,\n", - " \"'we 've\": 1,\n", - " 'tests': 1,\n", - " 'covid': 1,\n", - " 'politico': 1,\n", - " 'duchess': 1,\n", - " 'cambridge': 1,\n", - " 'swaps khaki jungle gear': 1,\n", - " 'vampire': 1,\n", - " 'wife': 1,\n", - " 'belize': 1,\n", - " 'china': 2,\n", - " 'flight recorders': 1,\n", - " 'plane crash': 1,\n", - " 'reuters': 2,\n", - " 'russian oligarch': 1,\n", - " 'abramovich': 1,\n", - " 'live': 1,\n", - " 'russia': 2,\n", - " 'stops talks': 1,\n", - " 'japan': 1,\n", - " 'español': 1,\n", - " 'powers remain': 1,\n", - " 'threats lurk': 1,\n", - " 'set': 1,\n", - " 'webb': 1,\n", - " 'telescope begins multi-instrument alignment': 1,\n", - " 'scitechdaily': 1,\n", - " 'uconn': 1,\n", - " 'ucf': 1,\n", - " 'ncaa': 1,\n", - " \"women 's tournament second-round highlights\": 1,\n", - " 'march madness': 1,\n", - " 'bucking republican trend': 1,\n", - " 'indiana': 1,\n", - " 'vetoes transgender': 1,\n", - " 'bill': 1,\n", - " 'maggie fox': 1,\n", - " 'coronation': 1,\n", - " 'shameless': 1,\n", - " \"'sudden accident\": 1,\n", - " 'mirror online': 1,\n", - " 'mirror': 2,\n", - " 'plane crash –': 1,\n", - " 'search': 1,\n", - " 'moment flight': 1,\n", - " 'daniel morgan': 1,\n", - " 'report condemns': 1,\n", - " 'met': 1,\n", - " 'guardian': 6,\n", - " 'rishi sunak': 1,\n", - " '’ s spring': 1,\n", - " 'statement': 1,\n", - " 'bbc.com': 1,\n", - " 'uk': 3,\n", - " 'ireland': 1,\n", - " 'euro': 1,\n", - " 'vladimir putin': 2,\n", - " \"'s 'lover\": 1,\n", - " 'brass eye': 1,\n", - " '’ s outtakes': 1,\n", - " 'brutal tv comedy': 1,\n", - " 'threatens civilians': 1,\n", - " 'mariupol': 1,\n", - " \"'s spirit\": 1,\n", - " 'shell u-turn': 1,\n", - " 'cambo': 1,\n", - " 'green targets': 1,\n", - " 'st helens': 1,\n", - " 'dog attack': 1,\n", - " 'girl': 1,\n", - " 'bbc': 1,\n", - " 'playstation': 1,\n", - " \"'assassin 's\": 1,\n", - " 'creed': 1,\n", - " 'jade raymond': 1,\n", - " 'haven studios': 1,\n", - " 'nme': 1,\n", - " 'nintendo switch': 1,\n", - " 'folders •': 1,\n", - " 'eurogamer.net': 2,\n", - " 'fa': 1,\n", - " 'solution ”': 1,\n", - " 'liverpool': 1,\n", - " 'fan group blasts “ shambolic ”': 1,\n", - " 'wembley': 1,\n", - " 'anfield': 1,\n", - " 'manchester': 1,\n", - " 'live erik': 1,\n", - " 'hag': 1,\n", - " 'utd': 1,\n", - " 'manager updates': 1,\n", - " 'manchester evening': 1,\n", - " 'inflation': 1,\n", - " 'government borrowing': 1,\n", - " 'february': 1,\n", - " 'crude oil': 1,\n", - " '– business': 1,\n", - " 'kremlin': 1,\n", - " 'large-scale fraud': 1,\n", - " 'sky': 1,\n", - " 'natural gas': 1,\n", - " 'gazprom': 1,\n", - " 'retail unit': 1,\n", - " 'insider': 1,\n", - " 'zaghari-ratcliffe': 1,\n", - " 'hunt': 1,\n", - " 'iran': 1,\n", - " 'debt payment': 1}" - ] - }, - "execution_count": 22, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "w = {}\n", - "for x in all_titles:\n", - " for n in TextBlob(x).noun_phrases:\n", - " if n in w:\n", - " w[n].append(x)\n", - " else:\n", - " w[n]=[x]\n", - "{ x:len(w[x]) for x in w.keys()}" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "เราสามารถเห็นได้ว่า คำนามไม่ได้ให้กลุ่มหัวข้อที่ใหญ่แก่เรา ลองแทนที่คำนามด้วยคำที่มีความหมายทั่วไปมากขึ้นซึ่งได้มาจากกราฟแนวคิด สิ่งนี้จะใช้เวลาสักครู่ เพราะเรากำลังทำการเรียก REST สำหรับแต่ละวลีคำนาม\n" - ] - }, - { - "cell_type": "code", - "execution_count": 23, - "metadata": { - "trusted": true - }, - "outputs": [], - "source": [ - "w = {}\n", - "for x in all_titles:\n", - " for noun in TextBlob(x).noun_phrases:\n", - " terms = query(noun)\n", - " for term in [u for u in terms.keys() if terms[u]>0.1]:\n", - " if term in w:\n", - " w[term].append(x)\n", - " else:\n", - " w[term]=[x]" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": { - "trusted": true - }, - "outputs": [ - { - "data": { - "text/plain": [ - "{'city': 9,\n", - " 'brand': 4,\n", - " 'place': 9,\n", - " 'town': 4,\n", - " 'factor': 4,\n", - " 'film': 4,\n", - " 'nation': 11,\n", - " 'state': 5,\n", - " 'person': 4,\n", - " 'organization': 5,\n", - " 'publication': 10,\n", - " 'market': 5,\n", - " 'economy': 4,\n", - " 'company': 6,\n", - " 'newspaper': 6,\n", - " 'relationship': 6}" - ] - }, - "execution_count": 24, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "{ x:len(w[x]) for x in w.keys() if len(w[x])>3}" - ] - }, - { - "cell_type": "code", - "execution_count": 27, - "metadata": { - "trusted": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "ECONOMY:\n", - "China searches for victims, flight recorders after first plane crash in 12 years - Reuters\n", - "Live updates: Russia stops talks with Japan over sanctions - The Associated Press - en Español\n", - "China plane crash – live: Search for survivors continues as witness describes moment flight fell from sky - The Independent\n", - "UK prepares to nationalize Russia natural gas giant Gazprom's retail unit - Business Insider\n", - "\n", - "NATION:\n", - "‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent\n", - "Duchess of Cambridge swaps khaki jungle gear for Vampire's Wife dress on Belize trip - Daily Mail\n", - "China searches for victims, flight recorders after first plane crash in 12 years - Reuters\n", - "Live updates: Russia stops talks with Japan over sanctions - The Associated Press - en Español\n", - "Live updates: Russia stops talks with Japan over sanctions - The Associated Press - en Español\n", - "China plane crash – live: Search for survivors continues as witness describes moment flight fell from sky - The Independent\n", - "UK and Republic of Ireland in line to host Euro 2028 after no one else bids - The Guardian\n", - "Friends beg Vladimir Putin's 'lover' to persuade him to end Ukraine invasion - The Mirror\n", - "‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent\n", - "UK prepares to nationalize Russia natural gas giant Gazprom's retail unit - Business Insider\n", - "Zaghari-Ratcliffe: Hunt calls for inquiry into delay over Iran debt payment - The Guardian\n", - "\n", - "PERSON:\n", - "‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent\n", - "Duchess of Cambridge swaps khaki jungle gear for Vampire's Wife dress on Belize trip - Daily Mail\n", - "Second superyacht linked to Russian oligarch Abramovich docks in Turkey - Reuters\n", - "‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent\n" - ] - } - ], - "source": [ - "print('\\nECONOMY:\\n'+'\\n'.join(w['economy']))\n", - "print('\\nNATION:\\n'+'\\n'.join(w['nation']))\n", - "print('\\nPERSON:\\n'+'\\n'.join(w['person']))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n---\n\n**ข้อจำกัดความรับผิดชอบ**: \nเอกสารนี้ได้รับการแปลโดยใช้บริการแปลภาษา AI [Co-op Translator](https://github.com/Azure/co-op-translator) แม้ว่าเราจะพยายามให้การแปลมีความถูกต้อง แต่โปรดทราบว่าการแปลอัตโนมัติอาจมีข้อผิดพลาดหรือความไม่ถูกต้อง เอกสารต้นฉบับในภาษาดั้งเดิมควรถือเป็นแหล่งข้อมูลที่เชื่อถือได้ สำหรับข้อมูลที่สำคัญ ขอแนะนำให้ใช้บริการแปลภาษามืออาชีพ เราไม่รับผิดชอบต่อความเข้าใจผิดหรือการตีความผิดที่เกิดจากการใช้การแปลนี้\n" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3.7.4 64-bit (conda)", - "metadata": { - "interpreter": { - "hash": "86193a1ab0ba47eac1c69c1756090baa3b420b3eea7d4aafab8b85f8b312f0c5" - } - }, - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9.5" - }, - "coopTranslator": { - "original_hash": "7b3f1fc049371bcf8649ac9fefdf0413", - "translation_date": "2025-10-03T18:55:10+00:00", - "source_file": "lessons/2-Symbolic/MSConceptGraph.ipynb", - "language_code": "th" - } + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Concept Graph using ConceptNet\n", + "\n", + "> **หมายเหตุ:** API ของ [Microsoft Concept Graph](https://concept.research.microsoft.com/) เดิมไม่สามารถใช้งานได้อีกต่อไป โน้ตบุ๊กนี้ได้รับการอัปเดตให้ใช้ [ConceptNet](https://conceptnet.io/) เป็นตัวแทน ซึ่งเป็นกราฟความรู้เปิดที่ใช้งานได้ฟรีโดยมีความสัมพันธ์ `is-a` ระหว่างแนวคิดที่คล้ายกัน\n", + "\n", + "[ConceptNet](https://conceptnet.io/) เป็นเครือข่ายความหมายขนาดใหญ่ของแนวคิดที่มีความสัมพันธ์เช่น `IsA`, `PartOf`, `UsedFor` และอื่น ๆ ซึ่งมีให้ในรูปแบบ:\n", + " * ไฟล์ข้อมูลที่ดาวน์โหลดได้\n", + " * REST API (ไม่จำเป็นต้องใช้คีย์ API)\n", + "\n", + "สถิติของ ConceptNet:\n", + " * โหนดมากกว่า 8 ล้านโหนด\n", + " * ขอบเชื่อมต่อมากกว่า 21 ล้านขอบใน 83 ภาษา\n" + ] }, - "nbformat": 4, - "nbformat_minor": 2 + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## การใช้บริการเว็บ ConceptNet\n", + "\n", + "[ConceptNet](https://conceptnet.io/) มี API แบบ REST เพื่อสำรวจความสัมพันธ์ `is-a` (IsA) ระหว่างแนวคิดต่างๆ โดยไม่ต้องใช้คีย์ API\n", + "นี่คือลิงก์ตัวอย่างสำหรับเรียกใช้งาน: `https://api.conceptnet.io/query?start=/c/en/microsoft&rel=/r/IsA&limit=10`\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": true + }, + "outputs": [], + "source": [ + "import urllib\n", + "import json\n", + "\n", + "def http(x):\n", + " response = urllib.request.urlopen(x)\n", + " data = response.read()\n", + " return data.decode('utf-8')\n", + "\n", + "def query(x):\n", + " concept = x.lower().replace(' ', '_')\n", + " url = \"https://api.conceptnet.io/query?start=/c/en/{}&rel=/r/IsA&limit=10\".format(\n", + " urllib.parse.quote(concept))\n", + " try:\n", + " result = json.loads(http(url))\n", + " except Exception:\n", + " return {}\n", + " edges = result.get('edges', [])\n", + " if not edges:\n", + " return {}\n", + " total_weight = sum(edge['weight'] for edge in edges)\n", + " if total_weight == 0:\n", + " return {}\n", + " return {edge['end']['label']: edge['weight'] / total_weight for edge in edges}\n", + "\n", + "query('microsoft')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "ลองพยายามจัดหมวดหมู่หัวข้อข่าวโดยใช้แนวคิดหลัก เพื่อที่จะได้หัวข้อข่าว เราจะใช้บริการ [NewsApi.org](http://newsapi.org) คุณจำเป็นต้องได้รับคีย์ API ของคุณเองเพื่อใช้บริการนี้ — ไปที่เว็บไซต์และลงทะเบียนแผนสำหรับนักพัฒนาฟรี\n" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "trusted": true + }, + "outputs": [], + "source": [ + "newsapi_key = ''\n", + "def get_news(country='us'):\n", + " res = json.loads(http(\"https://newsapi.org/v2/top-headlines?country={0}&apiKey={1}\".format(country,newsapi_key)))\n", + " return res['articles']\n", + "\n", + "all_titles = [x['title'] for x in get_news('us')+get_news('gb')]" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['Covid-19 Live Updates: Vaccines and Boosters News - The New York Times',\n", + " 'Ukrainians Flee Mariupol as Russian Forces Push to Take Port City - The Wall Street Journal',\n", + " 'Bond Yields Jump, Stock Futures Rise After Powell Says Fed Is Ready to Be More Aggressive - The Wall Street Journal',\n", + " 'Putin critic Alexei Navalny found guilty by Russian court - New York Post ',\n", + " \"Supreme Court nominee Ketanji Brown Jackson will face questions at confirmation hearing's second day - CNN\",\n", + " '2 teachers killed at Swedish high school, student arrested - ABC News',\n", + " 'Clues to Covid-19’s Next Moves Come From Sewers - The Wall Street Journal',\n", + " 'Republicans to roll dice by grilling Jackson over child-pornography sentencing decisions | TheHill - The Hill',\n", + " '‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent',\n", + " 'NASA confirms there are 5,000 planets outside our solar system - Daily Mail',\n", + " \"US stocks whipsawed overnight after Fed Chair Powell's remarks - Fox Business\",\n", + " \"'We've learned absolutely nothing': Tests could again be in short supply if Covid surges - POLITICO\",\n", + " \"Duchess of Cambridge swaps khaki jungle gear for Vampire's Wife dress on Belize trip - Daily Mail\",\n", + " 'China searches for victims, flight recorders after first plane crash in 12 years - Reuters',\n", + " 'Second superyacht linked to Russian oligarch Abramovich docks in Turkey - Reuters',\n", + " 'Live updates: Russia stops talks with Japan over sanctions - The Associated Press - en Español',\n", + " 'Powers Remain and Threats Lurk as Women’s Sweet 16 Is Set - The New York Times',\n", + " 'Webb Space Telescope Begins Multi-Instrument Alignment - SciTechDaily',\n", + " \"UConn vs UCF - NCAA women's tournament second-round highlights - March Madness\",\n", + " 'Bucking Republican Trend, Indiana Governor Vetoes Transgender Sports Bill - The New York Times',\n", + " \"Maggie Fox dead: Coronation Street and Shameless actress dies after 'sudden accident' - Mirror Online - The Mirror\",\n", + " 'China plane crash – live: Search for survivors continues as witness describes moment flight fell from sky - The Independent',\n", + " 'Daniel Morgan murder: damning report condemns Met police - The Guardian',\n", + " 'What to expect from Rishi Sunak’s Spring Statement - BBC.com',\n", + " 'UK and Republic of Ireland in line to host Euro 2028 after no one else bids - The Guardian',\n", + " \"Friends beg Vladimir Putin's 'lover' to persuade him to end Ukraine invasion - The Mirror\",\n", + " 'Brass Eye’s outtakes show the brutal TV comedy was the tip of an iceberg - The Guardian',\n", + " \"Vladimir Putin threatens civilians to break Mariupol's spirit - The Times\",\n", + " 'Shell U-turn on Cambo oilfield would threaten green targets, say campaigners - The Guardian',\n", + " 'St Helens dog attack: Girl aged 17 months killed at home - BBC',\n", + " \"PlayStation to buy 'Assassin's Creed' veteran Jade Raymond's Haven Studios - NME\",\n", + " '‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent',\n", + " 'NASA confirms there are 5,000 planets outside our solar system - Daily Mail',\n", + " 'Nintendo Switch finally has folders • Eurogamer.net - Eurogamer.net',\n", + " 'FA to “find a solution” as Liverpool fan group blasts “shambolic” Wembley travel - This Is Anfield',\n", + " 'Manchester United transfer news LIVE Erik ten Hag latest and Man Utd manager updates - Manchester Evening News',\n", + " 'Inflation raises cost of UK government borrowing in February; crude oil up again – business live - The Guardian',\n", + " 'Alexei Navalny: Kremlin critic found guilty of large-scale fraud and contempt of court by Russian court - Sky News',\n", + " \"UK prepares to nationalize Russia natural gas giant Gazprom's retail unit - Business Insider\",\n", + " 'Zaghari-Ratcliffe: Hunt calls for inquiry into delay over Iran debt payment - The Guardian']" + ] + }, + "execution_count": 21, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "all_titles" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "อันดับแรก เราต้องการที่จะสามารถสกัดคำนามออกจากหัวข้อข่าวได้ เราจะใช้ไลบรารี `TextBlob` เพื่อทำสิ่งนี้ ซึ่งช่วยให้งาน NLP ทั่วไปแบบนี้ง่ายขึ้นมาก\n" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "trusted": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Requirement already satisfied: textblob in c:\\winapp\\miniconda3\\lib\\site-packages (0.17.1)\n", + "Requirement already satisfied: nltk>=3.1 in c:\\winapp\\miniconda3\\lib\\site-packages (from textblob) (3.5)\n", + "Requirement already satisfied: joblib in c:\\winapp\\miniconda3\\lib\\site-packages (from nltk>=3.1->textblob) (1.0.1)\n", + "Requirement already satisfied: regex in c:\\winapp\\miniconda3\\lib\\site-packages (from nltk>=3.1->textblob) (2021.11.10)\n", + "Requirement already satisfied: tqdm in c:\\winapp\\miniconda3\\lib\\site-packages (from nltk>=3.1->textblob) (4.61.2)\n", + "Requirement already satisfied: click in c:\\winapp\\miniconda3\\lib\\site-packages (from nltk>=3.1->textblob) (8.0.3)\n", + "Requirement already satisfied: colorama in c:\\winapp\\miniconda3\\lib\\site-packages (from click->nltk>=3.1->textblob) (0.4.4)\n", + "Finished.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "[nltk_data] Downloading package brown to\n", + "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", + "[nltk_data] Package brown is already up-to-date!\n", + "[nltk_data] Downloading package punkt to\n", + "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", + "[nltk_data] Package punkt is already up-to-date!\n", + "[nltk_data] Downloading package wordnet to\n", + "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", + "[nltk_data] Package wordnet is already up-to-date!\n", + "[nltk_data] Downloading package averaged_perceptron_tagger to\n", + "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", + "[nltk_data] Package averaged_perceptron_tagger is already up-to-\n", + "[nltk_data] date!\n", + "[nltk_data] Downloading package conll2000 to\n", + "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", + "[nltk_data] Package conll2000 is already up-to-date!\n", + "[nltk_data] Downloading package movie_reviews to\n", + "[nltk_data] C:\\Users\\dmitryso\\AppData\\Roaming\\nltk_data...\n", + "[nltk_data] Package movie_reviews is already up-to-date!\n" + ] + } + ], + "source": [ + "import sys\n", + "!{sys.executable} -m pip install textblob\n", + "!{sys.executable} -m textblob.download_corpora\n", + "from textblob import TextBlob" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "trusted": true + }, + "outputs": [ + { + "data": { + "text/plain": [ + "{'covid-19 live updates': 1,\n", + " 'vaccines': 1,\n", + " 'boosters': 1,\n", + " 'york': 4,\n", + " 'ukrainians flee mariupol': 1,\n", + " 'forces push': 1,\n", + " 'port city': 1,\n", + " 'wall street journal': 3,\n", + " 'bond yields': 1,\n", + " 'futures rise': 1,\n", + " 'powell says fed': 1,\n", + " 'ready': 1,\n", + " 'be': 1,\n", + " 'aggressive': 1,\n", + " 'putin': 3,\n", + " 'alexei navalny': 2,\n", + " 'russian': 2,\n", + " 'supreme court nominee': 1,\n", + " 'ketanji brown jackson': 1,\n", + " \"confirmation hearing 's\": 1,\n", + " 'cnn': 1,\n", + " 'swedish': 1,\n", + " 'high school': 1,\n", + " 'abc': 1,\n", + " 'clues': 1,\n", + " 'covid-19': 1,\n", + " '’ s': 2,\n", + " 'moves': 1,\n", + " 'sewers': 1,\n", + " 'roll dice': 1,\n", + " 'jackson': 1,\n", + " 'decisions |': 1,\n", + " 'thehill': 1,\n", + " 'clear': 2,\n", + " 'chemical weapons': 2,\n", + " 'ukraine': 3,\n", + " 'claims president': 2,\n", + " 'biden': 2,\n", + " 'nasa': 2,\n", + " 'solar system': 2,\n", + " 'daily mail': 3,\n", + " 'us stocks': 1,\n", + " 'fed chair powell': 1,\n", + " \"'s remarks\": 1,\n", + " 'fox': 1,\n", + " \"'we 've\": 1,\n", + " 'tests': 1,\n", + " 'covid': 1,\n", + " 'politico': 1,\n", + " 'duchess': 1,\n", + " 'cambridge': 1,\n", + " 'swaps khaki jungle gear': 1,\n", + " 'vampire': 1,\n", + " 'wife': 1,\n", + " 'belize': 1,\n", + " 'china': 2,\n", + " 'flight recorders': 1,\n", + " 'plane crash': 1,\n", + " 'reuters': 2,\n", + " 'russian oligarch': 1,\n", + " 'abramovich': 1,\n", + " 'live': 1,\n", + " 'russia': 2,\n", + " 'stops talks': 1,\n", + " 'japan': 1,\n", + " 'español': 1,\n", + " 'powers remain': 1,\n", + " 'threats lurk': 1,\n", + " 'set': 1,\n", + " 'webb': 1,\n", + " 'telescope begins multi-instrument alignment': 1,\n", + " 'scitechdaily': 1,\n", + " 'uconn': 1,\n", + " 'ucf': 1,\n", + " 'ncaa': 1,\n", + " \"women 's tournament second-round highlights\": 1,\n", + " 'march madness': 1,\n", + " 'bucking republican trend': 1,\n", + " 'indiana': 1,\n", + " 'vetoes transgender': 1,\n", + " 'bill': 1,\n", + " 'maggie fox': 1,\n", + " 'coronation': 1,\n", + " 'shameless': 1,\n", + " \"'sudden accident\": 1,\n", + " 'mirror online': 1,\n", + " 'mirror': 2,\n", + " 'plane crash –': 1,\n", + " 'search': 1,\n", + " 'moment flight': 1,\n", + " 'daniel morgan': 1,\n", + " 'report condemns': 1,\n", + " 'met': 1,\n", + " 'guardian': 6,\n", + " 'rishi sunak': 1,\n", + " '’ s spring': 1,\n", + " 'statement': 1,\n", + " 'bbc.com': 1,\n", + " 'uk': 3,\n", + " 'ireland': 1,\n", + " 'euro': 1,\n", + " 'vladimir putin': 2,\n", + " \"'s 'lover\": 1,\n", + " 'brass eye': 1,\n", + " '’ s outtakes': 1,\n", + " 'brutal tv comedy': 1,\n", + " 'threatens civilians': 1,\n", + " 'mariupol': 1,\n", + " \"'s spirit\": 1,\n", + " 'shell u-turn': 1,\n", + " 'cambo': 1,\n", + " 'green targets': 1,\n", + " 'st helens': 1,\n", + " 'dog attack': 1,\n", + " 'girl': 1,\n", + " 'bbc': 1,\n", + " 'playstation': 1,\n", + " \"'assassin 's\": 1,\n", + " 'creed': 1,\n", + " 'jade raymond': 1,\n", + " 'haven studios': 1,\n", + " 'nme': 1,\n", + " 'nintendo switch': 1,\n", + " 'folders •': 1,\n", + " 'eurogamer.net': 2,\n", + " 'fa': 1,\n", + " 'solution ”': 1,\n", + " 'liverpool': 1,\n", + " 'fan group blasts “ shambolic ”': 1,\n", + " 'wembley': 1,\n", + " 'anfield': 1,\n", + " 'manchester': 1,\n", + " 'live erik': 1,\n", + " 'hag': 1,\n", + " 'utd': 1,\n", + " 'manager updates': 1,\n", + " 'manchester evening': 1,\n", + " 'inflation': 1,\n", + " 'government borrowing': 1,\n", + " 'february': 1,\n", + " 'crude oil': 1,\n", + " '– business': 1,\n", + " 'kremlin': 1,\n", + " 'large-scale fraud': 1,\n", + " 'sky': 1,\n", + " 'natural gas': 1,\n", + " 'gazprom': 1,\n", + " 'retail unit': 1,\n", + " 'insider': 1,\n", + " 'zaghari-ratcliffe': 1,\n", + " 'hunt': 1,\n", + " 'iran': 1,\n", + " 'debt payment': 1}" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "w = {}\n", + "for x in all_titles:\n", + " for n in TextBlob(x).noun_phrases:\n", + " if n in w:\n", + " w[n].append(x)\n", + " else:\n", + " w[n]=[x]\n", + "{ x:len(w[x]) for x in w.keys()}" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "เราสามารถเห็นได้ว่านามไม่ได้ให้กลุ่มธีมขนาดใหญ่แก่เรา ลองแทนที่นามด้วยคำที่มีความหมายทั่วไปมากขึ้นซึ่งได้มาจากกราฟแนวคิด ซึ่งจะใช้เวลาสักหน่อย เพราะเรากำลังทำการเรียก REST สำหรับวลีคำนามแต่ละวลี\n" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "trusted": true + }, + "outputs": [], + "source": [ + "w = {}\n", + "for x in all_titles:\n", + " for noun in TextBlob(x).noun_phrases:\n", + " terms = query(noun)\n", + " for term in [u for u in terms.keys() if terms[u]>0.1]:\n", + " if term in w:\n", + " w[term].append(x)\n", + " else:\n", + " w[term]=[x]" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "trusted": true + }, + "outputs": [ + { + "data": { + "text/plain": [ + "{'city': 9,\n", + " 'brand': 4,\n", + " 'place': 9,\n", + " 'town': 4,\n", + " 'factor': 4,\n", + " 'film': 4,\n", + " 'nation': 11,\n", + " 'state': 5,\n", + " 'person': 4,\n", + " 'organization': 5,\n", + " 'publication': 10,\n", + " 'market': 5,\n", + " 'economy': 4,\n", + " 'company': 6,\n", + " 'newspaper': 6,\n", + " 'relationship': 6}" + ] + }, + "execution_count": 24, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "{ x:len(w[x]) for x in w.keys() if len(w[x])>3}" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "trusted": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "ECONOMY:\n", + "China searches for victims, flight recorders after first plane crash in 12 years - Reuters\n", + "Live updates: Russia stops talks with Japan over sanctions - The Associated Press - en Español\n", + "China plane crash – live: Search for survivors continues as witness describes moment flight fell from sky - The Independent\n", + "UK prepares to nationalize Russia natural gas giant Gazprom's retail unit - Business Insider\n", + "\n", + "NATION:\n", + "‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent\n", + "Duchess of Cambridge swaps khaki jungle gear for Vampire's Wife dress on Belize trip - Daily Mail\n", + "China searches for victims, flight recorders after first plane crash in 12 years - Reuters\n", + "Live updates: Russia stops talks with Japan over sanctions - The Associated Press - en Español\n", + "Live updates: Russia stops talks with Japan over sanctions - The Associated Press - en Español\n", + "China plane crash – live: Search for survivors continues as witness describes moment flight fell from sky - The Independent\n", + "UK and Republic of Ireland in line to host Euro 2028 after no one else bids - The Guardian\n", + "Friends beg Vladimir Putin's 'lover' to persuade him to end Ukraine invasion - The Mirror\n", + "‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent\n", + "UK prepares to nationalize Russia natural gas giant Gazprom's retail unit - Business Insider\n", + "Zaghari-Ratcliffe: Hunt calls for inquiry into delay over Iran debt payment - The Guardian\n", + "\n", + "PERSON:\n", + "‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent\n", + "Duchess of Cambridge swaps khaki jungle gear for Vampire's Wife dress on Belize trip - Daily Mail\n", + "Second superyacht linked to Russian oligarch Abramovich docks in Turkey - Reuters\n", + "‘Clear sign’ Putin considering using chemical weapons in Ukraine, claims President Biden - The Independent\n" + ] + } + ], + "source": [ + "print('\\nECONOMY:\\n'+'\\n'.join(w['economy']))\n", + "print('\\nNATION:\\n'+'\\n'.join(w['nation']))\n", + "print('\\nPERSON:\\n'+'\\n'.join(w['person']))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "---\n\n\n**ข้อจำกัดความรับผิดชอบ**: \nเอกสารนี้ได้รับการแปลโดยใช้บริการแปลด้วย AI [Co-op Translator](https://github.com/Azure/co-op-translator) แม้เราจะพยายามให้มีความถูกต้อง โปรดทราบว่าการแปลโดยอัตโนมัติอาจมีข้อผิดพลาดหรือความไม่ถูกต้องได้ เอกสารต้นฉบับในภาษาต้นทางควรถูกพิจารณาเป็นแหล่งข้อมูลที่เป็นทางการ สำหรับข้อมูลที่สำคัญควรใช้การแปลโดยผู้เชี่ยวชาญด้านภาษามนุษย์ เราไม่รับผิดชอบต่อความเข้าใจผิดหรือการตีความที่ผิดพลาดใด ๆ ที่เกิดจากการใช้การแปลนี้\n\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3.7.4 64-bit (conda)", + "metadata": { + "interpreter": { + "hash": "86193a1ab0ba47eac1c69c1756090baa3b420b3eea7d4aafab8b85f8b312f0c5" + } + }, + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.5" + } + }, + "nbformat": 4, + "nbformat_minor": 2 } \ No newline at end of file