edu.illinois.cs.cogcomp.lbj.coref.filters
Class TypeMFilter

java.lang.Object
  extended by edu.illinois.cs.cogcomp.lbj.coref.filters.Filter<Mention>
      extended by edu.illinois.cs.cogcomp.lbj.coref.filters.MFilter
          extended by edu.illinois.cs.cogcomp.lbj.coref.filters.TypeMFilter

public class TypeMFilter
extends MFilter

Filters EntityMentions by type


Field Summary
protected  java.util.List<java.lang.String> m_includeETypes
           
protected  java.util.List<java.lang.String> m_includeMTypes
           
 
Constructor Summary
TypeMFilter(java.util.List<java.lang.String> includeMTypes)
          Constructs a filter that allows only mentions having a given mention type.
TypeMFilter(java.util.List<java.lang.String> includeMTypes, java.util.List<java.lang.String> includeETypes)
          Constructs a filter that allows only mentions having a given mention type and a given entity type.
TypeMFilter(java.lang.String includeMType)
          Constructs a filter that allows only mentions having a mention type.
TypeMFilter(java.lang.String includeMType, java.lang.String includeEType)
          Constructs a filter that allows only mentions having a given mention type and a given entity type.
 
Method Summary
 boolean accept(Mention m)
          Determines whether m should be accepted by this filter.
 void setEType(java.lang.String eType)
          Make eType the only accepted entity type.
 void setETypes(java.util.List<java.lang.String> eTypes)
          Sets the allowed entity types.
 void setMType(java.lang.String mType)
          Make mType the only accepted mention type.
 void setMTypes(java.util.List<java.lang.String> mTypes)
          Sets the allowed mention types.
 
Methods inherited from class edu.illinois.cs.cogcomp.lbj.coref.filters.Filter
getFiltered
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_includeMTypes

protected java.util.List<java.lang.String> m_includeMTypes

m_includeETypes

protected java.util.List<java.lang.String> m_includeETypes
Constructor Detail

TypeMFilter

public TypeMFilter(java.lang.String includeMType)
Constructs a filter that allows only mentions having a mention type.

Parameters:
includeMType - The allowed mention type; if null, all mention types are allowed.

TypeMFilter

public TypeMFilter(java.lang.String includeMType,
                   java.lang.String includeEType)
Constructs a filter that allows only mentions having a given mention type and a given entity type.

Parameters:
includeMType - The allowed mention type; if null, all mention types are allowed.
includeEType - The allowed entity type; if null, all entity types are allowed.

TypeMFilter

public TypeMFilter(java.util.List<java.lang.String> includeMTypes,
                   java.util.List<java.lang.String> includeETypes)
Constructs a filter that allows only mentions having a given mention type and a given entity type. Parameters are backed internally.

Parameters:
includeMTypes - The allowed mention types; if null, all mention types are allowed; if empty, no mention types are allowed.
includeETypes - The allowed entity types; if null, all entity types are allowed; if empty, no entity types are allowed.

TypeMFilter

public TypeMFilter(java.util.List<java.lang.String> includeMTypes)
Constructs a filter that allows only mentions having a given mention type.

Parameters:
includeMTypes - The allowed mention types; if null, all mention types are allowed; if empty, no mention types are allowed. Backed internally.
Method Detail

accept

public boolean accept(Mention m)
Determines whether m should be accepted by this filter.

Specified by:
accept in class MFilter
Parameters:
m - The mention in question.
Returns:
Whether the mention should be accepted by the filter.

setEType

public void setEType(java.lang.String eType)
Make eType the only accepted entity type.


setETypes

public void setETypes(java.util.List<java.lang.String> eTypes)
Sets the allowed entity types.

Parameters:
eTypes - The allowed entity types; if null, all entity types are allowed; if empty, no entity types are allowed.

setMType

public void setMType(java.lang.String mType)
Make mType the only accepted mention type.


setMTypes

public void setMTypes(java.util.List<java.lang.String> mTypes)
Sets the allowed mention types.

Parameters:
mTypes - The allowed mention types; if null, all mention types are allowed; if empty, no mention types are allowed. Backed internally.