APISonar


edu.stanford.nlp.util.logging.Redwood.RedwoodChannels.log

> edu > stanford > nlp > util > logging > Redwood > RedwoodChannels > log
edu APIs stanford APIs nlp APIs util APIs logging APIs Redwood APIs RedwoodChannels APIs log APIs

Example 1
protected final Redwood.RedwoodChannels logger = Redwood.channels(KBPSemgrexExtractor.class);

  public KBPSemgrexExtractor(String semgrexdir) throws IOException {
    logger.log("Creating SemgrexRegexExtractor");
    // Create extractors
    for (RelationType rel : RelationType.values()) {
      String filename = semgrexdir + File.separator + rel.canonicalName.replace("/", "SLASH") + ".rules";
      if (IOUtils.existsInClasspathOrFileSystem(filename)) {

        List<SemgrexPattern> rulesforrel = SemgrexBatchParser.compileStream(IOUtils.getInputStreamFromURLOrClasspathOrFileSystem(filename));
        logger.log("Read " + rulesforrel.size() + " rules from " + filename + " for relation " + rel);
        rules.put(rel, rulesforrel);
      }
    }
  }