|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.tudarmstadt.ukp.jwktl.api.filter.WiktionaryPageFilter
de.tudarmstadt.ukp.jwktl.api.filter.WiktionaryEntryFilter
public class WiktionaryEntryFilter
Default implementation of the 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.
Field Summary | |
---|---|
protected Set<PartOfSpeech> |
allowedPartsOfSpeech
|
protected Set<ILanguage> |
allowedWordLanguages
|
Fields inherited from class de.tudarmstadt.ukp.jwktl.api.filter.WiktionaryPageFilter |
---|
allowedEntryLanguages |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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 . |
Methods inherited from class de.tudarmstadt.ukp.jwktl.api.filter.WiktionaryPageFilter |
---|
accept, acceptEntryLanguage, clearAllowedEntryLanguages, getAllowedEntryLanguages, setAllowedEntryLanguages, setAllowedEntryLanguages |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Set<ILanguage> allowedWordLanguages
protected Set<PartOfSpeech> allowedPartsOfSpeech
Constructor Detail |
---|
public WiktionaryEntryFilter()
public WiktionaryEntryFilter(Set<ILanguage> allowedEntryLanguages, Set<ILanguage> allowedWordLanguages, Set<PartOfSpeech> allowedPartsOfSpeech)
Method Detail |
---|
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |