org.wikipedia.miner.model
Class SensePage

java.lang.Object
  extended by org.wikipedia.miner.model.Page
      extended by org.wikipedia.miner.model.SensePage
All Implemented Interfaces:
java.lang.Comparable<Page>

public class SensePage
extends Page

This class represents an entry in a disambiguation page: a sense for the ambiguous term for which the disambiguation page was created.

Author:
David Milne

Field Summary
 
Fields inherited from class org.wikipedia.miner.model.Page
ARTICLE, CATEGORY, DISAMBIGUATION, REDIRECT
 
Constructor Summary
SensePage(WikipediaDatabase database, int id, java.lang.String title, int type, int index, java.lang.String scopeNote)
          Initializes a sense page.
 
Method Summary
 Article getArticle()
          Returns the article identified by this sense.
 int getIndex()
          Returns the position at which this sense was found on the disambiguation page (starting from 1).
 java.lang.String getScopeNote()
          Returns the supportive text that was used to describe this sense on the disambiguation page.
 
Methods inherited from class org.wikipedia.miner.model.Page
compareTo, createPage, equals, getContent, getFirstParagraph, getFirstSentence, getGenerality, getId, getScope, getTitle, getTitleWithoutScope, getType, getWeight, main, setWeight, toString
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SensePage

public SensePage(WikipediaDatabase database,
                 int id,
                 java.lang.String title,
                 int type,
                 int index,
                 java.lang.String scopeNote)
Initializes a sense page.

Parameters:
database - an active Wikipedia database
id - the id of the sense page
title - the title of the page
type - the type of the page (ARTICLE, REDIRECT or DISAMBIGUATION_PAGE)
index - the position at which this sense was found on the disambiguation page
scopeNote - the supportive text that was used to describe this sense on the disambiguation page.
Method Detail

getIndex

public int getIndex()
Returns the position at which this sense was found on the disambiguation page (starting from 1). More obvious, well known senses typically occur earlier and have smaller indexes.

Returns:
the position at which this sense was found

getScopeNote

public java.lang.String getScopeNote()
Returns the supportive text that was used to describe this sense on the disambiguation page.

Returns:
descriptive text.

getArticle

public Article getArticle()
Returns the article identified by this sense.

Returns:
the article.