No two cards can have the same name, but variants of the same name can refer to the same card, greatly simplifying handling of plurals, spacing, and punctuation.

 

History, histories, and @#$%@HISTORY@#$% all refer to the same card.

 

So do WagnCircle, wagns circles, and WAGN: CIRCLE.

 

A given name could technically have infinite variants.  For example, "What", "What?", "What??", and "What???" are all variants.  Teenage texters have demonstrated that this punctuation pattern may be pushed to extremes.

 

There are three special variants with special meaning: the canonical name, the link name, and the key.

 

Canonical names

 

Clicking on links to name variants will show the same card each time (you can try this out in the +example section).  In each case the card will appear with its canonical name, meaning the full, official name that is stored in the database.  The canonical name is set when the card is created or whenever the name is directly edited via edit > name in the menu.

 

Of the three name variants explored here, the canonical name is the most permissive in terms of allowing different characters.  At the time of writing, the only three characters not allowed in canonical names are "/", "|", and "~".

 

The "name" view of a card will show its canonical name.

 

 

Link names

 

Link names url-safe name variants of canonical names.  For example, if your card is named "What??", then the link name would just be "What".  The question marks must be removed, because they have a special meaning in urls (they signal the beginning of a query string).

 

The link name preserves the canonical name's capitalization and pluralization; it largely just strips non-alphanumeric characters.  (It also leaves asterisks and plus signs in place, because they have special meaning in Wagn).

 

The "linkname" view of a card will show its link name.

 

Keys

 

Keys are how Wagn determines which names are variants and which aren't.  Technically speaking, names are variants whenever they have the same key.

Any name (or chunk of text being treated as a name) can be translated into a standardized "key."  Keys are comprised solely of lowercase alphanumeric characters, underscores, and asterisks.

 

The key is used primarily in detecting name variants.

 

Some examples:

  • Apples — apple
  • TedErnst — ted_ernst
  • Joe's Blog Entries — joe_s_blog_entry

The default Wagn algorithm for key generation is as follows.

  1. decode any HTML
  2. add a space before any upper case letter followed by a lower case letter (this splits CamelCase into words)
  3. make all upper case into lower case
  4. replace any non-alphanumeric character (except *) with a space
  5. break the name into words, and make each word singular if it's plural
  6. rejoin those words with underscores (instead of spaces)

 

NOTE: At present the above algorithm has an English bias, because the singularization algorithm is based on English patterns.  In coming releases, this will be addressed in attempts to make Wagn more completely international.

 

tickets relevant to keys

Note that word breaks are significant.  They can be represented in different ways (eg sea lion or SeaLion, which are variants), but words with different word breaks are not name variants (sea lion, sealion, and seal ion are NOT).

 

The "key" view of a card will show its key.

 

  • testing name variants can often be done in the navbox.  If you type in a name and are prompted to add a card, then the name is not a variant of an existing card.
  • more conclusively, you can use the navbox, a link, or a direct url to navigate to a name and see whether it is a variant of the card name in question.

 

Discussion