public class LexicalStructureElementFilter extends Object implements StructureElementFilter
StructureElementFilter
selects only LexicalStructureElements whose
lemma is not a stopword and whose pos is among the set of posOfInterestConstructor and Description |
---|
LexicalStructureElementFilter(Set<String> stopwords,
Set<String> posOfInterest)
Constructor for LexicalStructureElementFilter
|
Modifier and Type | Method and Description |
---|---|
boolean |
isElementOfInterest(StructureElement element)
Returns whether
element must be selected or not according to a
policy specified by this object |
public LexicalStructureElementFilter(Set<String> stopwords, Set<String> posOfInterest)
stopwords
- the set of stopwords (i.e., lemmas not to be selected)posOfInterest
- the set of part-of-speeches of interest (i.e., lexicalStructureElements
whose pos is out of this set will not be selected by the method isElementOfInterest
)public boolean isElementOfInterest(StructureElement element)
StructureElementFilter
element
must be selected or not according to a
policy specified by this objectisElementOfInterest
in interface StructureElementFilter
element
- a StructureElementelement
must be selected or not according to a
policy specified by this objectCopyright © 2017 Semantic Analytics Group @ Uniroma2. All rights reserved.