Examples of PaodingAnalysisException


Examples of net.paoding.analysis.exception.PaodingAnalysisException

        allWords = FileWordsReader.readWords(dicHome, charsetName, maxWordLen);
        if (allWords.size() == 0) {
          String message = "Not found any dictionary files, have you set the 'paoding.dic.home' right? ("
              + this.dicHome + ")";
          log.error(message);
          throw new PaodingAnalysisException(message);
        }
        log.info("loaded success!");
      } catch (IOException e) {
        throw toRuntimeException(e);
      }
View Full Code Here

Examples of net.paoding.analysis.exception.PaodingAnalysisException

  }

  // --------------------------------------

  protected RuntimeException toRuntimeException(IOException e) {
    return new PaodingAnalysisException(e);
  }
View Full Code Here

Examples of net.paoding.analysis.exception.PaodingAnalysisException

            .getProperty("paoding.analysis.properties.files.absolutepaths");
        log.info("config paoding analysis from: " + absolutePaths);
      }
      return p;
    } catch (IOException e) {
      throw new PaodingAnalysisException(e);
    }
  }
View Full Code Here

Examples of net.paoding.analysis.exception.PaodingAnalysisException

          dicHome = "classpath:dic/";
        }
      }
    }
    if (dicHome == null) {
      throw new PaodingAnalysisException(
          "please set a system env PAODING_DIC_HOME or Config paoding.dic.home in paoding-dic-home.properties point to the dictionaries!");
    }
    // 规范化dicHome,并设置到属性文件对象中
    dicHome = dicHome.replace('\\', '/');
    if (!dicHome.endsWith("/")) {
      dicHome = dicHome + "/";
    }
    p.setProperty(Constants.DIC_HOME, dicHome);// writer to the properites
    // object
    // 将dicHome转化为一个系统唯一的绝对路径,记录在属性对象中
    File dicHomeFile = getFile(dicHome);
    if (!dicHomeFile.exists()) {
      throw new PaodingAnalysisException(
          "not found the dic home dirctory! "
              + dicHomeFile.getAbsolutePath());
    }
    if (!dicHomeFile.isDirectory()) {
      throw new PaodingAnalysisException(
          "dic home should not be a file, but a directory!");
    }
    p.setProperty("paoding.dic.home.absolute.path", dicHomeFile
        .getAbsolutePath());
  }
View Full Code Here

Examples of net.paoding.analysis.exception.PaodingAnalysisException

      }.run();
      // Paoding对象创建成功!此时可以将它寄放到paodingHolder中,给下次重复利用
      paodingHolder.set(paodingKey, paoding);
      return paoding;
    } catch (Exception e) {
      throw new PaodingAnalysisException("", e);
    }
  }
View Full Code Here

Examples of net.paoding.analysis.exception.PaodingAnalysisException

  }

  // --------------------------------------

  protected RuntimeException toRuntimeException(IOException e) {
    return new PaodingAnalysisException(e);
  }
View Full Code Here

Examples of net.paoding.analysis.exception.PaodingAnalysisException

  }

  // --------------------------------------

  protected RuntimeException toRuntimeException(IOException e) {
    return new PaodingAnalysisException(e);
  }
View Full Code Here

Examples of net.paoding.analysis.exception.PaodingAnalysisException

            .getProperty("paoding.analysis.properties.files.absolutepaths");
        log.info("config paoding analysis from: " + absolutePaths);
      }
      return p;
    } catch (IOException e) {
      throw new PaodingAnalysisException(e);
    }
  }
View Full Code Here

Examples of net.paoding.analysis.exception.PaodingAnalysisException

          dicHome = "classpath:dic/";
        }
      }
    }
    if (dicHome == null) {
      throw new PaodingAnalysisException(
          "please set a system env PAODING_DIC_HOME or Config paoding.dic.home in paoding-dic-home.properties point to the dictionaries!");
    }
    // 规范化dicHome,并设置到属性文件对象中
    dicHome = dicHome.replace('\\', '/');
    if (!dicHome.endsWith("/")) {
      dicHome = dicHome + "/";
    }
    p.setProperty(Constants.DIC_HOME, dicHome);// writer to the properites
    // object
    // 将dicHome转化为一个系统唯一的绝对路径,记录在属性对象中
    File dicHomeFile = getFile(dicHome);
    if (!dicHomeFile.exists()) {
      throw new PaodingAnalysisException(
          "not found the dic home dirctory! "
              + dicHomeFile.getAbsolutePath());
    }
    if (!dicHomeFile.isDirectory()) {
      throw new PaodingAnalysisException(
          "dic home should not be a file, but a directory!");
    }
    p.setProperty("paoding.dic.home.absolute.path", dicHomeFile
        .getAbsolutePath());
  }
View Full Code Here

Examples of net.paoding.analysis.exception.PaodingAnalysisException

      }.run();
      // Paoding对象创建成功!此时可以将它寄放到paodingHolder中,给下次重复利用
      paodingHolder.set(paodingKey, paoding);
      return paoding;
    } catch (Exception e) {
      throw new PaodingAnalysisException("", e);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.