Categories
Javascript Python

smlkjns_assistant web client in progress

Categories
Python

Train station accessibility

 

My girlfriend has been unwell recently and has been struggling with stairs. She travels a lot and often wants to know if a train station has step free access.

After a bit of tinkering, my personal assistant chatbot will now query the National Rail Knowledgebase API to return accessibility information for a given station.

And using a SQL implementation of Levenshtein distance will do a decent job at correctly parsing train stations from non-standard or typo’d names:

Categories
Python Trains

More tinkering with smlkjns_assistant and trains

 

Categories
Python

Train(ing) smlkjns_assistant

 

With the generous and patient help of friends in the railway industry, smlkjns_assistant continues to learn new skills…

Categories
Python

Writing a chatbot in Python

 

I’ve been experimenting with building a chatbot in Python for the past few weeks, mostly to interact with other hobby project systems of mine that I’ve built over the past few years. It’s a Telegram bot built using python-telegram-bot and I’m pretty happy with my progress.

It started as a way for my girlfriend to be able to add things to our joint shopping list without texting me (and me then forgetting). It does a good job of picking distinct shopping list items out of a message by using data from my personal finance and to-do list systems to compare against a list of around 1,200 items I’ve bought in the past.

It can also interface with my personal finance system to service simple queries:

I maintain separate development and production environments for most of my hobby projects, so the bot can also handle the work of things like deploying changes from one environment to another.

Using some external APIs it can also tell you a joke:

Or give you a (sometimes dubious) recipe: