/** * 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 static double getGap(SingleTreeEvaluations evaluations) { return evaluations.getMissingLemmas()+ evaluations.getMissingNodes()+ evaluations.getMissingRelations(); }
public static double generateUnweightedFutureEstimation(SingleTreeEvaluations evaluations) { double futureEstimation = evaluations.getMissingLemmasPortion()+evaluations.getMissingNodesPortion()+evaluations.getMissingRelationsPortion(); return futureEstimation; }
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 Map<BasicNode, String> getMapTreesToSentences() throws TeEngineMlException { if (null==mapTreesToSentences)throw new TeEngineMlException("Null mapTreesToSentences. Seems that preprocess() method was not called."); return mapTreesToSentences; }
public TreeAndAffectedNodes(ExtendedNode tree, Set<ExtendedNode> affectedNodes, ValueSetMap<ExtendedNode, ExtendedNode> subsetMapOriginalToGenerated) throws TeEngineMlException { if (null==tree) throw new TeEngineMlException("Null tree"); if (null==affectedNodes) throw new TeEngineMlException("Null affectedNodes"); if (null==subsetMapOriginalToGenerated) throw new TeEngineMlException("Null subsetMapOriginalToGenerated"); this.tree = tree; this.affectedNodes = affectedNodes; this.subsetMapOriginalToGenerated = subsetMapOriginalToGenerated; }
public long getNumberOfExpandedElements() throws TeEngineMlException { if (null==bestTree) throw new TeEngineMlException("Seems that process was not called."); return numberOfExpansions; }
public ExtendedPairData getExtendedPairData() throws TeEngineMlException { if (null==extendedPairData) throw new TeEngineMlException("convert() method was not called."); return extendedPairData; }
public ExtendedNode getGeneratedTree() throws TeEngineMlException { if (!postProcessDone) throw new TeEngineMlException("Post process not done!"); return generatedTree; }
protected static final <T> T nonNull(T t, String name) throws TeEngineMlException { if (null==t)throw new TeEngineMlException("null "+name); return t; }
/** * 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; }