|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.linguistics.search.StringSearch
org.jscience.linguistics.search.MismatchSearch
public abstract class MismatchSearch
Subclasses of MismatchSearch allow for searching with a fixed number of
possible errors. Subclasses of this class return a int array
with the first int being the position at which the hit
occurred and the second int being the number of mismatches at
the position.
Example:
int[] positions = new ShiftOrMismatches().searchString("this is null",
"nall", 1);positions[0] would be 8, positions[1] (the number of
mismatches) would be 1.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.jscience.linguistics.search.StringSearch |
|---|
StringSearch.Dispatch, StringSearch.ReflectionDispatch |
| Field Summary |
|---|
| Fields inherited from class org.jscience.linguistics.search.StringSearch |
|---|
activeDispatch, useNative |
| Constructor Summary | |
|---|---|
protected |
MismatchSearch()
Constructor for MismatchSearch. |
| Method Summary | |
|---|---|
java.lang.Object |
processBytes(byte[] pattern)
Pre-process the pattern, allowing zero errors. |
abstract java.lang.Object |
processBytes(byte[] pattern,
int k)
Pre-processes the pattern, allowing k errors. |
java.lang.Object |
processChars(char[] pattern)
Pre-processes the pattern, allowing zero errors. |
abstract java.lang.Object |
processChars(char[] pattern,
int k)
Pre-processes a char array, allowing k errors. |
java.lang.Object |
processString(java.lang.String pattern,
int k)
Pre-processes a String, allowing k errors. |
int[] |
searchBytes(byte[] text,
byte[] pattern,
int k)
Returns the position in the text at which the pattern was found. |
int[] |
searchBytes(byte[] text,
byte[] pattern,
java.lang.Object processed,
int k)
Returns the position in the text at which the pattern was found. |
int[] |
searchBytes(byte[] text,
int textEnd,
byte[] pattern,
int k)
Returns the position in the text at which the pattern was found. |
int[] |
searchBytes(byte[] text,
int textEnd,
byte[] pattern,
java.lang.Object processed,
int k)
Returns the position in the text at which the pattern was found. |
int[] |
searchBytes(byte[] text,
int textStart,
int textEnd,
byte[] pattern,
int k)
Returns the position in the text at which the pattern was found. |
int |
searchBytes(byte[] text,
int textStart,
int textEnd,
byte[] pattern,
java.lang.Object processed)
DOCUMENT ME! |
abstract int[] |
searchBytes(byte[] text,
int textStart,
int textEnd,
byte[] pattern,
java.lang.Object processed,
int k)
Returns the position in the text at which the pattern was found. |
int[] |
searchChars(char[] text,
char[] pattern,
int k)
Finder for the given pattern in the text, allowing k errors. |
int[] |
searchChars(char[] text,
char[] pattern,
java.lang.Object processed,
int k)
Finder for the given pattern in the text, allowing k errors. |
int[] |
searchChars(char[] text,
int textStart,
char[] pattern,
int k)
Finder for the given pattern in the text, starting at textStart, allowing k errors. |
int[] |
searchChars(char[] text,
int textStart,
char[] pattern,
java.lang.Object processed,
int k)
Finder for the given pattern in the text, starting at textStart, allowing k errors. |
int[] |
searchChars(char[] text,
int textStart,
int textEnd,
char[] pattern,
int k)
Finder for the given pattern in the text, starting at textStart and comparing to at most textEnd, allowing k errors. |
int |
searchChars(char[] text,
int textStart,
int textEnd,
char[] pattern,
java.lang.Object processed)
Finder for the given pattern in the text, starting at textStart and comparing to at most textEnd, allowing zero errors. |
abstract int[] |
searchChars(char[] text,
int textStart,
int textEnd,
char[] pattern,
java.lang.Object processed,
int k)
Finder for the given pattern in the text, starting at textStart and comparing to at most textEnd, allowing k errors. |
int[] |
searchString(java.lang.String text,
int textStart,
int textEnd,
java.lang.String pattern,
int k)
Convenience method to search for patterns in Strings. |
int[] |
searchString(java.lang.String text,
int textStart,
int textEnd,
java.lang.String pattern,
java.lang.Object processed,
int k)
Convenience method to search for patterns in Strings. |
int[] |
searchString(java.lang.String text,
int textStart,
java.lang.String pattern,
int k)
Convenience method to search for patterns in Strings. |
int[] |
searchString(java.lang.String text,
int textStart,
java.lang.String pattern,
java.lang.Object processed,
int k)
Convenience method to search for patterns in Strings. |
int[] |
searchString(java.lang.String text,
java.lang.String pattern,
int k)
Convenience method to search for patterns in Strings. |
int[] |
searchString(java.lang.String text,
java.lang.String pattern,
java.lang.Object processed,
int k)
Convenience method to search for patterns in Strings. |
| Methods inherited from class org.jscience.linguistics.search.StringSearch |
|---|
createCharIntMap, createCharIntMap, equals, hashCode, index, processString, searchBytes, searchBytes, searchBytes, searchBytes, searchBytes, searchChars, searchChars, searchChars, searchChars, searchChars, searchString, searchString, searchString, searchString, searchString, searchString, toString, toStringBuffer, usesNative, usesReflection |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected MismatchSearch()
| Method Detail |
|---|
public final java.lang.Object processBytes(byte[] pattern)
process(pattern, 0)
processBytes in class StringSearchpattern - the byte array containing the pattern, may
not be null
StringSearch.processBytes(byte[]),
processBytes(byte[],int)
public abstract java.lang.Object processBytes(byte[] pattern,
int k)
pattern - the byte array containing the pattern, may
not be nullk - the editing distance
public final java.lang.Object processChars(char[] pattern)
process(pattern, 0).
processChars in class StringSearchpattern - a char array containing the pattern, may not
be null
processChars(char[],int),
StringSearch.processChars(char[])
public abstract java.lang.Object processChars(char[] pattern,
int k)
char array, allowing k errors.
pattern - a char array containing the pattern, may not
be nullk - the editing distance
public final java.lang.Object processString(java.lang.String pattern,
int k)
StringSearch.searchString(String,String) methods.
pattern - the String containing the pattern, may not be
nullk - the editing distance
public final int searchBytes(byte[] text,
int textStart,
int textEnd,
byte[] pattern,
java.lang.Object processed)
searchBytes in class StringSearchtext - DOCUMENT ME!textStart - DOCUMENT ME!textEnd - DOCUMENT ME!pattern - DOCUMENT ME!processed - DOCUMENT ME!
StringSearch.searchBytes(byte[],
int,int,byte[],Object),
searchBytes(byte[],int,int,byte[],Object,int)
public final int[] searchBytes(byte[] text,
byte[] pattern,
int k)
text - the byte array containing the text, may not be
nullpattern - the byte array containing the pattern, may
not be nullk - the editing distance
searchBytes(byte[],int,int,byte[],Object,int)
public final int[] searchBytes(byte[] text,
byte[] pattern,
java.lang.Object processed,
int k)
text - the byte array containing the text, may not be
nullpattern - the byte array containing the pattern, may
not be nullprocessed - an Object as returned from processBytes(byte[],
int), may not be nullk - the editing distance
searchBytes(byte[],int,int,byte[],Object,int)
public final int[] searchBytes(byte[] text,
int textEnd,
byte[] pattern,
int k)
text - the byte array containing the text, may not be
nulltextEnd - at which position in the text the comparing should startpattern - the byte array containing the pattern, may
not be nullk - the editing distance
searchBytes(byte[],int,int,byte[],Object,int)
public final int[] searchBytes(byte[] text,
int textEnd,
byte[] pattern,
java.lang.Object processed,
int k)
text - the byte array containing the text, may not be
nulltextEnd - at which position in the text the comparing should startpattern - the pattern to search for, may not be nullprocessed - k - the editing distance
searchBytes(byte[],int,int,byte[],Object,int)
public final int[] searchBytes(byte[] text,
int textStart,
int textEnd,
byte[] pattern,
int k)
text - text the byte array containing the text, may
not be nulltextStart - at which position in the text the comparing should
starttextEnd - at which position in the text comparing should stoppattern - the byte array containing the pattern, may
not be nullk - the editing distance
searchBytes(byte[],int,int,byte[],Object,int)
public abstract int[] searchBytes(byte[] text,
int textStart,
int textEnd,
byte[] pattern,
java.lang.Object processed,
int k)
text - text the byte array containing the text, may
not be nulltextStart - at which position in the text the comparing should
starttextEnd - at which position in the text comparing should stoppattern - the pattern to search for, may not be nullprocessed - an Object as returned from processBytes(byte[],
int), may not be nullk - the editing distance
processBytes(byte[],int)
public final int searchChars(char[] text,
int textStart,
int textEnd,
char[] pattern,
java.lang.Object processed)
searchChars in class StringSearchtext - DOCUMENT ME!textStart - DOCUMENT ME!textEnd - DOCUMENT ME!pattern - DOCUMENT ME!processed - DOCUMENT ME!
StringSearch.searchChars(char[],int,int,char[],Object),
processChars(char[],int)
public final int[] searchChars(char[] text,
char[] pattern,
int k)
text - the String containing the text, may not be nullpattern - the pattern to search for, may not be nullk - the maximum number of mismatches (the editing distance)
searchChars(char[],int,int,char[],Object,int)
public final int[] searchChars(char[] text,
char[] pattern,
java.lang.Object processed,
int k)
text - the String containing the text, may not be nullpattern - the pattern to search for, may not be nullprocessed - an Object as returned from processChars(char[],
int) or processString(String,int), may not be
nullk - the maximum number of mismatches (the editing distance)
searchChars(char[],int,int,char[],Object,int)
public final int[] searchChars(char[] text,
int textStart,
char[] pattern,
int k)
text - the String containing the text, may not be nulltextStart - at which position in the text the comparing should
startpattern - the pattern to search for, may not be nullk - the maximum number of mismatches (the editing distance)
searchChars(char[],int,int,char[],Object)
public final int[] searchChars(char[] text,
int textStart,
char[] pattern,
java.lang.Object processed,
int k)
text - the String containing the text, may not be nulltextStart - at which position in the text the comparing should
startpattern - the pattern to search for, may not be nullprocessed - an Object as returned from processChars(char[],
int) or processString(String,int), may not be
nullk - the maximum number of mismatches (the editing distance)
searchChars(char[],int,int,char[],Object,int)
public final int[] searchChars(char[] text,
int textStart,
int textEnd,
char[] pattern,
int k)
text - the String containing the text, may not be nulltextStart - at which position in the text the comparing should
starttextEnd - at which position in the text comparing should stoppattern - the pattern to search for, may not be nullk - the maximum number of mismatches (the editing distance)
public abstract int[] searchChars(char[] text,
int textStart,
int textEnd,
char[] pattern,
java.lang.Object processed,
int k)
text - the String containing the text, may not be nulltextStart - at which position in the text the comparing should
starttextEnd - at which position in the text comparing should stoppattern - the pattern to search for, may not be nullprocessed - an Object as returned from processChars(char[],
int) or processString(String,int), may not be
nullk - the maximum number of mismatches (the editing distance)
public final int[] searchString(java.lang.String text,
java.lang.String pattern,
int k)
text - the String containing the text, may not be nullpattern - the String containing the pattern, may not be
nullk - the maximum number of mismatches (the editing distance)
searchChars(char[],int,int,char[],int)
public final int[] searchString(java.lang.String text,
java.lang.String pattern,
java.lang.Object processed,
int k)
text - the String containing the text, may not be nullpattern - the String containing the pattern, may not be
nullprocessed - an Object as returned from processChars(char[],
int) or processString(String,int), may not be
nullk - the maximum number of mismatches (the editing distance)
searchChars(char[],int,int,char[],Object,int)
public final int[] searchString(java.lang.String text,
int textStart,
java.lang.String pattern,
int k)
text - the String containing the text, may not be nulltextStart - at which position in the text the comparing should
startpattern - the String containing the pattern, may not be
nullk - the maximum number of mismatches (the editing distance)
searchChars(char[],int,int,char[],int)
public final int[] searchString(java.lang.String text,
int textStart,
java.lang.String pattern,
java.lang.Object processed,
int k)
text - the String containing the text, may not be nulltextStart - at which position in the text the comparing should
startpattern - the String containing the pattern, may not be
nullprocessed - an Object as returned from processChars(char[],
int) or processString(String,int), may not be
nullk - the maximum number of mismatches (the editing distance)
searchChars(char[],int,int,char[],Object,int)
public final int[] searchString(java.lang.String text,
int textStart,
int textEnd,
java.lang.String pattern,
int k)
text - the String containing the text, may not be nulltextStart - at which position in the text the comparing should
starttextEnd - at which position in the text comparing should stoppattern - the String containing the pattern, may not be
nullk - the maximum number of mismatches (the editing distance)
searchChars(char[],int,int,char[],int)
public final int[] searchString(java.lang.String text,
int textStart,
int textEnd,
java.lang.String pattern,
java.lang.Object processed,
int k)
text - the String containing the text, may not be nulltextStart - at which position in the text the comparing should
starttextEnd - at which position in the text comparing should stoppattern - the String containing the pattern, may not be
nullprocessed - an Object as returned from processChars(char[],
int) or processString(String,int), may not be
nullk - the maximum number of mismatches (the editing distance)
searchChars(char[],int,int,char[],Object,int)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||