All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.berkeley.nlp.util.Factory Maven / Gradle / Ivy

Go to download

The Berkeley parser analyzes the grammatical structure of natural language using probabilistic context-free grammars (PCFGs).

The newest version!
package edu.berkeley.nlp.util;

public interface Factory {
	T newInstance(Object...args);
	public static class DefaultFactory implements Factory {
		private final Class c;
		public DefaultFactory(Class c) {
      this.c = c;
		}
		public T newInstance(Object... args) {
      try {
        return (T) c.newInstance();
      } catch (Exception e) {
        e.printStackTrace();
      }
      return null;
    }
	}
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy