pt.tumba.geoclass
Class CageClass

java.lang.Object
  extended by pt.tumba.geoclass.CageClass

public class CageClass
extends java.lang.Object

The classification algorithm for marking web pages with their corresponding geographical scopes, with basis on a probabilistic graphical model of geographical concepts.

Author:
Bruno Martins

Constructor Summary
CageClass()
          Constructor for CageClass.
CageClass(java.lang.String sitesFile, java.lang.String GKBFile)
          Constructor for CageClass.
 
Method Summary
 Node getScope(Cage cage)
          Returns the Geographical Scope associated with a given document.
 Node getScope(NamedEntity[] entities)
          Returns the Geographical Scope associated with a given document.
 Node getScope(java.lang.String url)
          Returns the Geographical Scope associated with a given document.
 Node getScope(java.lang.String url, Cage cage)
          Returns the Geographical Scope associated with a given document.
 Node getScope(java.lang.String url, NamedEntity[] entities)
          Returns the Geographical Scope associated with a given document.
 Node getScope(java.lang.String url, java.lang.String text)
          Returns the Geographical Scope associated with a given document.
static void main(java.lang.String[] args)
          Main method for running the classifyer from the command line.
 void writeAllVersus()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CageClass

public CageClass()
          throws java.lang.Exception
Constructor for CageClass.

Throws:
java.lang.Exception - A problem occured while reading from the knowledge base.

CageClass

public CageClass(java.lang.String sitesFile,
                 java.lang.String GKBFile)
          throws java.lang.Exception
Constructor for CageClass.

Throws:
java.lang.Exception - A problem occured while reading from the knowledge base.
Method Detail

getScope

public Node getScope(NamedEntity[] entities)
Returns the Geographical Scope associated with a given document.

Parameters:
entities - An array of named entities associated with the document.
Returns:
A Node corresponding to the geographical scope of the document (or null).

getScope

public Node getScope(java.lang.String url,
                     NamedEntity[] entities)
Returns the Geographical Scope associated with a given document.

Parameters:
url - The document's URL.
entities - An array of named entities.
Returns:
A Node corresponding to the geographical scope of the document (or null).

getScope

public Node getScope(java.lang.String url)
Returns the Geographical Scope associated with a given document.

Parameters:
url - The document's URL.
Returns:
A Node corresponding to the geographical scope of the document (or null).

getScope

public Node getScope(java.lang.String url,
                     Cage cage)
Returns the Geographical Scope associated with a given document.

Parameters:
url - The document's URL.
cage - The named entity recognizer for the document.
Returns:
A Node corresponding to the geographical scope of the document (or null).

getScope

public Node getScope(java.lang.String url,
                     java.lang.String text)
Returns the Geographical Scope associated with a given document.

Parameters:
url - The document's URL.
cage - The named entity recognizer for the document.
Returns:
A Node corresponding to the geographical scope of the document (or null).

getScope

public Node getScope(Cage cage)
Returns the Geographical Scope associated with a given document.

Parameters:
cage - The named entity recognized for the document.
Returns:
A Node corresponding to the geographical scope of the document (or null).

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Main method for running the classifyer from the command line.

Parameters:
args - The command line arguments, tokenized.
Throws:
java.lang.Exception

writeAllVersus

public void writeAllVersus()