• Skip to primary navigation
  • Skip to main content

DebKR

To the Stars

  • About
  • Blog
  • Contact

database

Simple Tagging Engine (updated using tuples)

Simple Tagging Engine (updated using tuples)

07/05/2016 By debkr

simple-python-tagging-engineMy simple Python Tagging Engine has now been updated to incorporate learnings about tuples, and incorporates simplified ways of sorting and returning counted values from a dictionary. Code and simple documentation available on GitHub: https://github.com/debkr/blog_tagger.

 

Filed Under: Blog, Personalised Training Plan, Programming, Programming Projects Tagged With: coding101, data, database, keywords, programming, tagging engine, tuple

Coding 101 (part 7)

Coding 101 (part 7)

29/04/2016 By debkr

coding-101-dictionariesLists work great but they leave something on the table:
I’ve been building a Tagging Engine in Python as a little exercise to help me learn by doing, using my knowledge so far. It became clear pretty quickly that I needed a better way to handle pairs of data. In this case I was looking at a list of words and the number of times each of them appeared in a text, so that I could rank the most common words by order of significance (frequency). If I just used one list and appended both the word and its count to the list, one value after the other, there was no way I could sort by count number.

I got round this problem by having two lists, one for the words and another for the word counts. I could then manipulate the data as needed. This did work fine in the simple program I wrote, but it was my usual unwieldy, sledgehammer approach again. I knew there was a way I could handle that pair of data points better – using Python’s Dictionaries functionality – but I didn’t want to rush ahead of the curve. Well now I get the chance to learn all about dictionaries. [Read more…] about Coding 101 (part 7)

Filed Under: Blog, Personalised Training Plan, Programming Tagged With: coding101, count, data, database, dict(), dictionary, function, items(), key/value pair, list, order, python, return, value, variable, word counts

Copyright © 2016–2025 · Powered by WordPress On Genesis Framework · Log in

  • Writing
  • Developing
  • Consulting