/** * Used only by {@link BeamSearchTextTreesProcessor}. * @return * @throws TeEngineMlException */ public Map<SingleOperationItem, Set<TreeAndFeatureVector>> getMapGeneratedByOperation() throws TeEngineMlException { if (null==mapGeneratedByOperation)throw new TeEngineMlException("Null. Not generated!"); return mapGeneratedByOperation; }
public String getBestTreeSentence() throws TeEngineMlException { if (null==this.bestTreeSentence)throw new TeEngineMlException("Not computed"); return this.bestTreeSentence; }
public TreeCoreferenceInformation<ExtendedNode> getCoreferenceInformation() throws TeEngineMlException { if (!done) throw new TeEngineMlException("CoreferenceFromTreesCreator - create() was not called."); return coreferenceInformation; }
public TreeHistory getBestTreeHistory() throws TeEngineMlException { if (null==bestTreeHistory) throw new TeEngineMlException("Seems that process was not called."); return this.bestTreeHistory; }
public List<AStarLocalCreativeElement> getChildren() throws TeEngineMlException { if (!done)throw new TeEngineMlException("Children were not generated."); return children; }
@Override public Map<Integer, Double> updateFeatureVector( Map<Integer, Double> originalFeatureVector, FeatureUpdate featureUpdate, TreeAndParentMap<ExtendedInfo, ExtendedNode> textTree, TreeAndParentMap<ExtendedInfo, ExtendedNode> hypothesisTree, GenerationOperation<ExtendedInfo, ExtendedNode> operation, T specification) throws TeEngineMlException { throw new TeEngineMlException("DummyUpdater should not be created"); } }
public TopicPreProcessor(TopicDataSet topicDataSet, Instruments<Info, BasicNode> instruments, boolean recognizeNameEntities, boolean doTextNormalization) throws TeEngineMlException { super(); if (null==topicDataSet) throw new TeEngineMlException("Null topicDataSet"); if (null==instruments) throw new TeEngineMlException("Null instruments"); this.topicDataSet = topicDataSet; this.instruments = instruments; this.recognizeNameEntities = recognizeNameEntities; this.doTextNormalization = doTextNormalization; }
public ValueSetMap<ExtendedNode, ExtendedNode> getMapOriginalToGenerated() throws TeEngineMlException { if (!postProcessDone) throw new TeEngineMlException("Post process not done!"); return mapOriginalToGenerated; }
public TreeHistory getBestTreeHistory() throws TeEngineMlException { if (!processingDone) throw new TeEngineMlException("Not processed."); return this.bestTreeHistory; }
public PerformFactoryFactory(OperationsEnvironment operationsEnvironment, RuleBasesAndPluginsContainer<Info, BasicNode> ruleBasesContainer) throws TeEngineMlException { if (null==operationsEnvironment) throw new TeEngineMlException("Mull operationsEnvironment"); this.operationsEnvironment = operationsEnvironment; if (null==ruleBasesContainer) throw new TeEngineMlException("Null ruleBasesContainer"); this.ruleBasesContainer = ruleBasesContainer; }
public Set<RuleWithConfidenceAndDescription<Info, BasicNode>> getSetRules() throws TeEngineMlException { if (setRules==null)throw new TeEngineMlException("null"); return setRules; }
public long getNumberOfExpandedElements() throws TeEngineMlException { if (null==bestTree) throw new TeEngineMlException("Seems that process was not called."); return numberOfExpansions; }
/** * Calling this method is optional. * @param information * @throws TeEngineMlException */ public void setGlobalPairInformation(GlobalPairInformation information) throws TeEngineMlException { if (null==information) throw new TeEngineMlException("Null information"); this.globalPairInformation = information; }
public TreeEvaluationsHistory(TreeEvaluationsHistory previous, SingleTreeEvaluations currnet) throws TeEngineMlException { if (null==previous) throw new TeEngineMlException("Null previous"); if (null==currnet) throw new TeEngineMlException("Null currnet"); evaluations = new Vector<SingleTreeEvaluations>(previous.getEvaluations().size()+1); this.evaluations.addAll(previous.getEvaluations()); this.evaluations.add(currnet); }
public static PairData convertJCasToPairData(JCas aCas) throws TeEngineMlException { try { return CasPairDataConverter.convertCasToPairData(aCas); } catch (CASException | CasTreeConverterException | UnsupportedPosTagStringException | EDAException e) { throw new TeEngineMlException("Error while creating a PairData from a JCas.", e); } }
public TreeHistory(TreeHistory other) throws TeEngineMlException { if (null==other) throw new TeEngineMlException("TreeHistory copy constructor - other is null"); this.initialComponent = other.initialComponent; if (other.activeTypes!=null) { this.activeTypes = new EnumMap<TreeHistoryComponent.TreeHistoryComponentType, Boolean>(TreeHistoryComponent.TreeHistoryComponentType.class); this.activeTypes.putAll(other.activeTypes); } this.components = new Vector<TreeHistoryComponent>(); this.components.addAll(other.components); }
public synchronized void setRuleBasesContainer(RuleBasesAndPluginsContainer<?, ?> ruleBasesContainer) throws TeEngineMlException { LinkedHashSet<String> givenRuleBasesNames = ruleBasesContainer.getRuleBasesNames(); if (null==givenRuleBasesNames) throw new TeEngineMlException("The rule bases names is null. Seems that rule-bases-container was not initialized."); setRuleBasesNames(givenRuleBasesNames); }
@Override public GapDescription getGapDescription() throws TeEngineMlException { if (teSystemEnvironment.getGapToolBox().isHybridMode()) { throw new TeEngineMlException("getGapDescription() is not implemented for this processor."); } else { return null; } }
public void output() throws TeEngineMlException { try { Document document = createXmlDocumentOfResults(); XmlDomUtils.writeDocumentToFile(document, outputFile); } catch (ParserConfigurationException | RuntimeException | XmlDomUtilitiesException e) { throw new TeEngineMlException("Could not output results to XML. See nested exception.",e); } }
public Plugin getPlugin(String pluginId) throws TeEngineMlException { if (!this.mapPlugins.containsKey(pluginId)) throw new TeEngineMlException("Plugin \""+pluginId+"\" does not exist."); return this.mapPlugins.get(pluginId); } public ImmutableSet<InstanceBasedPlugin> getInstanceBasedPlugins() throws TeEngineMlException