edu.berkeley.nlp.util.Factory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of berkeleyparser Show documentation
Show all versions of berkeleyparser Show documentation
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