Package com.ikanow.infinit.e.harvest.enrichment.custom

Examples of com.ikanow.infinit.e.harvest.enrichment.custom.StructuredAnalysisHarvester


  // Called from first loop through the pipeline - determines what needs to be done
  //
 
  protected void requiresStructuredAnalysis() {
    if (null == _sah) {
      _sah = new StructuredAnalysisHarvester();
      _sah.setContext(_hc);
     
      if (null != _uah) {
        _sah.addUnstructuredHandler(_uah);
      }
View Full Code Here


  // (LEGACY) Gets metadata using the extractors and appends to documents
  //

  private void enrichSource(SourcePojo source, List<DocumentPojo> toAdd, List<DocumentPojo> toUpdate, List<DocumentPojo> toRemove)
  {
    StructuredAnalysisHarvester sah = null;
    UnstructuredAnalysisHarvester usah = null;

    // Create metadata from the text using regex (also calculate header/footer information if desired)
    if (source.getUnstructuredAnalysisConfig() != null)
    {
      usah = new UnstructuredAnalysisHarvester();

      // If performing structured analysis also then need to mux them
      // since the UAH will run on the body/description potentially created by the SAH
      // and the SAH will take the metadata generated by UAH to create entities and events
      if (source.getStructuredAnalysisConfig() != null) {
        sah = new StructuredAnalysisHarvester();
        sah.addUnstructuredHandler(usah);
      }
      else {
        toAdd = usah.executeHarvest(this, source, toAdd);
      }
    }

    // For sources that generate structured data, we can turn that into entities and events
    // and fill in document fields from the metadata (that can be used by entity extraction)
    if (source.getStructuredAnalysisConfig() != null)
    {
      if (null == sah) {
        sah = new StructuredAnalysisHarvester();
      }
      toAdd = sah.executeHarvest(this, source, toAdd);
      // (if usah exists then this runs usah)
    }

    // Perform text and entity extraction
    if (source.getStructuredAnalysisConfig() == null) // (Else is performed during SAH above)
View Full Code Here

TOP

Related Classes of com.ikanow.infinit.e.harvest.enrichment.custom.StructuredAnalysisHarvester

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.