@Override public void initFeatureTemplate() { feature_template = new ItFeatureTemplate<>(config.getFeatureTemplateElement(), getHyperParameter()); }
@Override @SuppressWarnings("unchecked") public OnlineComponent<N,S> createComponent(NLPMode mode, InputStream config) { switch (mode) { case pos: return (OnlineComponent<N,S>)new POSTagger<>(config); case ner: return (OnlineComponent<N,S>)new NERTagger<>(config); case dep: return (OnlineComponent<N,S>)new DEPParser<>(config); case doc: return (OnlineComponent<N,S>)new DOCAnalyzer<>(config); case it: return (OnlineComponent<N,S>)new ItClassifier<>(config); // case srl: return (OnlineComponent<N,S>)new SRLParser(config); default : throw new IllegalArgumentException("Unsupported mode: "+mode); } }
@Override @SuppressWarnings("unchecked") public OnlineComponent<N,S> createComponent(NLPMode mode, InputStream config) { switch (mode) { case pos: return (OnlineComponent<N,S>)new POSTagger<>(config); case ner: return (OnlineComponent<N,S>)new NERTagger<>(config); case dep: return (OnlineComponent<N,S>)new DEPParser<>(config); case doc: return (OnlineComponent<N,S>)new DOCAnalyzer<>(config); case it: return (OnlineComponent<N,S>)new ItClassifier<>(config); // case srl: return (OnlineComponent<N,S>)new SRLParser(config); default : throw new IllegalArgumentException("Unsupported mode: "+mode); } }
@Override public void initFeatureTemplate() { feature_template = new ItFeatureTemplate<>(config.getFeatureTemplateElement(), getHyperParameter()); }