de.tudarmstadt.ukp.jwktl.api.entry
Class AbstractWiktionary

java.lang.Object
  extended by de.tudarmstadt.ukp.jwktl.api.entry.AbstractWiktionary
All Implemented Interfaces:
IWiktionary
Direct Known Subclasses:
WiktionaryCollection, WiktionaryEdition

public abstract class AbstractWiktionary
extends Object
implements IWiktionary

Default implementation of the IWiktionary interface.

Author:
Christian M. Meyer

Constructor Summary
AbstractWiktionary()
           
 
Method Summary
 IWiktionaryIterator<IWiktionaryEntry> getAllEntries()
          Returns an iterator over all IWiktionaryEntrys within the Wiktionary edition.
 IWiktionaryIterator<IWiktionaryEntry> getAllEntries(boolean sortByTitle)
          Returns an iterator over all IWiktionaryEntrys within the Wiktionary edition.
 IWiktionaryIterator<IWiktionaryEntry> getAllEntries(boolean sortByTitle, boolean normalize)
          Returns an iterator over all IWiktionaryEntrys within the Wiktionary edition.
 IWiktionaryIterator<IWiktionaryEntry> getAllEntries(IWiktionaryEntryFilter filter)
          Returns an iterator over all IWiktionaryEntrys within the Wiktionary edition.
 IWiktionaryIterator<IWiktionaryEntry> getAllEntries(IWiktionaryEntryFilter filter, boolean sortByTitle)
          Returns an iterator over all IWiktionaryEntrys within the Wiktionary edition.
abstract  IWiktionaryIterator<IWiktionaryEntry> getAllEntries(IWiktionaryEntryFilter filter, boolean sortByTitle, boolean normalize)
          Returns an iterator over all IWiktionaryEntrys within the Wiktionary edition.
 IWiktionaryIterator<IWiktionaryPage> getAllPages()
          Returns an iterator over all IWiktionaryPages within the Wiktionary edition.
 IWiktionaryIterator<IWiktionaryPage> getAllPages(boolean sortByTitle)
          Returns an iterator over all IWiktionaryPages within the Wiktionary edition.
 IWiktionaryIterator<IWiktionaryPage> getAllPages(boolean sortByTitle, boolean normalize)
          Returns an iterator over all IWiktionaryPages within the Wiktionary edition.
 IWiktionaryIterator<IWiktionaryPage> getAllPages(IWiktionaryPageFilter filter)
          Returns an iterator over all IWiktionaryPages within the Wiktionary edition.
 IWiktionaryIterator<IWiktionaryPage> getAllPages(IWiktionaryPageFilter filter, boolean sortByTitle)
          Returns an iterator over all IWiktionaryPages within the Wiktionary edition.
abstract  IWiktionaryIterator<IWiktionaryPage> getAllPages(IWiktionaryPageFilter filter, boolean sortByTitle, boolean normalize)
          Returns an iterator over all IWiktionaryPages within the Wiktionary edition.
 IWiktionaryIterator<IWiktionarySense> getAllSenses()
          Returns an iterator over all IWiktionarySenses within the Wiktionary edition.
 IWiktionaryIterator<IWiktionarySense> getAllSenses(boolean sortByTitle)
          Returns an iterator over all IWiktionaryEntrys within the Wiktionary edition.
 IWiktionaryIterator<IWiktionarySense> getAllSenses(boolean sortByTitle, boolean normalize)
          Returns an iterator over all IWiktionaryEntrys within the Wiktionary edition.
 IWiktionaryIterator<IWiktionarySense> getAllSenses(IWiktionarySenseFilter filter)
          Returns an iterator over all IWiktionarySenses within the Wiktionary edition.
 IWiktionaryIterator<IWiktionarySense> getAllSenses(IWiktionarySenseFilter filter, boolean sortByTitle)
          Returns an iterator over all IWiktionaryEntrys within the Wiktionary edition.
abstract  IWiktionaryIterator<IWiktionarySense> getAllSenses(IWiktionarySenseFilter filter, boolean sortByTitle, boolean normalize)
          Returns an iterator over all IWiktionaryEntrys within the Wiktionary edition.
 List<IWiktionaryEntry> getEntriesForWord(String word)
          Returns a list of IWiktionaryEntrys encoded on a page with the given title.
 List<IWiktionaryEntry> getEntriesForWord(String word, boolean normalize)
          Returns a list of IWiktionaryEntrys encoded on a page with the given title.
 List<IWiktionaryEntry> getEntriesForWord(String word, IWiktionaryEntryFilter filter)
          Returns a list of IWiktionaryEntrys encoded on a page with the given title.
abstract  List<IWiktionaryEntry> getEntriesForWord(String word, IWiktionaryEntryFilter filter, boolean normalize)
          Returns a list of IWiktionaryEntrys encoded on a page with the given title.
 List<IWiktionaryPage> getPagesForWord(String word, boolean normalize)
          Returns the page with the given title.
abstract  List<IWiktionaryPage> getPagesForWord(String word, IWiktionaryPageFilter filter, boolean normalize)
          Returns the page with the given title.
 List<IWiktionarySense> getSensesForWord(String word)
          Returns a list of IWiktionarySenses encoded on a page with the given title.
 List<IWiktionarySense> getSensesForWord(String word, boolean normalize)
          Returns a list of IWiktionarySenses encoded on a page with the given title.
 List<IWiktionarySense> getSensesForWord(String word, IWiktionarySenseFilter filter)
          Returns a list of IWiktionarySenses encoded on a page with the given title.
abstract  List<IWiktionarySense> getSensesForWord(String word, IWiktionarySenseFilter filter, boolean normalize)
          Returns a list of IWiktionarySenses encoded on a page with the given title.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.tudarmstadt.ukp.jwktl.api.IWiktionary
close, isClosed
 

Constructor Detail

AbstractWiktionary

public AbstractWiktionary()
Method Detail

getPagesForWord

public List<IWiktionaryPage> getPagesForWord(String word,
                                             boolean normalize)
Description copied from interface: IWiktionary
Returns the page with the given title. The method returns also pages, whose title matches in a case insensitive or string-normalized manner. The latter means that strings are converted to lower case, and umlauts or accents are substituted by their canonical form. The word "prêt-à-porter" is, e.g., normalized to "pret-a-porter". Use false for exact matches.

Specified by:
getPagesForWord in interface IWiktionary

getPagesForWord

public abstract List<IWiktionaryPage> getPagesForWord(String word,
                                                      IWiktionaryPageFilter filter,
                                                      boolean normalize)
Description copied from interface: IWiktionary
Returns the page with the given title. The method returns also pages, whose title matches in a case insensitive or string-normalized manner. The latter means that strings are converted to lower case, and umlauts or accents are substituted by their canonical form. The word "prêt-à-porter" is, e.g., normalized to "pret-a-porter". Using the given IWiktionaryPageFilter, unwanted pages can be ignored.

Specified by:
getPagesForWord in interface IWiktionary

getAllPages

public IWiktionaryIterator<IWiktionaryPage> getAllPages()
Description copied from interface: IWiktionary
Returns an iterator over all IWiktionaryPages within the Wiktionary edition. The pages are sorted by their page id.

Specified by:
getAllPages in interface IWiktionary

getAllPages

public IWiktionaryIterator<IWiktionaryPage> getAllPages(boolean sortByTitle)
Description copied from interface: IWiktionary
Returns an iterator over all IWiktionaryPages within the Wiktionary edition.

Specified by:
getAllPages in interface IWiktionary
Parameters:
sortByTitle - if true sort by page title (case sensitive); otherwise by page id.

getAllPages

public IWiktionaryIterator<IWiktionaryPage> getAllPages(boolean sortByTitle,
                                                        boolean normalize)
Description copied from interface: IWiktionary
Returns an iterator over all IWiktionaryPages within the Wiktionary edition.

Specified by:
getAllPages in interface IWiktionary
Parameters:
sortByTitle - if true sort by page title; otherwise by page id.
normalize - if true sort case insensitive; otherwise case sensitive (only affects sorting by title).

getAllPages

public IWiktionaryIterator<IWiktionaryPage> getAllPages(IWiktionaryPageFilter filter)
Description copied from interface: IWiktionary
Returns an iterator over all IWiktionaryPages within the Wiktionary edition. The pages are sorted by their page id. Using the given IWiktionaryPageFilter, unwanted pages can be ignored.

Specified by:
getAllPages in interface IWiktionary

getAllPages

public IWiktionaryIterator<IWiktionaryPage> getAllPages(IWiktionaryPageFilter filter,
                                                        boolean sortByTitle)
Description copied from interface: IWiktionary
Returns an iterator over all IWiktionaryPages within the Wiktionary edition. Using the given IWiktionaryPageFilter, unwanted pages can be ignored.

Specified by:
getAllPages in interface IWiktionary
sortByTitle - if true sort by page title (case sensitive); otherwise by page id.

getAllPages

public abstract IWiktionaryIterator<IWiktionaryPage> getAllPages(IWiktionaryPageFilter filter,
                                                                 boolean sortByTitle,
                                                                 boolean normalize)
Description copied from interface: IWiktionary
Returns an iterator over all IWiktionaryPages within the Wiktionary edition. Using the given IWiktionaryPageFilter, unwanted pages can be ignored.

Specified by:
getAllPages in interface IWiktionary
sortByTitle - if true sort by page title; otherwise by page id.
normalize - if true sort case insensitive; otherwise case sensitive (only affects sorting by title).

getEntriesForWord

public List<IWiktionaryEntry> getEntriesForWord(String word)
Description copied from interface: IWiktionary
Returns a list of IWiktionaryEntrys encoded on a page with the given title. The method only returns an entry if the page title matches exactly. Use IWiktionary.getEntriesForWord(String, boolean) for case insensitive and string-normalized matching.

Specified by:
getEntriesForWord in interface IWiktionary

getEntriesForWord

public List<IWiktionaryEntry> getEntriesForWord(String word,
                                                boolean normalize)
Description copied from interface: IWiktionary
Returns a list of IWiktionaryEntrys encoded on a page with the given title.

Specified by:
getEntriesForWord in interface IWiktionary
normalize - if true, match the page title in a case insensitive manner.

getEntriesForWord

public List<IWiktionaryEntry> getEntriesForWord(String word,
                                                IWiktionaryEntryFilter filter)
Description copied from interface: IWiktionary
Returns a list of IWiktionaryEntrys encoded on a page with the given title. The method only returns an entry if the page title matches exactly. Use IWiktionary.getEntriesForWord(String, boolean) for case insensitive and string-normalized matching. Using the given IWiktionaryEntryFilter, unwanted entries can be ignored.

Specified by:
getEntriesForWord in interface IWiktionary

getEntriesForWord

public abstract List<IWiktionaryEntry> getEntriesForWord(String word,
                                                         IWiktionaryEntryFilter filter,
                                                         boolean normalize)
Description copied from interface: IWiktionary
Returns a list of IWiktionaryEntrys encoded on a page with the given title. Using the given IWiktionaryEntryFilter, unwanted entries can be ignored.

Specified by:
getEntriesForWord in interface IWiktionary
normalize - if true, match the page title in a case insensitive manner.

getAllEntries

public IWiktionaryIterator<IWiktionaryEntry> getAllEntries()
Description copied from interface: IWiktionary
Returns an iterator over all IWiktionaryEntrys within the Wiktionary edition. This is equivalent to iterating over all pages using IWiktionary.getAllPages() and then over the page's entries using IWiktionaryPage.getEntries(). The pages are sorted by their page id; the entries by their index.

Specified by:
getAllEntries in interface IWiktionary

getAllEntries

public IWiktionaryIterator<IWiktionaryEntry> getAllEntries(boolean sortByTitle)
Description copied from interface: IWiktionary
Returns an iterator over all IWiktionaryEntrys within the Wiktionary edition. This is equivalent to iterating over all pages using IWiktionary.getAllPages(boolean) and then over the page's entries using IWiktionaryPage.getEntries(). The pages are sorted according to the method's parameters; the entries are sorted by their index.

Specified by:
getAllEntries in interface IWiktionary
Parameters:
sortByTitle - if true sort by page title (case sensitive); otherwise by page id.

getAllEntries

public IWiktionaryIterator<IWiktionaryEntry> getAllEntries(boolean sortByTitle,
                                                           boolean normalize)
Description copied from interface: IWiktionary
Returns an iterator over all IWiktionaryEntrys within the Wiktionary edition. This is equivalent to iterating over all pages using IWiktionary.getAllPages(boolean, boolean) and then over the page's entries using IWiktionaryPage.getEntries(). The pages are sorted according to the method's parameters; the entries are sorted by their index.

Specified by:
getAllEntries in interface IWiktionary
Parameters:
sortByTitle - if true sort by page title; otherwise by page id.
normalize - if true sort case insensitive; otherwise case sensitive (only affects sorting by title).

getAllEntries

public IWiktionaryIterator<IWiktionaryEntry> getAllEntries(IWiktionaryEntryFilter filter)
Description copied from interface: IWiktionary
Returns an iterator over all IWiktionaryEntrys within the Wiktionary edition. This is equivalent to iterating over all pages using IWiktionary.getAllPages() and then over the page's entries using IWiktionaryPage.getEntries(). The pages are sorted by their page id; the entries by their index. Using the given IWiktionaryEntryFilter, unwanted entries can be ignored.

Specified by:
getAllEntries in interface IWiktionary

getAllEntries

public IWiktionaryIterator<IWiktionaryEntry> getAllEntries(IWiktionaryEntryFilter filter,
                                                           boolean sortByTitle)
Description copied from interface: IWiktionary
Returns an iterator over all IWiktionaryEntrys within the Wiktionary edition. This is equivalent to iterating over all pages using IWiktionary.getAllPages(boolean) and then over the page's entries using IWiktionaryPage.getEntries(). The pages are sorted according to the method's parameters; the entries are sorted by their index. Using the given IWiktionaryEntryFilter, unwanted entries can be ignored.

Specified by:
getAllEntries in interface IWiktionary
sortByTitle - if true sort by page title (case sensitive); otherwise by page id.

getAllEntries

public abstract IWiktionaryIterator<IWiktionaryEntry> getAllEntries(IWiktionaryEntryFilter filter,
                                                                    boolean sortByTitle,
                                                                    boolean normalize)
Description copied from interface: IWiktionary
Returns an iterator over all IWiktionaryEntrys within the Wiktionary edition. This is equivalent to iterating over all pages using IWiktionary.getAllPages(boolean, boolean) and then over the page's entries using IWiktionaryPage.getEntries(). The pages are sorted according to the method's parameters; the entries are sorted by their index. Using the given IWiktionaryEntryFilter, unwanted entries can be ignored.

Specified by:
getAllEntries in interface IWiktionary
sortByTitle - if true sort by page title; otherwise by page id.
normalize - if true sort case insensitive; otherwise case sensitive (only affects sorting by title).

getSensesForWord

public List<IWiktionarySense> getSensesForWord(String word)
Description copied from interface: IWiktionary
Returns a list of IWiktionarySenses encoded on a page with the given title. The method only returns the senses if the page title matches exactly. Use IWiktionary.getSensesForWord(String, boolean) for case insensitive and string-normalized matching.

Specified by:
getSensesForWord in interface IWiktionary

getSensesForWord

public List<IWiktionarySense> getSensesForWord(String word,
                                               boolean normalize)
Description copied from interface: IWiktionary
Returns a list of IWiktionarySenses encoded on a page with the given title.

Specified by:
getSensesForWord in interface IWiktionary
normalize - if true, match the page title in a case insensitive manner.

getSensesForWord

public List<IWiktionarySense> getSensesForWord(String word,
                                               IWiktionarySenseFilter filter)
Description copied from interface: IWiktionary
Returns a list of IWiktionarySenses encoded on a page with the given title. The method only returns the senses if the page title matches exactly. Use IWiktionary.getSensesForWord(String, boolean) for case insensitive and string-normalized matching. Using the given IWiktionarySenseFilter, unwanted word senses can be ignored.

Specified by:
getSensesForWord in interface IWiktionary

getSensesForWord

public abstract List<IWiktionarySense> getSensesForWord(String word,
                                                        IWiktionarySenseFilter filter,
                                                        boolean normalize)
Description copied from interface: IWiktionary
Returns a list of IWiktionarySenses encoded on a page with the given title. Using the given IWiktionarySenseFilter, unwanted word senses can be ignored.

Specified by:
getSensesForWord in interface IWiktionary
normalize - if true, match the page title in a case insensitive manner.

getAllSenses

public IWiktionaryIterator<IWiktionarySense> getAllSenses()
Description copied from interface: IWiktionary
Returns an iterator over all IWiktionarySenses within the Wiktionary edition. This is equivalent to iterating over all pages using IWiktionary.getAllPages() and then over the page's entries using IWiktionaryPage.getEntries() and then over the entry's senses using IWiktionaryEntry.getSenses(). The pages are sorted by their page id; the entries and senses by their index.

Specified by:
getAllSenses in interface IWiktionary

getAllSenses

public IWiktionaryIterator<IWiktionarySense> getAllSenses(boolean sortByTitle)
Description copied from interface: IWiktionary
Returns an iterator over all IWiktionaryEntrys within the Wiktionary edition. This is equivalent to iterating over all pages using IWiktionary.getAllPages(boolean) and then over the page's entries using IWiktionaryPage.getEntries() and then over the entry's senses using IWiktionaryEntry.getSenses(). The pages are sorted according to the method's parameters; the entries and senses are sorted by their index.

Specified by:
getAllSenses in interface IWiktionary
Parameters:
sortByTitle - if true sort by page title (case sensitive); otherwise by page id.

getAllSenses

public IWiktionaryIterator<IWiktionarySense> getAllSenses(boolean sortByTitle,
                                                          boolean normalize)
Description copied from interface: IWiktionary
Returns an iterator over all IWiktionaryEntrys within the Wiktionary edition. This is equivalent to iterating over all pages using IWiktionary.getAllPages(boolean, boolean) and then over the page's entries using IWiktionaryPage.getEntries() and then over the entry's senses using IWiktionaryEntry.getSenses(). The pages are sorted according to the method's parameters; the entries and senses are sorted by their index.

Specified by:
getAllSenses in interface IWiktionary
Parameters:
sortByTitle - if true sort by page title; otherwise by page id.
normalize - if true sort case insensitive; otherwise case sensitive (only affects sorting by title).

getAllSenses

public IWiktionaryIterator<IWiktionarySense> getAllSenses(IWiktionarySenseFilter filter)
Description copied from interface: IWiktionary
Returns an iterator over all IWiktionarySenses within the Wiktionary edition. This is equivalent to iterating over all pages using IWiktionary.getAllPages() and then over the page's entries using IWiktionaryPage.getEntries() and then over the entry's senses using IWiktionaryEntry.getSenses(). The pages are sorted by their page id; the entries and senses by their index. Using the given IWiktionarySenseFilter, unwanted word senses can be ignored.

Specified by:
getAllSenses in interface IWiktionary

getAllSenses

public IWiktionaryIterator<IWiktionarySense> getAllSenses(IWiktionarySenseFilter filter,
                                                          boolean sortByTitle)
Description copied from interface: IWiktionary
Returns an iterator over all IWiktionaryEntrys within the Wiktionary edition. This is equivalent to iterating over all pages using IWiktionary.getAllPages(boolean) and then over the page's entries using IWiktionaryPage.getEntries() and then over the entry's senses using IWiktionaryEntry.getSenses(). The pages are sorted according to the method's parameters; the entries and senses are sorted by their index. Using the given IWiktionarySenseFilter, unwanted word senses can be ignored.

Specified by:
getAllSenses in interface IWiktionary
sortByTitle - if true sort by page title (case sensitive); otherwise by page id.

getAllSenses

public abstract IWiktionaryIterator<IWiktionarySense> getAllSenses(IWiktionarySenseFilter filter,
                                                                   boolean sortByTitle,
                                                                   boolean normalize)
Description copied from interface: IWiktionary
Returns an iterator over all IWiktionaryEntrys within the Wiktionary edition. This is equivalent to iterating over all pages using IWiktionary.getAllPages(boolean, boolean) and then over the page's entries using IWiktionaryPage.getEntries() and then over the entry's senses using IWiktionaryEntry.getSenses(). The pages are sorted according to the method's parameters; the entries and senses are sorted by their index. Using the given IWiktionarySenseFilter, unwanted word senses can be ignored.

Specified by:
getAllSenses in interface IWiktionary
sortByTitle - if true sort by page title; otherwise by page id.
normalize - if true sort case insensitive; otherwise case sensitive (only affects sorting by title).


Copyright © 2011-2013 Ubiquitous Knowledge Processing (UKP) Lab. All Rights Reserved.