SF.Snowball.Ext.EnglishStemmer.Stem C# (CSharp) Method

Stem() public method

public Stem ( ) : bool
return bool
		public override bool Stem()
		{
			int v_1;
			int v_2;
			int v_3;
			int v_4;
			int v_5;
			int v_6;
			int v_7;
			int v_8;
			int v_9;
			int v_10;
			int v_11;
			int v_12;
			int v_13;
			// (, line 194
			// or, line 196
			do 
			{
				v_1 = cursor;
				do 
				{
					// call exception1, line 196
					if (!r_exception1())
					{
						goto lab1_brk;
					}
					goto lab0_brk;
				}
				while (false);

lab1_brk: ;

				cursor = v_1;
				// (, line 196
				// test, line 198
				v_2 = cursor;
				// hop, line 198
				{
					int c = cursor + 3;
					if (0 > c || c > limit)
					{
						return false;
					}
					cursor = c;
				}
				cursor = v_2;
				// do, line 199
				v_3 = cursor;
				do 
				{
					// call prelude, line 199
					if (!r_prelude())
					{
						goto lab2_brk;
					}
				}
				while (false);

lab2_brk: ;
				
				cursor = v_3;
				// do, line 200
				v_4 = cursor;
				do 
				{
					// call mark_regions, line 200
					if (!r_mark_regions())
					{
						goto lab3_brk;
					}
				}
				while (false);

lab3_brk: ;

				cursor = v_4;
				// backwards, line 201
				limit_backward = cursor; cursor = limit;
				// (, line 201
				// do, line 203
				v_5 = limit - cursor;
				do 
				{
					// call Step_1a, line 203
					if (!r_Step_1a())
					{
						goto lab4_brk;
					}
				}
				while (false);

lab4_brk: ;

				cursor = limit - v_5;
				// or, line 205
				do 
				{
					v_6 = limit - cursor;
					do 
					{
						// call exception2, line 205
						if (!r_exception2())
						{
							goto lab6_brk;
						}
						goto lab5_brk;
					}
					while (false);

lab6_brk: ;

					cursor = limit - v_6;
					// (, line 205
					// do, line 207
					v_7 = limit - cursor;
					do 
					{
						// call Step_1b, line 207
						if (!r_Step_1b())
						{
							goto lab7_brk;
						}
					}
					while (false);

lab7_brk: ;
					
					cursor = limit - v_7;
					// do, line 208
					v_8 = limit - cursor;
					do 
					{
						// call Step_1c, line 208
						if (!r_Step_1c())
						{
							goto lab8_brk;
						}
					}
					while (false);

lab8_brk: ;

					cursor = limit - v_8;
					// do, line 210
					v_9 = limit - cursor;
					do 
					{
						// call Step_2, line 210
						if (!r_Step_2())
						{
							goto lab9_brk;
						}
					}
					while (false);

lab9_brk: ;
					
					cursor = limit - v_9;
					// do, line 211
					v_10 = limit - cursor;
					do 
					{
						// call Step_3, line 211
						if (!r_Step_3())
						{
							goto lab10_brk;
						}
					}
					while (false);

lab10_brk: ;
					
					cursor = limit - v_10;
					// do, line 212
					v_11 = limit - cursor;
					do 
					{
						// call Step_4, line 212
						if (!r_Step_4())
						{
							goto lab11_brk;
						}
					}
					while (false);

lab11_brk: ;
					
					cursor = limit - v_11;
					// do, line 214
					v_12 = limit - cursor;
					do 
					{
						// call Step_5, line 214
						if (!r_Step_5())
						{
							goto lab12_brk;
						}
					}
					while (false);

lab12_brk: ;
					
					cursor = limit - v_12;
				}
				while (false);

lab5_brk: ;

				cursor = limit_backward; // do, line 217
				v_13 = cursor;
				do 
				{
					// call postlude, line 217
					if (!r_postlude())
					{
						goto lab13_brk;
					}
				}
				while (false);

lab13_brk: ;
				
				cursor = v_13;
			}
			while (false);

lab0_brk: ;

			return true;
		}
	}

Usage Example

示例#1
0
 public static string GetStemmedQuery(this String query)
 {
     var stemmer = new EnglishStemmer();
     stemmer.SetCurrent(query);
     stemmer.Stem();
     return stemmer.GetCurrent();
 }