当前位置: 首页>>代码示例>>Java>>正文


Java CASException.getMessage方法代码示例

本文整理汇总了Java中org.apache.uima.cas.CASException.getMessage方法的典型用法代码示例。如果您正苦于以下问题:Java CASException.getMessage方法的具体用法?Java CASException.getMessage怎么用?Java CASException.getMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.uima.cas.CASException的用法示例。


在下文中一共展示了CASException.getMessage方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: calculateScores

import org.apache.uima.cas.CASException; //导入方法依赖的package包/类
@Override
public Vector<Double> calculateScores(JCas aCas)
		throws ScoringComponentException {
	// all the values: (T&H/H), (T&H/T), and ((T&H/H)*(T&H/T))
	Vector<Double> scoresVector = new Vector<Double>();

	try {
		JCas tView = aCas.getView("TextView");
		HashMap<String, Integer> tBag = countTokens(tView);

		JCas hView = aCas.getView("HypothesisView");
		HashMap<String, Integer> hBag = countTokens(hView);

		scoresVector.addAll(calculateSimilarity(tBag, hBag));
	} catch (CASException e) {
		throw new ScoringComponentException(e.getMessage());
	}
	return scoresVector;
}
 
开发者ID:hltfbk,项目名称:Excitement-TDMLEDA,代码行数:20,代码来源:BagOfLemmasScoring.java

示例2: calculateScores

import org.apache.uima.cas.CASException; //导入方法依赖的package包/类
@Override
public Vector<Double> calculateScores(JCas aCas)
		throws ScoringComponentException {
	// all the values: (T&H/H), (T&H/T), and ((T&H/H)*(T&H/T)), with four
	// different matching types
	Vector<Double> scoresVector = new Vector<Double>();

	try {
		JCas tView = aCas.getView("TextView");
		JCas hView = aCas.getView("HypothesisView");

		for (int i = 1; i < 5; i++) {
			HashMap<String, Integer> tBag = countDeps(tView, i);
			HashMap<String, Integer> hBag = countDeps(hView, i);
			scoresVector.addAll(calculateSimilarity(tBag, hBag));
		}

	} catch (CASException e) {
		throw new ScoringComponentException(e.getMessage());
	}
	return scoresVector;
}
 
开发者ID:hltfbk,项目名称:Excitement-TDMLEDA,代码行数:23,代码来源:BagOfDepsScoring.java

示例3: calculateScores

import org.apache.uima.cas.CASException; //导入方法依赖的package包/类
@Override
public Vector<Double> calculateScores(JCas aCas)
		throws ScoringComponentException {
	Vector<Double> scoresVector = new Vector<Double>();

	try {
		JCas tView = aCas.getView("TextView");
		JCas hView = aCas.getView("HypothesisView");

		scoresVector.addAll(calculateTSScores(tView, hView));

		// add the backup values
		scoresVector.addAll(super.calculateScores(aCas));

	} catch (CASException e) {
		throw new ScoringComponentException(e.getMessage());
	}
	return scoresVector;
}
 
开发者ID:hltfbk,项目名称:Excitement-TDMLEDA,代码行数:20,代码来源:TreeSkeletonScoring.java

示例4: calculateScores

import org.apache.uima.cas.CASException; //导入方法依赖的package包/类
@Override
public Vector<Double> calculateScores(JCas aCas)
		throws ScoringComponentException {
	// 1) how many words of H (extended with multiple relations) can be
	// found in T divided by the length of H
	Vector<Double> scoresVector = new Vector<Double>();

	try {
		JCas tView = aCas.getView("TextView");
		HashMap<String, Integer> tBag = countTokenPoses(tView);

		JCas hView = aCas.getView("HypothesisView");
		HashMap<String, Integer> hBag = countTokenPoses(hView);

		if (super.moduleFlags[0]) {
			scoresVector.add(calculateSingleLexScore(tBag, hBag, gds));
		}
		if (super.moduleFlags[1]) {
			scoresVector.add(calculateSingleLexScore(tBag, hBag, gnw));
		}
		if (super.moduleFlags[2]) {
			scoresVector.add(calculateSingleLexScore(tBag, hBag, gtdm));
		}
		if (moduleFlags[0]) {
			scoresVector.add(calculateSingleLexScore(tBag, hBag, dbr));
		}
	} catch (CASException e) {
		throw new ScoringComponentException(e.getMessage());
	}
	return scoresVector;
}
 
开发者ID:hltfbk,项目名称:Excitement-TDMLEDA,代码行数:32,代码来源:BagOfLexesPosScoringDE.java

示例5: calculateScores

import org.apache.uima.cas.CASException; //导入方法依赖的package包/类
@Override
public Vector<Double> calculateScores(JCas aCas)
		throws ScoringComponentException {
	// 1) how many words of H (extended with multiple relations) can be
	// found in T divided by the length of H
	Vector<Double> scoresVector = new Vector<Double>();

	try {
		JCas tView = aCas.getView("TextView");
		HashMap<String, Integer> tBag = countTokens(tView);

		JCas hView = aCas.getView("HypothesisView");
		HashMap<String, Integer> hBag = countTokens(hView);

		if (null != wnlrSet && wnlrSet.size() != 0) {
			for (WordnetLexicalResource wnlr : wnlrSet) {
				scoresVector.add(calculateSingleLexScoreWithWNRelations(
						tBag, hBag, wnlr));
			}
		}
		if (null != volrSet && volrSet.size() != 0) {
			for (VerbOceanLexicalResource volr : volrSet) {
				scoresVector.add(calculateSingleLexScoreWithVORelations(
						tBag, hBag, volr));
			}
		}
	} catch (CASException e) {
		throw new ScoringComponentException(e.getMessage());
	}
	return scoresVector;
}
 
开发者ID:hltfbk,项目名称:Excitement-TDMLEDA,代码行数:32,代码来源:BagOfLexesScoringEN.java

示例6: calculateScores

import org.apache.uima.cas.CASException; //导入方法依赖的package包/类
@Override
public Vector<Double> calculateScores(JCas cas)
		throws ScoringComponentException {
	// all the values: (T&H/H), (T&H/T), and ((T&H/H)*(T&H/T))
	Vector<Double> scoresVector = new Vector<Double>();

	try {
		JCas tView = cas.getView("TextView");
		HashMap<String, Integer> tBag = countTokens(tView);

		JCas hView = cas.getView("HypothesisView");
		HashMap<String, Integer> hBag = countTokens(hView);

		scoresVector.addAll(calculateSimilarity(tBag, hBag));
		
		String task = JCasUtil.select(cas, EntailmentMetadata.class).iterator().next().getTask();
		if (null == task) {
			scoresVector.add(0d);
			scoresVector.add(0d);
			scoresVector.add(0d);
			scoresVector.add(0d);				
		} else {
			scoresVector.add(isTaskIE(task));
			scoresVector.add(isTaskIR(task));
			scoresVector.add(isTaskQA(task));
			scoresVector.add(isTaskSUM(task));
		}
	} catch (CASException e) {
		throw new ScoringComponentException(e.getMessage());
	}
	return scoresVector;
}
 
开发者ID:hltfbk,项目名称:Excitement-TDMLEDA,代码行数:33,代码来源:BagOfWordsScoring.java

示例7: calculateScores

import org.apache.uima.cas.CASException; //导入方法依赖的package包/类
@Override
public Vector<Double> calculateScores(JCas aCas)
		throws ScoringComponentException {
	// 1) how many words of H (extended with multiple relations) can be
	// found in T divided by the length of H
	Vector<Double> scoresVector = new Vector<Double>();

	try {
		JCas tView = aCas.getView("TextView");
		HashMap<String, Integer> tBag = countTokens(tView);

		JCas hView = aCas.getView("HypothesisView");
		HashMap<String, Integer> hBag = countTokens(hView);

		if (moduleFlags[0]) {
			scoresVector.add(calculateSingleLexScore(tBag, hBag, gds));
		}
		if (moduleFlags[1]) {
			scoresVector.add(calculateSingleLexScore(tBag, hBag, gnw)); 
		}
		if (moduleFlags[2]) {
			scoresVector.add(calculateSingleLexScore(tBag,hBag, gtdm)); 
		}
	} catch (CASException e) {
		throw new ScoringComponentException(e.getMessage());
	}
	return scoresVector;
}
 
开发者ID:hltfbk,项目名称:Excitement-TDMLEDA,代码行数:29,代码来源:BagOfLexesScoringDE.java


注:本文中的org.apache.uima.cas.CASException.getMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。