de.unima.ki.mmatch.descriptions
Class Term

java.lang.Object
  extended by de.unima.ki.mmatch.descriptions.Term
Direct Known Subclasses:
Text

public class Term
extends java.lang.Object


Constructor Summary
Term(java.lang.String content, boolean[] delimiter)
          Construcor for concepts
Term(java.lang.String content, boolean[] delimiter, boolean property)
          Constructor for properties (if a tokens is contained in the file ignore.txt it should not be influence the similarity value)
 
Method Summary
 int getHeadNounIndex()
           
 java.lang.String[] getNormalizedTokens()
           
 int getNumberOfTokens()
           
 int getNumberOfTokensWithoutSpecialTokens(boolean normalized)
           
 java.lang.String[] getTokens()
           
 java.lang.String[] getTokensWithoutSpecialTokens()
           
 java.lang.String[] getTokensWithoutSpecialTokensNormalizedOrNot(boolean normalized)
           
 void setDelimiter(boolean[] delimiter)
           
 java.lang.String tokensToString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Term

public Term(java.lang.String content,
            boolean[] delimiter)
     throws MMatchException
Construcor for concepts

Parameters:
content -
counter -
Throws:
MMatchException

Term

public Term(java.lang.String content,
            boolean[] delimiter,
            boolean property)
     throws MMatchException
Constructor for properties (if a tokens is contained in the file ignore.txt it should not be influence the similarity value)

Parameters:
content -
property -
Throws:
MMatchException
Method Detail

setDelimiter

public void setDelimiter(boolean[] delimiter)
Parameters:
values - The number of hyphens, blanks and underscores which occur in the ontology.

getTokens

public java.lang.String[] getTokens()
Returns:
The array with non-normalized tokens and with the special tokens.

getTokensWithoutSpecialTokens

public java.lang.String[] getTokensWithoutSpecialTokens()
Returns:
The array with non-nromalized tokens and without the special tokens.

getNumberOfTokensWithoutSpecialTokens

public int getNumberOfTokensWithoutSpecialTokens(boolean normalized)
Parameters:
normalized - True if the number of the normalized tokens without special tokens is required, false if the number of non-normalized tokens without special tokens is required.
Returns:
The number of normalized/non-normalized tokens.

getTokensWithoutSpecialTokensNormalizedOrNot

public java.lang.String[] getTokensWithoutSpecialTokensNormalizedOrNot(boolean normalized)
Parameters:
normalized - True if the method should return the array of normalized tokens without special tokens, false if the method should return the array of nin-normalized tokens without special tokens.
Returns:
The requested array.

getNormalizedTokens

public java.lang.String[] getNormalizedTokens()
Returns:
The array with normalized tokens and special tokens.

getNumberOfTokens

public int getNumberOfTokens()
Returns:
The number of tokens which this term consists of.

getHeadNounIndex

public int getHeadNounIndex()
                     throws MMatchException
Returns:
Index of the headnoun.
Throws:
MMatchException

tokensToString

public java.lang.String tokensToString()
                                throws MMatchException
Returns:
A string with the normalized tokens and the head noun format: content: normalizedToken[0], normalizedToken[1],... if normalizedToken == head noun: normalizedToken[2] (!)
Throws:
MMatchException