當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。