sg.edu.nus.comp.nlp.ims.lexelt
Interface IStatistic

All Superinterfaces:
java.lang.Cloneable, java.io.Serializable
All Known Implementing Classes:
CStatistic

public interface IStatistic
extends java.lang.Cloneable, java.io.Serializable

statistic information interface. statistic of a lexelt.

Author:
zhongzhi

Method Summary
 boolean addInstance(IInstance p_iInstance)
          add one instance into the statistic.
 void clear()
          clear the statistic
 boolean contains(int p_Index, java.lang.String p_Value)
          check whether feature p_Index contains value p_Value
 int getCount(int p_Index, java.lang.String p_Value)
          get the count of value p_Value of feature p_Index
 int getCount(int p_KeyIndex, java.lang.String p_Value, java.lang.String p_Tag)
          get the count of value p_Value of feature p_Key with p_Tag
 int getCount(java.lang.String p_Key, java.lang.String p_Value)
          get the count of value p_Value of feature p_Key
 int getCount(java.lang.String p_Key, java.lang.String p_Value, java.lang.String p_Tag)
          get the count of value p_Value of feature p_Key with p_Tag
 java.lang.String getDefaultValue()
          get the default value of feature
 int getIndex(java.lang.String p_Key)
          get the feature index of feature p_Key
 java.lang.String getKey(int p_Index)
          get the feature name of feature p_Index
 java.util.List<java.lang.String> getKeys()
          get the list of feature names in the statistic
 int getParameter(java.lang.String p_Parameter)
          get the value of p_Parameter
 int getTagCount(java.lang.String p_Tag)
          get count of tag
 java.util.Set<java.lang.String> getTags()
          get the tag list
 java.util.List<java.lang.String> getTagsInOrder()
          get the tags in order
 java.lang.String getType(int p_Index)
          get the feature type of feature p_Index
 java.lang.String getType(java.lang.String p_Key)
          get feature type of feature p_Key
 java.util.List<java.lang.String> getValue(int p_Index)
          get the value list of feature p_Index
 java.util.List<java.lang.String> getValue(java.lang.String p_Key)
          get the value list of feature p_key
 boolean isProcessed()
          check whether the statistic object has been processed like filtering and some others
 boolean loadFromFile(java.lang.String p_FileName)
          load the statistic information from file
 boolean removeInstance(IInstance p_iInstance)
          remove one instance from the statistic
 void select(IFeatureSelector p_Selector)
          select features
 boolean setParameter(java.lang.String p_Parameter, int p_Value)
          set parameter of the statistic information
 int size()
          get the number of instances
 boolean writeToFile(java.lang.String p_FileName)
          write the statistic information into file
 

Method Detail

addInstance

boolean addInstance(IInstance p_iInstance)
add one instance into the statistic.

Parameters:
p_iInstance - instance
Returns:
add success or not

removeInstance

boolean removeInstance(IInstance p_iInstance)
remove one instance from the statistic

Parameters:
p_iInstance - instance
Returns:
success or not

loadFromFile

boolean loadFromFile(java.lang.String p_FileName)
load the statistic information from file

Parameters:
p_FileName - statistic file
Returns:
success or not

writeToFile

boolean writeToFile(java.lang.String p_FileName)
write the statistic information into file

Parameters:
p_FileName - file to be written
Returns:
success or not

setParameter

boolean setParameter(java.lang.String p_Parameter,
                     int p_Value)
set parameter of the statistic information

Parameters:
p_Parameter - parameter name
p_Value - parameter value
Returns:
success or not

getParameter

int getParameter(java.lang.String p_Parameter)
get the value of p_Parameter

Parameters:
p_Parameter - parameter name
Returns:
value

getTagCount

int getTagCount(java.lang.String p_Tag)
get count of tag

Parameters:
p_Tag - tag name
Returns:
tag count

getTags

java.util.Set<java.lang.String> getTags()
get the tag list

Returns:
tag list

getTagsInOrder

java.util.List<java.lang.String> getTagsInOrder()
get the tags in order

Returns:
tag list

size

int size()
get the number of instances

Returns:
size

getKeys

java.util.List<java.lang.String> getKeys()
get the list of feature names in the statistic

Returns:
list of keys

getIndex

int getIndex(java.lang.String p_Key)
get the feature index of feature p_Key

Parameters:
p_Key - feature name
Returns:
feature index

getKey

java.lang.String getKey(int p_Index)
get the feature name of feature p_Index

Parameters:
p_Index - feature index
Returns:
feature name

getType

java.lang.String getType(java.lang.String p_Key)
get feature type of feature p_Key

Parameters:
p_Key - feature name
Returns:
feature type

getType

java.lang.String getType(int p_Index)
get the feature type of feature p_Index

Parameters:
p_Index - feature index
Returns:
feature type

getValue

java.util.List<java.lang.String> getValue(java.lang.String p_Key)
get the value list of feature p_key

Parameters:
p_Key - feature name
Returns:
value list

getValue

java.util.List<java.lang.String> getValue(int p_Index)
get the value list of feature p_Index

Parameters:
p_Index - feature index
Returns:
value list

getDefaultValue

java.lang.String getDefaultValue()
get the default value of feature

Returns:
default value

getCount

int getCount(java.lang.String p_Key,
             java.lang.String p_Value)
get the count of value p_Value of feature p_Key

Parameters:
p_Key - feature name
p_Value - feature value
Returns:
count

getCount

int getCount(int p_Index,
             java.lang.String p_Value)
get the count of value p_Value of feature p_Index

Parameters:
p_Index - feature index
p_Value - feature value
Returns:
count

getCount

int getCount(java.lang.String p_Key,
             java.lang.String p_Value,
             java.lang.String p_Tag)
get the count of value p_Value of feature p_Key with p_Tag

Parameters:
p_Key - feature name
p_Value - feature value
p_Tag - tag
Returns:
count

getCount

int getCount(int p_KeyIndex,
             java.lang.String p_Value,
             java.lang.String p_Tag)
get the count of value p_Value of feature p_Key with p_Tag

Parameters:
p_KeyIndex - feature index
p_Value - feature value
p_Tag - tag
Returns:
count

contains

boolean contains(int p_Index,
                 java.lang.String p_Value)
check whether feature p_Index contains value p_Value

Parameters:
p_Index - feature index
p_Value - feature value
Returns:
contains or not

select

void select(IFeatureSelector p_Selector)
select features

Parameters:
p_Selector - feature selector

isProcessed

boolean isProcessed()
check whether the statistic object has been processed like filtering and some others

Returns:
status

clear

void clear()
clear the statistic