本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}