public class WiktionaryEntryFilter extends WiktionaryPageFilter implements IWiktionaryEntryFilter
IWiktionaryEntryFilter
interface
which inherits all filter options of the WiktionaryPageFilter
and additionally provides the possibility of filtering entries by word
language and part of speech.Modifier and Type | Field and Description |
---|---|
protected Set<PartOfSpeech> |
allowedPartsOfSpeech |
protected Set<ILanguage> |
allowedWordLanguages |
allowedEntryLanguages
Constructor and Description |
---|
WiktionaryEntryFilter()
Initializes a page filter without any filter restrictions.
|
WiktionaryEntryFilter(Set<ILanguage> allowedEntryLanguages,
Set<ILanguage> allowedWordLanguages,
Set<PartOfSpeech> allowedPartsOfSpeech)
Shorthand for setting the allowed entry language, word language,
and parts of speech.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(IWiktionaryEntry entry)
Return
true if the given entry should be accepted or
false if it should be filtered out. |
protected boolean |
acceptPartOfSpeech(IWiktionaryEntry entry) |
protected boolean |
acceptWordLanguage(IWiktionaryEntry entry) |
void |
clear()
Clears all filter options.
|
void |
clearAllowedPartsOfSpeech()
Clears the list of allowed parts of speech.
|
void |
clearAllowedWordLanguages()
Clears the list of allowed word languages.
|
Iterable<PartOfSpeech> |
getAllowedPartsOfSpeech()
Return an iterable of the list of all allowed parts of speech.
|
Iterable<ILanguage> |
getAllowedWordLanguages()
Return an iterable of the list of all allowed word languages.
|
void |
setAllowedPartsOfSpeech(Collection<PartOfSpeech> allowedPartsOfSpeech)
Define the set of parts of speech which are allowed for a
IWiktionaryEntry . |
void |
setAllowedPartsOfSpeech(PartOfSpeech... allowedPartsOfSpeech)
Define the set of parts of speech which are allowed for a
IWiktionaryEntry . |
void |
setAllowedWordLanguages(Collection<ILanguage> allowedWordLanguages)
Define the set of word languages which are allowed for a
IWiktionaryEntry . |
void |
setAllowedWordLanguages(ILanguage... allowedWordLanguages)
Define the set of word languages which are allowed for a
IWiktionaryEntry . |
accept, acceptEntryLanguage, clearAllowedEntryLanguages, getAllowedEntryLanguages, setAllowedEntryLanguages, setAllowedEntryLanguages
protected Set<PartOfSpeech> allowedPartsOfSpeech
public WiktionaryEntryFilter()
public WiktionaryEntryFilter(Set<ILanguage> allowedEntryLanguages, Set<ILanguage> allowedWordLanguages, Set<PartOfSpeech> allowedPartsOfSpeech)
public void clear()
WiktionaryPageFilter
clear
in class WiktionaryPageFilter
public void clearAllowedWordLanguages()
public Iterable<ILanguage> getAllowedWordLanguages()
public void setAllowedWordLanguages(ILanguage... allowedWordLanguages)
IWiktionaryEntry
. If no language is specified, the restriction
on the word language will be cleared.public void setAllowedWordLanguages(Collection<ILanguage> allowedWordLanguages)
IWiktionaryEntry
. If no language is specified, the restriction
on the word language will be cleared.protected boolean acceptWordLanguage(IWiktionaryEntry entry)
public void clearAllowedPartsOfSpeech()
public Iterable<PartOfSpeech> getAllowedPartsOfSpeech()
public void setAllowedPartsOfSpeech(PartOfSpeech... allowedPartsOfSpeech)
IWiktionaryEntry
. If no tag is specified, the restriction
on the parts of speech will be cleared.public void setAllowedPartsOfSpeech(Collection<PartOfSpeech> allowedPartsOfSpeech)
IWiktionaryEntry
. If no tag is specified, the restriction
on the parts of speech will be cleared.protected boolean acceptPartOfSpeech(IWiktionaryEntry entry)
public boolean accept(IWiktionaryEntry entry)
IWiktionaryEntryFilter
true
if the given entry should be accepted or
false
if it should be filtered out.accept
in interface IWiktionaryEntryFilter
Copyright © 2011-2016 Ubiquitous Knowledge Processing (UKP) Lab. All Rights Reserved.