Letter swaps

There are letter replacements or swaps used in the English language and informal language such X used for ex, K used in place of c, and others that could cause issues for natural language processing.

As with all endeavors, data is messy and morphs of language are no exception.  This article doesn’t solve these issues in NLP, nor have I spent any time looking into pre-built solutions.  It is only meant to provide examples, links, and overview of the situation.

Wikipedia lists these situations as:

K for C examples

Drop the C in CK example

X examples

  • X can represent “trans-” (e.g. XMIT for transmit, XFER for transfer)
  • “cross-” (e.g. X-ing for crossing, XREF for cross-reference)
  • “Christ-” as shorthand (e.g. Xmas for Christmas, Xian for Christian)
  • the “crys-” in crystal (XTAL)
  • various words starting with “ex-” (e.g. XL for extra large, XOR for exclusive-or)



Getting started on Algorithmia



Updated for 2016 – For the previous version see: Getting Started on Algorithmia 2015

Algorithmia URL: https://algorithmia.com/

For languages it currently supports:

Also new as of 5/19/16 support for:

For source code the options are

  • Open Source
  • Closed Source

The open source licence options are

  • Algorithmia Platform License
  • Apache License 2.0
  • GNU GPL v3.0
  • MIT License

The closed source licence options are

  • Algorithmia Platform License
  • Apache License 2.0
  • GNU GPL v3.0

I wasn’t able to find the details of their “Algorithmia Platform License” and plan to reach out to them for more details.

For calling your algorithms they provide sample code in the API documentation: http://docs.algorithmia.com/

Provided samples are:

Note: In the source code examples, while logged in, it pre-fills your API key into the example code.  All except for the Scala example (it always uses “c6ca861e50054f63a0fc74b5f845bc1a”)

The Python code they provide is for the 2.x version.  For 3.x version see my sample code.

It looks like the commented out HTML navigation items from my 2015 edition either were never implemented or are still on the rodamap:

  • Clone Algorithm
  • Run Locally
  • Submit Algorithm


Pure CSS Tooltips

Code and example of a pure CSS


You found it!

And we can put HTML inside!

working in WordPress





Mirror of Magnus Lie Hetland’s Levenshtein Distance in Python




Linked from: http://people.cs.pitt.edu/~kirk/cs1501/Pruhs/Fall2006/Assignments/editdistance/Levenshtein%20Distance.htm

TIL: WordPress where to use is_category() over is_tax() function

Today I learned that the WordPress function is_tax() returns false on arc hive pages.

According to the WordPress codex, “You should use is_category() and is_tag() respectively when checking for category and tag archives.”


My situation:

It appears that a 3rd party developer was implementing some specific code in a post using the is taxonomy function is_tax(“category”, “category-name”) and when trying to do the same on a category archive page just copied and pasted the code and called it a day.

The code didn’t work for the archive page and was left alone for some time.  I realized it wasn’t working on the category page and upon investigation learned that the is_tax() function would always return false for a category archive page.