|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wikipedia.miner.model.Page
org.wikipedia.miner.model.Article
org.wikipedia.miner.model.Disambiguation
public class Disambiguation
This class represents disambiguation pages in Wikipedia; the pages that list the various articles that an ambiguous term may refer to.
On top of the functionality provided by Article, it attempts to identify the linked articles which relate to alternative senses for the term in question. This is done through the following heuristics:
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.wikipedia.miner.model.Article |
|---|
Article.AnchorText |
| Field Summary |
|---|
| Fields inherited from class org.wikipedia.miner.model.Page |
|---|
ARTICLE, CATEGORY, DISAMBIGUATION, REDIRECT |
| Constructor Summary | |
|---|---|
Disambiguation(WikipediaDatabase database,
int id)
Initializes a newly created DisambiguationPage so that it represents the disambiguation page given by id. |
|
Disambiguation(WikipediaDatabase database,
int id,
java.lang.String title)
Initializes a newly created DisambiguationPage so that it represents the page given by id and title. |
|
Disambiguation(WikipediaDatabase database,
java.lang.String title)
Initializes a newly created DisambiguationPage so that it represents the disambiguation page given by title. |
|
| Method Summary | |
|---|---|
SensePage |
getMostObviousSense()
Returns the most obvious or most common sense of the ambiguous term, by selecting the first article that the disambiguation page links to. |
SortedVector<SensePage> |
getSenses()
|
java.util.Vector<SensePage> |
getSensesInPageOrder()
Returns all senses of the ambiguous term, in the order they were found on the page. |
static void |
main(java.lang.String[] args)
Provides a demo of functionality available to Disambiguations |
| Methods inherited from class org.wikipedia.miner.model.Article |
|---|
getAnchorTexts, getAvaliableLanguages, getEquivalentCategory, getLinksIn, getLinksInCount, getLinksInIds, getLinksOut, getLinksOutCount, getLinksOutIds, getParentCategories, getParentCategoryIds, getRedirects, getRelatednessTo, getTranslation, getTranslations |
| Methods inherited from class org.wikipedia.miner.model.Page |
|---|
compareTo, createPage, equals, getContent, getFirstParagraph, getFirstSentence, getGenerality, getId, getScope, getTitle, getTitleWithoutScope, getType, getWeight, setWeight, toString |
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Disambiguation(WikipediaDatabase database,
int id,
java.lang.String title)
database - an active WikipediaDatabaseid - the unique identifier of the disambiguation pagetitle - the (case dependent) title of the disambiguation page
public Disambiguation(WikipediaDatabase database,
int id)
throws java.sql.SQLException
database - an active WikipediaDatabaseid - the unique identifier of the disambiguation page
java.sql.SQLException - if no page is defined for the id, or if it is not a disambiguation page.
public Disambiguation(WikipediaDatabase database,
java.lang.String title)
throws java.sql.SQLException
database - an active WikipediaDatabasetitle - the (case dependent) title of the disambiguation page
java.sql.SQLException - if no disambiguation page is defined for the title.| Method Detail |
|---|
public SensePage getMostObviousSense()
throws java.sql.SQLException
java.sql.SQLException - if there is a problem with the Wikipedia database.
public SortedVector<SensePage> getSenses()
throws java.sql.SQLException
java.sql.SQLException - if there is a problem with the Wikipedia database.
public java.util.Vector<SensePage> getSensesInPageOrder()
throws java.sql.SQLException
java.sql.SQLException - if there is a problem with the wikipedia database.
public static void main(java.lang.String[] args)
throws java.lang.Exception
args - an array of arguments for connecting to a wikipedia database: server and database names at a minimum, and optionally a username and password
java.lang.Exception - if there is a problem with the wikipedia database.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||