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


Java DISIException.getMessage方法代码示例

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


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

示例1: writeMultiwords

import it.unitn.disi.common.DISIException; //导入方法依赖的package包/类
private static void writeMultiwords(Dictionary dic, String multiwordsFileName) throws SMatchException {
    try {
        MiscUtils.writeObject(createMultiwordHash(dic), multiwordsFileName);
    } catch (DISIException e) {
        throw new SMatchException(e.getMessage(), e);
    }
}
 
开发者ID:s-match,项目名称:s-match-wordnet,代码行数:8,代码来源:WordNet.java

示例2: readHash

import it.unitn.disi.common.DISIException; //导入方法依赖的package包/类
private static long[] readHash(String fileName) throws SMatchException {
    try {
        return (long[]) MiscUtils.readObject(fileName);
    } catch (DISIException e) {
        throw new SMatchException(e.getMessage(), e);
    }
}
 
开发者ID:s-match,项目名称:s-match-wordnet,代码行数:8,代码来源:InMemoryWordNetBinaryArray.java

示例3: convertAndWrite

import it.unitn.disi.common.DISIException; //导入方法依赖的package包/类
private static void convertAndWrite(Set<Long> keys, String fileName) throws SMatchException {
    try {
        long[] keysArr = new long[keys.size()];
        int i = 0;
        for (Long key : keys) {
            keysArr[i] = key;
            i++;
        }
        Arrays.sort(keysArr);
        MiscUtils.writeObject(keysArr, fileName);
    } catch (DISIException e) {
        throw new SMatchException(e.getClass().getSimpleName() + ": " + e.getMessage(), e);
    }
}
 
开发者ID:s-match,项目名称:s-match-wordnet,代码行数:15,代码来源:InMemoryWordNetBinaryArray.java

示例4: writeMultiwords

import it.unitn.disi.common.DISIException; //导入方法依赖的package包/类
private static void writeMultiwords(Properties properties) throws SMatchException {
    log.info("Creating multiword hash...");
    HashMap<String, ArrayList<ArrayList<String>>> multiwords = new HashMap<String, ArrayList<ArrayList<String>>>();
    POS[] parts = new POS[]{POS.NOUN, POS.ADJECTIVE, POS.VERB, POS.ADVERB};
    for (POS pos : parts) {
        collectMultiwords(multiwords, pos);
    }
    log.info("Multiwords: " + multiwords.size());
    try {
        MiscUtils.writeObject(multiwords, properties.getProperty(MULTIWORDS_FILE_KEY));
    } catch (DISIException e) {
        throw new SMatchException(e.getMessage(), e);
    }
}
 
开发者ID:opendatatrentino,项目名称:s-match,代码行数:15,代码来源:WordNet.java

示例5: readHash

import it.unitn.disi.common.DISIException; //导入方法依赖的package包/类
private static long[] readHash(String fileName, boolean isInternalFile) throws SMatchException {
    try {
        return (long[]) MiscUtils.readObject(fileName, isInternalFile);
    } catch (DISIException e) {
        throw new SMatchException(e.getMessage(), e);
    }
}
 
开发者ID:opendatatrentino,项目名称:s-match,代码行数:8,代码来源:InMemoryWordNetBinaryArray.java

示例6: readHash

import it.unitn.disi.common.DISIException; //导入方法依赖的package包/类
/**
 * Loads the hashmap with multiwords. The multiwords are stored in the following format:
 * Key - the first word in the multiwords
 * Value - List of Lists, which contain the other words in the all the multiwords starting with key.
 *
 * @param url hashmap location
 * @return multiwords hashmap
 * @throws SMatchException SMatchException
 */
@SuppressWarnings("unchecked")
private static Map<String, List<List<String>>> readHash(String url) throws SMatchException {
    try {
        return (Map<String, List<List<String>>>) MiscUtils.readObject(url);
    } catch (DISIException e) {
        throw new SMatchException(e.getMessage(), e);
    }
}
 
开发者ID:s-match,项目名称:s-match-wordnet,代码行数:18,代码来源:WordNet.java

示例7: readHash

import it.unitn.disi.common.DISIException; //导入方法依赖的package包/类
/**
 * Loads the hashmap with multiwords. The multiwords are stored in the following format:
 * Key - the first word in the multiwords
 * Value - List of Lists, which contain the other words in the all the multiwords starting with key.
 *
 * @param fileName the file name from which the hashmap will be read
 * @parm isInternalFile reads from internal data file in resources folder
 * @return multiwords hashmap
 * @throws it.unitn.disi.smatch.SMatchException SMatchException
 */
@SuppressWarnings("unchecked")
private static HashMap<String, ArrayList<ArrayList<String>>> readHash(String fileName, boolean isInternalFile) throws SMatchException {
    try {
        return (HashMap<String, ArrayList<ArrayList<String>>>) MiscUtils.readObject(fileName, isInternalFile);
    } catch (DISIException e) {
        throw new SMatchException(e.getMessage(), e);
    }
}
 
开发者ID:opendatatrentino,项目名称:s-match,代码行数:19,代码来源:WordNet.java


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