Solution Of The Wiki Name Plural Problem

This page describes two solutions to the WikiNamePluralProblem - and therefore has a WikiNamePluralProblem of its own.


In the first, WikiNames will automatically link to WikiName, except if WikiNames also exist. this SolutionOfThePluralProblem? also takes into account the cases of SecurityPolicies? linking to SecurityPolicy?, and StateTaxes? linking to StateTax?. The only catch is that it's not possible to create plural pages, except by typing the URL manually.

Here is the code, written originally on a descendant of the JosWiki WikiClone. This is also implemented in the TwikiClone of PeterThoeny.

  sub internalLink
  {
    my( $web, $page, $text, $bar, $foo) = @_;
        # bar is heading space
        # foo is boolean, false suppress link for non-existing pages
      $page =~ s/\s/_/;

if( $page =~ /s$/ && ! topicExists( $web, $page) ) # page is a non-existing plural { $page =~ s/ies$/y/;# plurals like policy-policies $page =~ s/sses$/ss/;# plurals like address-addresses $page =~ s/xes$/x/;# plurals like box-boxes $page =~ s/([A-Za-rt-z])s$/$1/; # others, excluding ending ss like address(es) } topicExists( $web, $page) ? "$bar<A href=\"$scriptUrl/view/$web/$page\">$text<\/a>" : $foo ? "$bar$text<A href=\"$scriptUrl/edit/$web/$page\">?</A>" : "$bar$text"; #unchanged }
the InternalLink? routine is called as

  s/([\*\s][\-\*\s\(\/>]*)([A-Z]{3,}s?)/&internalLink($webName,$2,$2,$1,0)/geo;
   # for TLAs becomingf links only if they exist (no QuestionMarkLink? )
    s/([\*\s][\-\*\s\(\/>]*)([A-Z]+[a-z]*[A-Z]+[a-rt-z0-9]+[a-zA-Z0-9]*)/
      &internalLink($webName,$2,$2,$1,1)/geo;
   # for conventional WikiNames
Nice.


Dealing with the complexities of English is deadly. Consider the plurals of person, child, scissors and moose. Another option is to allow community members to redirect plural pages to singular pages as they see necessary. On WikiWiki, this is usually done with a simple "See WikiName." on WikiNames. On UseModWiki/MeatballWiki, this is done with an explicit redirect command. This is once again a http://usemod.com/cgi-bin/mb.pl?CommunitySolution vs. a http://usemod.com/cgi-bin/mb.pl?TechnologySolution. Of course, the technical solution found is pretty good for most cases. Maybe it's good enough for you? -- SunirShah


Another solution is for the author (or WikiGnome) to add SixSingleQuotes between the word to be linked and the "s" which makes it plural.

WikiNames

But this doesn't work with criterion / criteria...

And it is a bit too tricky. See accepted practice below.


Another solution is less graceful: when the plural page already exists and the singular page does not, you have to write "one of the WikiNames" instead of "WikiName".


Accepted practice has been to name pages in the singular except where that is awkward. Adjusting the number (plurality) of citing sentences to accommodate this convention has not proven to be difficult. Where it has, simply enclosing the plural s in parenthesis (as in WikiName(s)) or writing plain English with a reference to follow (as in wiki names, see WikiName) benefit from being both overt and fully general.


What about having the wiki software redirect automatically when a page contains only the name of another wiki page. Thus the WikiNames page could contain the single word WikiName, and any reference to WikiNames automatically brings up the correct page.

This works for person vs people, criterion vs criteria, etc., because the work is done exactly once by a human.

The potential problem of circular references doesn't exist if the auto-forwarding is limited to one step. Then real people can fix it by hand. Anything more complex falls under YouArentGonnaNeedIt.

How would this affect BackLinks and WikiRefactoring? It makes editing forwarding pages harder, as the URL of the EditPage would have to be entered manually. Other consequences?

WikiPedia solves this by putting '(Redirecting from XXX)' under the page title. You can then click on XXX to get to the redirecting page. See http://www.wikipedia.org/wiki/Nietzsche for an example.

Another consequence: putting DeletedButWelcomeToWiki on a page would make that page redirect to DeletedButWelcomeToWiki. This might or might not be a good thing, but it would be irritating for us WikiGnomes. Using 'See WikiPage.' as the redirection marker wouldn't have this problem, and it would leverage current practice.


CategoryWiki


EditText of this page (last edited December 23, 2007) or FindPage with title or text search