|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.columbia.cs.ref.model.pattern.Pattern<Document,TokenizedDocument>
edu.columbia.cs.cg.pattern.prdualrank.SearchPattern<T,D>
T
- the type of document to be retrievedD
- thepublic class SearchPattern<T extends Document,D extends TokenizedDocument>
The Class SearchPattern represents a pattern that can be used for Document
Retrieval.
A SearchPattern is composed by several phrases that can be used to query for the
documents.
Constructor Summary | |
---|---|
SearchPattern(java.util.List<java.lang.String[]> phrases)
Instantiates a new search pattern by providing the set of phrases to be used as queries |
Method Summary | |
---|---|
java.util.List<Document> |
findMatch(TokenizedDocument d)
Abstract method that finds all matches in the input document |
java.util.List<java.lang.String[]> |
getNGrams()
Gets the list of phrases from the search pattern |
static boolean |
isPatternizable(java.lang.String[] nGram)
Static method that checks is a given phrase can be used as a valid pattern. |
boolean |
isValid()
Checks if is the search pattern is valid A search pattern is valid if: 1) None of its phrases are stop words 2) It does not contain repeated phrases 3) The phrases do not overlap |
Methods inherited from class edu.columbia.cs.ref.model.pattern.Pattern |
---|
equals, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SearchPattern(java.util.List<java.lang.String[]> phrases)
phrases
- the phrases to be used as queriesMethod Detail |
---|
public boolean isValid()
public java.util.List<Document> findMatch(TokenizedDocument d)
Pattern
findMatch
in class Pattern<Document,TokenizedDocument>
d
- the document where we are looking for the matches
public static boolean isPatternizable(java.lang.String[] nGram)
nGram
- the sequence that may be used as a phrase
public java.util.List<java.lang.String[]> getNGrams()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |