org.knowceans.corpus.util
Class ActorNames

java.lang.Object
  extended by org.knowceans.corpus.util.ActorNames

public class ActorNames
extends java.lang.Object

ActorNames is a static class that provides normalisation functions for person names to identify actors.

Author:
heinrich

Constructor Summary
ActorNames()
           
 
Method Summary
static void main(java.lang.String[] args)
           
static java.lang.String normalise(java.lang.String name)
          normalise forward names to initial given names, removes dashes in given names and Jr. and Sr. etc. as they are not likely to be reproduced always.
static java.lang.String removeMiddles(java.lang.String name)
           
static java.lang.String rereverse(java.lang.String name)
          Swaps last name and first name initials.
static java.lang.String reverse(java.lang.String name)
          Swaps first name initials and last name.
private static boolean reversed(java.lang.String name)
          true if the name is reversed, i.e., Surname, Given Names
static java.lang.String[] split(java.lang.String name)
          splits the name in given name and last name, at the last space or at the comma if reversed
static java.lang.String underscore(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActorNames

public ActorNames()
Method Detail

main

public static void main(java.lang.String[] args)

split

public static java.lang.String[] split(java.lang.String name)
splits the name in given name and last name, at the last space or at the comma if reversed

Parameters:
name -
Returns:

reverse

public static java.lang.String reverse(java.lang.String name)
Swaps first name initials and last name. Jr. and Sr. should not be contained with comma

Parameters:
name -
Returns:

rereverse

public static java.lang.String rereverse(java.lang.String name)
Swaps last name and first name initials.

Parameters:
name -
Returns:

normalise

public static java.lang.String normalise(java.lang.String name)
normalise forward names to initial given names, removes dashes in given names and Jr. and Sr. etc. as they are not likely to be reproduced always.

Parameters:
name -

removeMiddles

public static java.lang.String removeMiddles(java.lang.String name)

underscore

public static java.lang.String underscore(java.lang.String name)
Parameters:
name -
Returns:

reversed

private static boolean reversed(java.lang.String name)
true if the name is reversed, i.e., Surname, Given Names

Parameters:
name -
Returns: