A demonstrator of Microsoft Cognitive Search, deployed in Azure with Python.
This repository was aspirationally to support a six-part blog series, using Azure Cognitive Search to index UK Law going back to the 1800s, to make it accessible and comprehensible.
At present, the repostiory contains the code for the end to end demo, but the blogs aren't written. Always the way!
- Search - Creating an indexer for Azure Cognitive Search through the Azure portal
- Integration - Integrating Azure Cognitive Search with a Python Web Application, using the Azure SDK for Python Not yet published
- Getting a Dataset - How the UK Legislation dataset was crawled and downloaded Not yet published
- User Interface - Creating a layout for your web application using Tailwind CSS, making the most of Azure Cognitive Search features Not yet published
- Infrastructure as Code - Deploying the entire solution using Pulumi and GitHub Actions Not yet published
- Answers - How can we use Azure Cognitive Search to answer questions about the law using Semantic Search Not yet published
You'll need to deploy an Azure Cognitive Search resource; and an Azure App Service if you want to host this.
-
Create a separate Python environment for your installation, and activate it. You have two options:
a. Use a Conda distribution
If you are using a distribution of conda, you may want to create a new conda environment, rather than use venv:
conda create --name pycog python=3.9 -y
b. Use a Python virtual environment
On Windows, you may need to use
python
command where there are references to thepython3
command.On linux, you may need to run
sudo apt-get install python3-venv
first.$ python3 -m venv env $ source env/bin/activate $ pip3 install -r requirements.txt
-
Install the required dependencies in your new Python environment.
$ pip3 install -r requirements.txt
This is why Cognitive Search is so valuable - unlocking information within your content.
sealjay-template is available under the MIT Licence.
Feel free to contact me on Twitter. For bugs, please raise an issue on GitHub.
Contributions are more than welcome! This repository uses GitHub flow - with Commitizen to enforce semantic commits (npm install -g commitizen cz-customizable
, echo '{ "path": "cz-customizable" }' > ~/.czrc
, and then git cz
- easy to setup!)
Note: This adds a .czrc file to your home directory, and will overwrite existing commitzen .czrc files.