Examples of ExtractorException


Examples of edu.washington.cs.knowitall.extractor.ExtractorException

            messageInc("Initializing NLP tools...");
            DefaultObjects.initializeNlpTools();
            message("Done.");

        } catch (ConfidenceFunctionException e) {
            throw new ExtractorException(e);
        } catch (IOException e) {
            throw new ExtractorException(e);
        }

    }
View Full Code Here

Examples of edu.washington.cs.knowitall.extractor.ExtractorException

        try {
            FileUtils.pipe(reader, writer);
            return readDocument(writer.toString(), id);
        } catch (IOException e) {
            String msg = String.format("Could not read document %s", id);
            throw new ExtractorException(msg, e);
        }
    }
View Full Code Here

Examples of edu.washington.cs.knowitall.extractor.ExtractorException

        try {
            return readDocument(new FileInputStream(file),
                    file.getAbsolutePath());
        } catch (IOException e) {
            String msg = String.format("Could not extract from %s", file);
            throw new ExtractorException(msg, e);
        }
    }
View Full Code Here

Examples of edu.washington.cs.knowitall.extractor.ExtractorException

                sentNum++;
            } catch (ChunkerException e) {
                String msg = String.format(
                        "Could not chunk sentence %s in document %s", sentNum,
                        id);
                throw new ExtractorException(msg);
            }
        }
        return new ChunkedDocument(id, chunkedSents);
    }
View Full Code Here

Examples of org.semanticdesktop.aperture.extractor.ExtractorException

        if (charset == null) {
            try {
                encoding = CharsetRecognizer.detect(input, "html", null);
            } catch (IOException e) {
                LOG.error("Charset detection problem: " + e.getMessage());
                throw new ExtractorException("Charset detection problem: " + e.getMessage());
            }
        }
        Document doc = htmlParser.getDOM(input, encoding);
        htmlExtractor.extract(id.toString(), doc, null, result);
    }
View Full Code Here

Examples of org.semanticdesktop.aperture.extractor.ExtractorException

            copyAddress(getRecipients(message, RecipientType.BCC), NMO.bcc, result);
           
            MailUtil.getDates(message, result);
           
        } catch (MessagingException e) {
            throw new ExtractorException(e);
        } catch (IOException e) {
            throw new ExtractorException(e);
        }
    }
View Full Code Here

Examples of org.semanticdesktop.aperture.extractor.ExtractorException

        // parse the HTML and extract full-text and metadata
        HtmlTextExtractUtil extractor;
        try {
            extractor = new HtmlTextExtractUtil();
        } catch (InitializationException e) {
            throw new ExtractorException("Could not initialize HtmlExtractor: " + e.getMessage());
        }
        InputStream stream = new ByteArrayInputStream(string.getBytes());
        RDFContainerFactory containerFactory = new RDFContainerFactoryImpl();
        URI id = rdf.getDescribedUri();
        RDFContainer result = containerFactory.getRDFContainer(id);
View Full Code Here

Examples of org.semanticdesktop.aperture.extractor.ExtractorException

      ID3Wrapper wrapper = new ID3Wrapper(id3v1,id3v2);
      addId3Fields(wrapper,result);
      result.add(RDF.type, NID3.ID3Audio);
     
    } catch (UnsupportedTagException e) {
      throw new ExtractorException(e);
    } catch (InvalidDataException e) {
      throw new ExtractorException(e);
    } catch (IOException e) {
      throw new ExtractorException(e);
    }
  }
View Full Code Here

Examples of org.semanticdesktop.aperture.extractor.ExtractorException

            }
            try {
                encoding = CharsetRecognizer.detect(input, "html", "UTF-8");
            } catch (IOException e) {
                LOG.error("Charset detection problem: " + e.getMessage());
                throw new ExtractorException("Charset detection problem: "
                    + e.getMessage());
            }
        }
        else {
            encoding = charset.name();
View Full Code Here

Examples of org.semanticdesktop.aperture.extractor.ExtractorException

            LOG.debug(rdf);
            StringReader reader = new StringReader(rdf);
            result.getModel().readFrom(reader, this.syntax);
            reader.close();
        } catch (TransformerException e) {
            throw new ExtractorException(e.getMessage(), e);
        } catch (ModelRuntimeException e) {
            throw new ExtractorException(e.getMessage(), e);
        } catch (IOException e) {
            throw new ExtractorException(e.getMessage(), 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.