Overview of common NLP tasks using Python

Photo by Skylar Kang from Pexels

Natural Language Processing NLP is used to analyse textual data. This could be data from web sites, scanned documents, books, journals, Tweets, YouTube comments to name but a few sources.

This primer introduces some of the common NLP tasks that can be carried out using Python. Examples mostly use the Natural Language ToolKit (NLTK) and scikit learn packages. It is assumed that you have a basic working knowledge of Python and data science principles.

Natural language refers to languages like English, French, Arabic and Chinese as opposed to computer languages like Python, R and C++. NLP automates parts of the…


Building a QT-interval calculator

Image from Pexels (https://www.pexels.com/)

The following provides an example of how we can pass information from the client to the server in a Python Flask application. Firstly demonstrating how data can be sent from the client to the server and processed and then how we can make this more efficient by carrying out the calculation client side and returning the results on the same page using Ajax. To illustrate how this works, the example focuses on creating a simple calculator to work out the compensated QT interval which is part of the EKG/ECG waveform used in medicine. This calculator is an example only and


An introduction to MongoDB with PyMongo

(Image from https://www.pexels.com/)

MongoDB is a document based database with a dynamic data schema. The JavaScript Object Notation (JSON) that it supports is a natural fit for working with objects in modern programming languages like JavaScript, Python and others. This provides an alternative to more traditional Relational Database Management Systems (RDBMS) such as SQL. MongoDB is an example of a NoSQL databases. These databases often use collections of documents instead of the tables used in RDBMS. These databases support dynamic database schemas making them responsive to changes in the structure of data.

This short primer gives some examples of using MongoDB with Python…


Hands-on Tutorials

Converting video to text with speech recognition, adding a GUI and using threads to improve performance

Photo by Anna Shvets from Pexels

Occasionally I have the need to interview participants for various research projects. Often grant funding for such projects will cover transcription costs. Human transcribers remain the gold standard for this sort of work and usually do an excellent job. You could of course transcribe your own interviews but this can be a very time consuming and laborious task. Some qualitative researchers also advocate transcribing your own interviews as a way of becoming more familiar with the data.

There also exist various software for this task, including free trials and software with various pricing models. Creating a script to do this…


Using Python’s matplotlib library

A hand drawn Kite plot (Image by authors)

Kite diagrams are classically used in both ecology and biology studies and also form part of the school syllabus on A-Level Biology courses in the UK. Despite this, there are few options for creating these diagrams in standard software visualisation packages, and most seem to still be hand drawn. This short post will explain how to automate this process with Python 3 and the matplotlib library.

So what are Kite diagrams? Kite diagrams provide a graphical summary of different observations made along a transect. A transect is a line placed across a part of a habitat, or an entire habitat…

Alan Davies

Senior Lecturer Health Data Science University of Manchester, UK

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store