Class SnowballProgram
This is the rev 502 of the Snowball SVN trunk,
but modified:
made abstract and introduced abstract method stem to avoid expensive reflection in filter class.
refactored StringBuffers to StringBuilder
uses char[] as buffer instead of StringBuffer/StringBuilder
eq_s,eq_s_b,insert,replace_s take CharSequence like eq_v and eq_v_b
reflection calls (Lovins, etc) use EMPTY_ARGS/EMPTY_PARAMS
Inheritance
System.Object
SnowballProgram
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Lucene.Net.Analysis.Common.dll
Syntax
public abstract class SnowballProgram
Constructors
|
Improve this Doc
View Source
SnowballProgram()
Declaration
protected SnowballProgram()
Fields
|
Improve this Doc
View Source
m_bra
Declaration
Field Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
m_current
Declaration
protected char[] m_current
Field Value
Type |
Description |
System.Char[] |
|
|
Improve this Doc
View Source
m_cursor
Declaration
Field Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
m_ket
Declaration
Field Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
m_limit
Declaration
Field Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
m_limit_backward
Declaration
protected int m_limit_backward
Field Value
Type |
Description |
System.Int32 |
|
Properties
|
Improve this Doc
View Source
Current
Declaration
public virtual string Current { get; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
CurrentBuffer
Get the current buffer containing the stem.
NOTE: this may be a reference to a different character array than the
one originally provided with setCurrent, in the exceptional case that
stemming produced a longer intermediate or result string.
It is necessary to use CurrentBufferLength to determine
the valid length of the returned buffer. For example, many words are
stemmed simply by subtracting from the length to remove suffixes.
Declaration
public virtual char[] CurrentBuffer { get; }
Property Value
Type |
Description |
System.Char[] |
|
See Also
|
Improve this Doc
View Source
CurrentBufferLength
Declaration
public virtual int CurrentBufferLength { get; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
|
Improve this Doc
View Source
AssignTo(StringBuilder)
Declaration
protected virtual StringBuilder AssignTo(StringBuilder s)
Parameters
Type |
Name |
Description |
System.Text.StringBuilder |
s |
|
Returns
Type |
Description |
System.Text.StringBuilder |
|
|
Improve this Doc
View Source
CopyFrom(SnowballProgram)
Declaration
protected virtual void CopyFrom(SnowballProgram other)
Parameters
|
Improve this Doc
View Source
Eq_S(Int32, String)
Declaration
protected virtual bool Eq_S(int s_size, string s)
Parameters
Type |
Name |
Description |
System.Int32 |
s_size |
|
System.String |
s |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Eq_S_B(Int32, String)
Declaration
protected virtual bool Eq_S_B(int s_size, string s)
Parameters
Type |
Name |
Description |
System.Int32 |
s_size |
|
System.String |
s |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Eq_V(String)
Declaration
protected virtual bool Eq_V(string s)
Parameters
Type |
Name |
Description |
System.String |
s |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Eq_V_B(String)
Declaration
protected virtual bool Eq_V_B(string s)
Parameters
Type |
Name |
Description |
System.String |
s |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
FindAmong(Among[], Int32)
Declaration
protected virtual int FindAmong(Among[] v, int v_size)
Parameters
Type |
Name |
Description |
Among[] |
v |
|
System.Int32 |
v_size |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
FindAmongB(Among[], Int32)
Declaration
protected virtual int FindAmongB(Among[] v, int v_size)
Parameters
Type |
Name |
Description |
Among[] |
v |
|
System.Int32 |
v_size |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
InGrouping(Char[], Int32, Int32)
Declaration
protected virtual bool InGrouping(char[] s, int min, int max)
Parameters
Type |
Name |
Description |
System.Char[] |
s |
|
System.Int32 |
min |
|
System.Int32 |
max |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
InGroupingB(Char[], Int32, Int32)
Declaration
protected virtual bool InGroupingB(char[] s, int min, int max)
Parameters
Type |
Name |
Description |
System.Char[] |
s |
|
System.Int32 |
min |
|
System.Int32 |
max |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
InRange(Int32, Int32)
Declaration
protected virtual bool InRange(int min, int max)
Parameters
Type |
Name |
Description |
System.Int32 |
min |
|
System.Int32 |
max |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
InRangeB(Int32, Int32)
Declaration
protected virtual bool InRangeB(int min, int max)
Parameters
Type |
Name |
Description |
System.Int32 |
min |
|
System.Int32 |
max |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Insert(Int32, Int32, String)
Declaration
protected virtual void Insert(int c_bra, int c_ket, string s)
Parameters
Type |
Name |
Description |
System.Int32 |
c_bra |
|
System.Int32 |
c_ket |
|
System.String |
s |
|
|
Improve this Doc
View Source
OutGrouping(Char[], Int32, Int32)
Declaration
protected virtual bool OutGrouping(char[] s, int min, int max)
Parameters
Type |
Name |
Description |
System.Char[] |
s |
|
System.Int32 |
min |
|
System.Int32 |
max |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
OutGroupingB(Char[], Int32, Int32)
Declaration
protected virtual bool OutGroupingB(char[] s, int min, int max)
Parameters
Type |
Name |
Description |
System.Char[] |
s |
|
System.Int32 |
min |
|
System.Int32 |
max |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
OutRange(Int32, Int32)
Declaration
protected virtual bool OutRange(int min, int max)
Parameters
Type |
Name |
Description |
System.Int32 |
min |
|
System.Int32 |
max |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
OutRangeB(Int32, Int32)
Declaration
protected virtual bool OutRangeB(int min, int max)
Parameters
Type |
Name |
Description |
System.Int32 |
min |
|
System.Int32 |
max |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
ReplaceS(Int32, Int32, String)
to replace chars between c_bra
and c_ket
in current by the
chars in s
.
Declaration
protected virtual int ReplaceS(int c_bra, int c_ket, string s)
Parameters
Type |
Name |
Description |
System.Int32 |
c_bra |
|
System.Int32 |
c_ket |
|
System.String |
s |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
SetCurrent(Char[], Int32)
Declaration
public virtual void SetCurrent(char[] text, int length)
Parameters
Type |
Name |
Description |
System.Char[] |
text |
character array containing input
|
System.Int32 |
length |
valid length of text.
|
|
Improve this Doc
View Source
SetCurrent(String)
Declaration
public virtual void SetCurrent(string value)
Parameters
Type |
Name |
Description |
System.String |
value |
|
|
Improve this Doc
View Source
SliceCheck()
Declaration
protected virtual void SliceCheck()
|
Improve this Doc
View Source
SliceDel()
Declaration
protected virtual void SliceDel()
|
Improve this Doc
View Source
SliceFrom(String)
Declaration
protected virtual void SliceFrom(string s)
Parameters
Type |
Name |
Description |
System.String |
s |
|
|
Improve this Doc
View Source
SliceTo(StringBuilder)
Copy the slice into the supplied System.Text.StringBuilder
Declaration
protected virtual StringBuilder SliceTo(StringBuilder s)
Parameters
Type |
Name |
Description |
System.Text.StringBuilder |
s |
|
Returns
Type |
Description |
System.Text.StringBuilder |
|
|
Improve this Doc
View Source
Stem()
Declaration
public abstract bool Stem()
Returns
Type |
Description |
System.Boolean |
|