/// <summary>Construct the named stemming filter. /// /// </summary> /// <param name="input">the input tokens to stem /// </param> /// <param name="name">the name of a stemmer /// </param> public SnowballFilter(TokenStream input, System.String name) : base(input) { try { System.Type stemClass = System.Type.GetType("SF.Snowball.Ext." + name + "Stemmer"); stemmer = (SnowballProgram)System.Activator.CreateInstance(stemClass); } catch (System.Exception e) { throw new System.SystemException(e.ToString()); } termAtt = AddAttribute <ITermAttribute>(); }
/// <summary>Construct the named stemming filter. /// /// </summary> /// <param name="input">the input tokens to stem /// </param> /// <param name="name">the name of a stemmer /// </param> public SnowballFilter(TokenStream input, System.String name) : base(input) { try { System.Type stemClass = System.Type.GetType("SF.Snowball.Ext." + name + "Stemmer"); stemmer = (SnowballProgram) System.Activator.CreateInstance(stemClass); } catch (System.Exception e) { throw new System.SystemException(e.ToString()); } termAtt = AddAttribute<ITermAttribute>(); }
/// <summary>Construct the named stemming filter. /// /// </summary> /// <param name="in">the input tokens to stem /// </param> /// <param name="name">the name of a stemmer /// </param> public SnowballFilter(TokenStream in_Renamed, System.String name) : base(in_Renamed) { try { System.Type stemClass = System.Type.GetType("SF.Snowball.Ext." + name + "Stemmer"); stemmer = (SnowballProgram) System.Activator.CreateInstance(stemClass); // why doesn't the SnowballProgram class have an (abstract?) stem method? stemMethod = stemClass.GetMethod("Stem", (new System.Type[0] == null) ? new System.Type[0] : (System.Type[]) new System.Type[0]); } catch (System.Exception e) { throw new System.SystemException(e.ToString()); } }
/// <summary>Construct the named stemming filter. /// /// </summary> /// <param name="in">the input tokens to stem /// </param> /// <param name="name">the name of a stemmer /// </param> public SnowballFilter(TokenStream in_Renamed, System.String name) : base(in_Renamed) { try { System.Type stemClass = System.Type.GetType("SF.Snowball.Ext." + name + "Stemmer"); stemmer = (SnowballProgram)System.Activator.CreateInstance(stemClass); // why doesn't the SnowballProgram class have an (abstract?) stem method? stemMethod = stemClass.GetMethod("Stem", (new System.Type[0] == null) ? new System.Type[0] : (System.Type[]) new System.Type[0]); } catch (System.Exception e) { throw new System.SystemException(e.ToString()); } }
//private System.Reflection.MethodInfo stemMethod; public SnowballFilter(TokenStream input, SnowballProgram stemmer) : base(input) { this.stemmer = stemmer; termAtt = AddAttribute<ITermAttribute>(); }
public SnowballFilter(TokenStream in_Renamed, SnowballProgram stemmer, System.Reflection.MethodInfo stemMethod) : base(in_Renamed) { this.stemmer = stemmer; this.stemMethod = stemMethod; }
//private System.Reflection.MethodInfo stemMethod; public SnowballFilter(TokenStream input, SnowballProgram stemmer) : base(input) { this.stemmer = stemmer; termAtt = AddAttribute <ITermAttribute>(); }
public SnowballFilter(TokenStream in_Renamed, SnowballProgram stemmer, System.Reflection.MethodInfo stemMethod) : base(in_Renamed) { this.stemmer = stemmer; this.stemMethod = stemMethod; }