org.wikipedia.miner.model
Class SensePage
java.lang.Object
org.wikipedia.miner.model.Page
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
|
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 |
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 databaseid - the id of the sense pagetitle - the title of the pagetype - the type of the page (ARTICLE, REDIRECT or DISAMBIGUATION_PAGE)index - the position at which this sense was found on the disambiguation pagescopeNote - the supportive text that was used to describe this sense on the disambiguation page.
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.