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

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
ALexelt, CLexelt

public interface ILexelt
extends java.io.Serializable

lexelt interface. contains instances of the same lexelt id.

Author:
zhongzhi

Method Summary
 boolean addInstance(IInstance p_iInstance)
          the same as addInstance(p_iInstance, false)
 boolean addInstance(IInstance p_iInstance, boolean p_AddToStat)
          add one instance into Lexelt.
 java.lang.String getID()
          get the ID of this lexelt
 IInstance getInstance(int p_Index)
          get instance with index p_Index
 java.lang.String getInstanceDocID(int p_Index)
          get the document id of instance p_Index
 java.lang.String getInstanceID(int p_Index)
          get the instance id of instance p_Index
 java.util.ArrayList<java.lang.String> getInstanceIDs()
          get the instance id list of all the instances in Lexelt
 IStatistic getStatistic()
          get the statistic information of this lexelt
 java.util.ArrayList<java.lang.String> getTag(int p_Index)
          get the tags of instance
 java.util.ArrayList<java.lang.String> getTag(java.lang.String p_InstanceID)
          get the tag of p_InstanceID
 java.lang.String getValue(int p_Index, int p_KeyIndex)
          get the p_Key's value of instance p_Index
 java.lang.String getValue(int p_Index, java.lang.String p_Key)
          get the p_Key's value of instance p_Index
 java.lang.String getValue(java.lang.String p_InstanceID, java.lang.String p_Key)
          get the p_Key's value of instance p_InstanceID
 IInstance removeInstance(int p_Index)
          remove the instance of index p_Index.
 IInstance removeInstance(java.lang.String p_InstanceID)
          remove the instance of index p_Index.
 boolean setStatistic(IStatistic p_iStatistic)
          set the statistic information to the lexelt
 int size()
          get the number of instances in lexelt
 

Method Detail

addInstance

boolean addInstance(IInstance p_iInstance,
                    boolean p_AddToStat)
add one instance into Lexelt. if p_AddToStat is true, the instance information will also be added to the statistic information

Parameters:
p_iInstance - instance
p_AddToStat - add to statistic or not
Returns:
success or not

addInstance

boolean addInstance(IInstance p_iInstance)
the same as addInstance(p_iInstance, false)

Parameters:
p_iInstance - instance
Returns:
add success or not

removeInstance

IInstance removeInstance(int p_Index)
remove the instance of index p_Index. whether the information of this instance will be removed from the statistic is according to the implementation.

Parameters:
p_Index - instance index
Returns:
removed instance

removeInstance

IInstance removeInstance(java.lang.String p_InstanceID)
remove the instance of index p_Index. whether the information of this instance will be removed from the statistic is according to the implementation

Parameters:
p_InstanceID - instance id
Returns:
removed instance

getStatistic

IStatistic getStatistic()
get the statistic information of this lexelt

Returns:
the statistic information

setStatistic

boolean setStatistic(IStatistic p_iStatistic)
set the statistic information to the lexelt

Parameters:
p_iStatistic - statistic information
Returns:
success or not

getInstanceIDs

java.util.ArrayList<java.lang.String> getInstanceIDs()
get the instance id list of all the instances in Lexelt

Returns:
instance id list

getID

java.lang.String getID()
get the ID of this lexelt

Returns:
lexelt ID

getTag

java.util.ArrayList<java.lang.String> getTag(int p_Index)
get the tags of instance

Parameters:
p_Index - instance index
Returns:
instance tags

getTag

java.util.ArrayList<java.lang.String> getTag(java.lang.String p_InstanceID)
get the tag of p_InstanceID

Parameters:
p_InstanceID - instance id
Returns:
instance tags

size

int size()
get the number of instances in lexelt

Returns:
size

getInstanceID

java.lang.String getInstanceID(int p_Index)
get the instance id of instance p_Index

Parameters:
p_Index - instance id
Returns:
instance id

getInstanceDocID

java.lang.String getInstanceDocID(int p_Index)
get the document id of instance p_Index

Parameters:
p_Index - instance id
Returns:
doc id

getValue

java.lang.String getValue(java.lang.String p_InstanceID,
                          java.lang.String p_Key)
get the p_Key's value of instance p_InstanceID

Parameters:
p_InstanceID - instance id
p_Key - feature name
Returns:
feature value

getValue

java.lang.String getValue(int p_Index,
                          java.lang.String p_Key)
get the p_Key's value of instance p_Index

Parameters:
p_Index - instance index
p_Key - feature name
Returns:
feature value

getValue

java.lang.String getValue(int p_Index,
                          int p_KeyIndex)
get the p_Key's value of instance p_Index

Parameters:
p_Index - instance index
p_KeyIndex - feature index
Returns:
feature value

getInstance

IInstance getInstance(int p_Index)
get instance with index p_Index

Parameters:
p_Index - instance index
Returns:
instance