public SnowballFilter(TokenStream in, String name) {super(in);try {Class<? extends SnowballStemmer> stemClass =Class.forName("org.tartarus.snowball.ext." + name + "Stemmer").asSubclass(SnowballStemmer.class);stemmer = stemClass.getConstructor().newInstance();} catch (Exception e) {}}
public SnowballFilter(TokenStream @in, string name): base(@in){try{string className = typeof(SnowballProgram).Namespace + ".Ext." +name + "Stemmer, " + this.GetType().GetTypeInfo().Assembly.GetName().Name;Type stemClass = Type.GetType(className);stemmer = (SnowballProgram)Activator.CreateInstance(stemClass);}catch (Exception e){}}