Examples of extract()


Examples of net.semanticmetadata.lire.imageanalysis.LireFeature.extract()

                feature = featureEnum.getFeatureClass().newInstance();
                BufferedImage img = ImageIO.read(new BytesStreamInput(image, false));
                if (Math.max(img.getHeight(), img.getWidth()) > ImageMapper.MAX_IMAGE_DIMENSION) {
                    img = ImageUtils.scaleImage(img, ImageMapper.MAX_IMAGE_DIMENSION);
                }
                feature.extract(img);
            } catch (Exception e) {
                throw new ElasticsearchImageProcessException("Failed to parse image", e);
            }
        } else if (lookupIndex != null && lookupType != null && lookupId != null && lookupPath != null) {
            String lookupFieldName = lookupPath + "." + featureEnum.name();
View Full Code Here

Examples of org.apache.any23.Any23.extract()

          new ForwardChainingRDFSInferencer(new MemoryStore()));
      repository.initialize();
      RepositoryConnection con = repository.getConnection();
      RepositoryWriter w = new RepositoryWriter(con);
      ReportingTripleHandler reporter = new ReportingTripleHandler(w);
      runner.extract(source, reporter);
     
      return repository;
    } catch (Exception e) {
      throw new VocabularyImportException(
          "Unable to import vocabulary from " + url, e);
View Full Code Here

Examples of org.apache.catalina.util.StringParser.extract()

            // Extract the next comma-delimited entry
            int start = parser.getIndex();
            if (start >= length)
                break;
            int end = parser.findChar(',');
            String entry = parser.extract(start, end).trim();
            parser.advance();   // For the following entry

            // Extract the quality factor for this entry
            double quality = 1.0;
            int semi = entry.indexOf(";q=");
View Full Code Here

Examples of org.apache.cocoon.maven.deployer.monolithic.RuleBasedZipExtractor.extract()

                log.debug("Scanning " + id);
                RuleBasedZipExtractor zipExtractor = new RuleBasedZipExtractor(basedir, log);
                // add the matching/execution rules
                zipExtractor.addRule("META-INF/cocoon/xpatch/*.xweb", xwebPatcher);
                // extract all configurations files
                zipExtractor.extract(lib);
            } catch (IOException e) {
                throw new DeploymentException("Can't deploy '" + lib.getAbsolutePath() + "'.", e);
            }
        }

View Full Code Here

Examples of org.apache.ctakes.relationextractor.ae.features.NamedEntityFeaturesExtractor.extract()

    EntityMention between = new EntityMention(jCas, 4, 7);
    between.addToIndexes();
   
    // run the feature extractor over the JCas
    NamedEntityFeaturesExtractor extractor = new NamedEntityFeaturesExtractor();
    List<Feature> features = extractor.extract(jCas, e1, e2);
   
    // make sure that the features that we expect are there
    assertTrue(features.contains(new Feature("mention1_TypeID", "42")));
    assertTrue(features.contains(new Feature("mention2_TypeID", "1")));
    assertTrue(features.contains(new Feature("Distance_EntityMention", 1)));
View Full Code Here

Examples of org.apache.ctakes.temporal.ae.feature.PredicateArgumentExtractor.extract()

        for (ChunkingExtractor extractor : chunkingExtractors) {
          features.addAll(extractor.extract(tokenIndex, nChunkLabelsBefore, nChunkLabelsAfter));
        }
       
        // features from semantic roles
        features.addAll(predicateArgumentExtractor.extract(token));

        // apply feature selection, if necessary
        if (this.featureSelection != null) {
          features = this.featureSelection.transform(features);
        }
View Full Code Here

Examples of org.apache.deltaspike.data.impl.meta.extractor.MetadataExtractor.extract()

    {
        // given
        MetadataExtractor extractor = new TypeMetadataExtractor();

        // when
        RepositoryEntity result = extractor.extract(SimpleRepository.class);

        // then
        assertNotNull(result);
        assertEquals(Simple.class, result.getEntityClass());
        assertEquals(Long.class, result.getPrimaryClass());
View Full Code Here

Examples of org.apache.deltaspike.data.impl.meta.extractor.TypeMetadataExtractor.extract()

    {
        // given
        MetadataExtractor extractor = new TypeMetadataExtractor();

        // when
        RepositoryEntity result = extractor.extract(SimpleRepository.class);

        // then
        assertNotNull(result);
        assertEquals(Simple.class, result.getEntityClass());
        assertEquals(Long.class, result.getPrimaryClass());
View Full Code Here

Examples of org.apache.directory.server.schema.bootstrap.partition.SchemaPartitionExtractor.extract()

        if ( ! schemaDirectory.exists() )
        {
            try
            {
                extractor = new SchemaPartitionExtractor( workingDirectory );
                extractor.extract();
            }
            catch ( IOException e )
            {
                NamingException ne = new NamingException( "Failed to extract pre-loaded schema partition." );
                ne.setRootCause( e );
View Full Code Here

Examples of org.apache.jackrabbit.vault.packaging.JcrPackage.extract()

    public void testFullCoverageNT() throws RepositoryException, IOException, PackageException {
        JcrPackage pack = packMgr.upload(getStream("testpackages/fullcoverage.zip"), false);
        assertNotNull(pack);

        // just extract - no snapshots
        pack.extract(getDefaultOptions());
        assertNodeExists("/tmp/fullcoverage/a/aa");

        admin.getWorkspace().getNodeTypeManager().getNodeType("vlt:FullCoverage");
    }
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.