def load_classifier(path, extractor_class, feature_computer_class, session): extractor = extractor_class.load(os.path.join(path, 'extractor')) feature_computer = feature_computer_class.load( os.path.join(path, "feature_computer")) saver = load_tf_model_with_saver(path, "model", session) graph = _convert_load_graph(session, load_with_pickle(path, "graph.pkl")) return extractor, feature_computer, graph, saver
def load(cls, path, session): extractor, feature_computer, graph, saver = load_classifier( path, RelExtFeatureExtractor, CompositeFeatureComputer, session) return cls(graph, extractor, feature_computer, session, saver, load_with_pickle(path, "collapser"))
def load(path): return load_with_pickle(path, "feature_extractor.pkl")
def load(cls, path, session): extractor, feature_computer, graph, saver = load_classifier( path, NERFeatureExtractor, SyntacticFeatureComputer, session) return cls(graph, extractor, feature_computer, session, saver, load_with_pickle(path, "post_processor"))
def load(cls, path, session): extractor, feature_computer, graph, saver = load_classifier( path, NETFeatureExtractor, SyntacticFeatureComputer, session) return cls(graph, extractor, feature_computer, session, saver, load_with_pickle(path, "grouper_collapser"))
def load(path): return load_with_pickle(path, "feature_computer.pkl")
def load_file(path: str, name: str) -> List[Document]: return load_with_pickle(path, name)
def load(path: str) -> List[Document]: return load_with_pickle(path, "docs.pkl")
def load(cls, path, session): extractor, feature_computer, graph, saver = load_classifier( path, CorefFeatureExtractor, FeatureComputer, session) classifiers = load_with_pickle(path, "classifiers.pkl") return cls(graph, extractor, feature_computer, session, saver, classifiers)