MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

ch.ethz.mxquery.sms.ftstore
Class WildcardUtils

java.lang.Object
  extended by ch.ethz.mxquery.sms.ftstore.WildcardUtils

public class WildcardUtils
extends java.lang.Object

Helper class for Wildcard usage FIXME: can be done more efficient when using regex, but not available with CLDC API


Constructor Summary
WildcardUtils()
           
 
Method Summary
 java.util.Vector checkAgainstOriginalQueryMultipleWildcard(java.util.Vector words, java.util.Vector wildcardPositionPairs)
          checks the found words against the wildcards and their positions needs to be done as n-gram index returns false positives
 boolean checkForWildcards(java.lang.String phrase)
          checks for wildcards in the phrase "phrase"
 boolean contains(java.lang.String s, java.lang.String subs)
          returns true if string subs is contained in string s
 java.lang.String getPrefix(java.lang.String word, java.lang.String wildcard)
          returns the prefix of word "word" containing wildcard "wildcard"
 java.lang.String[] getPrefixAndSuffix(java.lang.String word, java.lang.String wildcard)
          returns the prefix and suffix of word "word" containing wildcard "wildcard"
 java.lang.String getSuffix(java.lang.String word, java.lang.String wildcard)
          returns the suffix of word "word" containing wildcard "wildcard"
 java.util.Vector getWildcardPosition(java.lang.String word)
          returns the position of the wildcards (infix, prefix or suffix)
 java.util.Vector getWildcards(java.lang.String word)
          returns the wildcards contained in word "word"
 java.util.Vector parseWord(java.lang.String word)
          returns wildcards in "word" (if mutiple wildcards are contained in one word
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WildcardUtils

public WildcardUtils()
Method Detail

checkForWildcards

public boolean checkForWildcards(java.lang.String phrase)
checks for wildcards in the phrase "phrase"


parseWord

public java.util.Vector parseWord(java.lang.String word)
returns wildcards in "word" (if mutiple wildcards are contained in one word


getWildcardPosition

public java.util.Vector getWildcardPosition(java.lang.String word)
returns the position of the wildcards (infix, prefix or suffix)


getWildcards

public java.util.Vector getWildcards(java.lang.String word)
returns the wildcards contained in word "word"


getPrefix

public java.lang.String getPrefix(java.lang.String word,
                                  java.lang.String wildcard)
returns the prefix of word "word" containing wildcard "wildcard"


getSuffix

public java.lang.String getSuffix(java.lang.String word,
                                  java.lang.String wildcard)
returns the suffix of word "word" containing wildcard "wildcard"


getPrefixAndSuffix

public java.lang.String[] getPrefixAndSuffix(java.lang.String word,
                                             java.lang.String wildcard)
returns the prefix and suffix of word "word" containing wildcard "wildcard"


contains

public boolean contains(java.lang.String s,
                        java.lang.String subs)
returns true if string subs is contained in string s


checkAgainstOriginalQueryMultipleWildcard

public java.util.Vector checkAgainstOriginalQueryMultipleWildcard(java.util.Vector words,
                                                                  java.util.Vector wildcardPositionPairs)
checks the found words against the wildcards and their positions needs to be done as n-gram index returns false positives


MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich