Package edu.stanford.nlp.ie.crf

Examples of edu.stanford.nlp.ie.crf.CRFClassifier


      log(classifier);
    }

    ners = Generics.newHashMap();
    for (String classifier : classifiers) {
      CRFClassifier model = null;
      String filename = "/WEB-INF/data/models/" + classifier;
      InputStream is = getServletConfig().getServletContext().getResourceAsStream(filename);
     
      if (is == null)
        throw new ServletException("File not found. Filename = " + filename);
View Full Code Here


    if (crf == null) {
      synchronized(NERServerITest.class) {
        if (crf == null) {
          Properties props = new Properties();
          props.setProperty("outputFormat", "slashTags");
          crf = new CRFClassifier(props);
          crf.loadClassifierNoExceptions(englishCRFPath, props);
        }
      }
    }
View Full Code Here

    props.setProperty("serDictionary", conf.get(Constants.TokenizerData) + "/dict-chris6.ser");
    props.setProperty("inputEncoding", "UTF-8");
    props.setProperty("sighanPostProcessing", "true");

    try {
      classifier = new CRFClassifier(props);
      FSDataInputStream in = fs.open(new Path(conf.get(Constants.TokenizerData) + "/pku"));
      FSDataInputStream inDict = fs.open(new Path(conf.get(Constants.TokenizerData) + "/dict-chris6.ser"));
      classifier.loadClassifier(in, props);
      classifier.flags.setConf(conf);
      readerWriter = classifier.makeReaderAndWriter(inDict);
View Full Code Here

    props.setProperty("serDictionary", conf.get(Constants.TokenizerData) + "/dict-chris6.ser");
    props.setProperty("inputEncoding", "UTF-8");
    props.setProperty("sighanPostProcessing", "true");

    try {
      classifier = new CRFClassifier(props);
      FSDataInputStream in = fs.open(new Path(conf.get(Constants.TokenizerData) + "/pku"));
      FSDataInputStream inDict = fs.open(new Path(conf.get(Constants.TokenizerData) + "/dict-chris6.ser"));
      classifier.loadClassifier(in, props);
      classifier.flags.setConf(conf);
      readerWriter = classifier.makeReaderAndWriter(inDict);
View Full Code Here

    props.setProperty("serDictionary",conf.get(Constants.TokenizerData)+"/dict-chris6.ser");//"data/dict-chris6.ser.gz");
    props.setProperty("inputEncoding", "UTF-8");
    props.setProperty("sighanPostProcessing", "true");

    try {
      classifier = new CRFClassifier(props);
      FSDataInputStream in = fs.open(new Path(conf.get(Constants.TokenizerData)+"/pku"));
      FSDataInputStream inDict = fs.open(new Path(conf.get(Constants.TokenizerData)+"/dict-chris6.ser"));
      classifier.loadClassifier(in, props);      //data/pku.gz
      classifier.flags.setConf(conf);
      readerWriter = classifier.makeReaderAndWriter(inDict);
View Full Code Here

TOP

Related Classes of edu.stanford.nlp.ie.crf.CRFClassifier

Copyright © 2018 www.massapicom. 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.