• Skip to primary navigation
  • Skip to main content

DebKR

To the Stars

  • About
  • Blog
  • Contact

working directory

Building a Tagging Engine in Python using Dictionaries

Building a Tagging Engine in Python using Dictionaries

01/05/2016 By debkr

tagging-engineI started playing around building a Tagging Engine in Python using Lists but now I’ve studied a bit more – particularly Dictionaries – I want to see how I can perfect what I was working on. Here are a couple of key things I added/changed in this program over the version I was working on earlier.

1. Using a dictionary instead of lists for faster counting and simpler recall. This is straight forward, using the get method as taught by Dr. Chuck (see Coding 101 part 7 for more details).

words = dict()
for word in wordlist :
____if word in excluded : continue
____words[word] = words.get(word,0) + 1

[Read more…] about Building a Tagging Engine in Python using Dictionaries

Filed Under: Blog, Personalised Training Plan, Programming, Programming Projects Tagged With: ==, count, descending, dictionary, iteration, len(), length, list, loop, order, print, program, range, raw_input, user, variable, working directory

Coding 101

Coding 101

11/03/2016 By debkr

coding-101A word before I begin
You can do no better in learning Python programming for data handling/analysis than to study for yourself one of Charles Servance’s MOOC’s, or to download and work through his freely-available, ‘remixed’ open-source book (see References below for links to both). I am not even standing of the shoulders of giants here… I am merely scurrying along way behind them all, picking up what few crumbs of knowledge and wisdom I can along the way. Blogging my own educational journey – as a 40-somthing woman heading into the world of tech – is a way to help me consolidate my own learnings. If it can help you too – above all by showing empirically that “if she can, then I can” – it will have served a double purpose. [Read more…] about Coding 101

Filed Under: Blog, Personalised Training Plan, Programming Tagged With: code, coding101, computer, get, help, indentation, iteration, iterative development, learning, line, output, program, programming, python, reserved words, run, script, sentences, steps, value, variable, working directory

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

  • Writing
  • Developing
  • Consulting