cz.cuni.mff.procasor.tokenizer
Interface Tokens


public interface Tokens

Author:
jankoo This is interface is for using tokenizer class. There are several methods which should be called when st. will be removed from project. Than there is method doJob for generating results class TokenizerResults. And method which handles joining and method for handling construction of token a one for handling hand written token. (boolean in doJob method indicates if there should be stored results (called first time) or not)

Method Summary
 java.util.List allTokens()
          Function which returns all token labels used in project.
 void constructedToken(java.util.List l, TypeSentence s)
          This function should be called when the user mixed the words for selected token label.
 TokenizerResults doJob(TypeSentence s, Entity e, boolean b)
           
 int getPercentsOfCommonToPerfomLerning()
          This return the actual percents of similarity when these tokens are marked as similar.
 int getSizeOfList()
          This return the length of the token list which is returned in TokenizerResults
 void join(java.lang.String st, TypeSentence s2)
          This function should be called when two tokens were merged.
 void removingEntity(Entity e)
          This function change the state of tokens' internal structures if the entity is removed.
 void removingModel(UseCaseModel m)
          This function change the state of tokens' internal structures if the model is removed.
 void removingSentence(TypeSentence s)
          This function change the state of tokens' internal structures if the sentence is removed.
 void removingUseCase(UseCase uc)
          This function change the state of tokens' internal structures if the use case is removed.
 void setPercentsOfCommonToPerfomLerning(int percents)
          This function change the variable which determinates wheather too tokens are similiar or not.
 void setSizeOfList(int sizeOfList)
          This change the length of the token list which is returned in TokenizerResults
 java.util.Map tokensAndSentences()
          This function returns the Map of token labels and the sentences in which the token label was used.
 void writtenByHand(java.lang.String st, TypeSentence s)
          This function should be called when the user has written the token label by hand.
 

Method Detail

doJob

public TokenizerResults doJob(TypeSentence s,
                              Entity e,
                              boolean b)
Parameters:
s - sentence (TypeSentence) on which generation is done
e - entity sentence belongs to
b - if true then the analysed result will be stored
Returns:
TokenizerResults

tokensAndSentences

public java.util.Map tokensAndSentences()
This function returns the Map of token labels and the sentences in which the token label was used.

Returns:
Map of token labels and the sentences where were used

allTokens

public java.util.List allTokens()
Function which returns all token labels used in project.

Returns:
List of all tokens in project

removingSentence

public void removingSentence(TypeSentence s)
This function change the state of tokens' internal structures if the sentence is removed.

Parameters:
s - sentence (TypeSentence) which gonna be removed from project

removingUseCase

public void removingUseCase(UseCase uc)
This function change the state of tokens' internal structures if the use case is removed.

Parameters:
uc - UseCase which gonna be removed from project with their sentences

removingModel

public void removingModel(UseCaseModel m)
This function change the state of tokens' internal structures if the model is removed.

Parameters:
m - model which gonna be removed from project with their use cases

removingEntity

public void removingEntity(Entity e)
This function change the state of tokens' internal structures if the entity is removed.

Parameters:
e - Entity which gonna be removed from project

join

public void join(java.lang.String st,
                 TypeSentence s2)
This function should be called when two tokens were merged. The sentence could be merged with some action, which already has its own token label. This method updates the selected token's label and the Tokens internal structures.

Parameters:
st - the token label of the action to which this Sentence should be merged
s2 - sentence (TypeSentnce) to which this token refers

constructedToken

public void constructedToken(java.util.List l,
                             TypeSentence s)
This function should be called when the user mixed the words for selected token label. This method updates the selected token's label and the Tokens internal structures.

Parameters:
l - List of Words
s - sentence (TypeSentence) to which this token refers

writtenByHand

public void writtenByHand(java.lang.String st,
                          TypeSentence s)
This function should be called when the user has written the token label by hand. This method updates the selected token's label and the Tokens internal structures.

Parameters:
st - the token label written by user
s - sentence (TypeSentence) to which this token refers

getPercentsOfCommonToPerfomLerning

public int getPercentsOfCommonToPerfomLerning()
This return the actual percents of similarity when these tokens are marked as similar. More you can learn in Programmer Documentation in chapter Token generation.

Returns:
the percents of similarity

setPercentsOfCommonToPerfomLerning

public void setPercentsOfCommonToPerfomLerning(int percents)
This function change the variable which determinates wheather too tokens are similiar or not. More you can learn in Programmer Documentation in chapter Token generation.

Parameters:
percents - percents of similarity

getSizeOfList

public int getSizeOfList()
This return the length of the token list which is returned in TokenizerResults

Returns:
int length of the list

setSizeOfList

public void setSizeOfList(int sizeOfList)
This change the length of the token list which is returned in TokenizerResults

Parameters:
sizeOfList - the length of the list